Patent ID: 6711672
Filing Date: 2004-03-23
Classification: G06F

Abstract:
A method for implementing subroutine calls and returns in a computer system comprising the following steps:A) converting a sequence of input language (IL) instructions of a guest system into a corresponding sequence of output language (OL) instructions of a host system; B) executing the OL instructions in the host system; C) for each call to an IL subroutine made from an IL call site in the IL instruction sequence: i) storing a correct IL return address R on a stack; ii) calculating a first hint index by evaluating a predetermined hint function with R as an argument; iii) storing a corresponding correct OL return address Râ€² in a return target cache at a location determined by the first hint index; iv) executing an OL subroutine translation of the called IL subroutine; D) upon completion of execution of the OL subroutine translation: i) retrieving a current value from the stack; ii) calculating a second hint index by evaluating the hint function with the value retrieved from the stack as the argument; iii) retrieving a target address from a location in the return target cache determined by the second hint index; and iv) continuing execution beginning at the target address.