摘要 |
<p>An apparatus for emulation routine pointer prefetch comprises an emulated program counter (EPC), a summing means, a prefetch state machine, an opcode storage means, and a pointer storage means. The EPC, opcode storage means, and a pointer storage means are coupled to a bus to receive, store and output an emulated program counter value, an opcode value and a pointer to a next emulation routine, respectively. The EPC, opcode storage means, and pointer storage means are controlled by the prefetch state machine. The prefetch state machine is coupled to the bus to detect a reference to a reserved memory address and stores an updated emulated program counter value in the EPC using the summing means. The prefetch state machine uses the emulated program counter value to prefetch the next source instruction to be emulated in a first memory operation. A portion of the prefetched source instruction is the opcode value and is stored in the opcode storage means. The prefetch state machine uses the opcode value in a second memory operation to retrieve a pointer to a corresponding emulation routine. The pointer is stored in the pointer storage means. The method for emulation routine pointer prefetch preferably comprises the steps of determining if a currently executing emulation routine has issued an instruction to update the EPC; prefetching a next source instruction based upon the value of the EPC; and utilizing an opcode within the prefetched source instruction to prefetch a pointer to a next emulation routine corresponding to the prefetched source instruction.</p> |