Patent ID: 7290253

Claim:
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 into a corresponding sequence of output language (OL) instructions; B) executing the OL instructions; C) for each call to an IL subroutine made from an IL call site in the IL instruction sequence: i) storing a call site IL return address R call on a stack; ii) calculating a first index by evaluating a function with P as an argument, where P is a procedure entry address of the subroutine; iii) storing a corresponding OL return address in a return target cache at a location indicated by the first index; iv) executing an OL subroutine translation of the called IL subroutine; D) upon completion of execution of the OL subroutine translation, i) in a launch block of instructions, retrieving an OL target address from the return target cache at the location indicated by a second index; and ii) continuing execution beginning at the OL target address.