Patent ID: 8615749
Filing Date: 2013-12-24
Classification: G06F

Abstract:
1. A method of execution control for use during program code conversion of a subject program into target code executable by a target processor, said method comprising: (a) providing a translator run loop which sets a subject block in the subject program as a current subject block; (b) calling a translator trampoline function from the translator run loop; (c) without returning to the translator run loop, calling from the translator trampoline function either to a translator code generator function to generate and store a target code block from the current subject block, or else calling and executing a previously stored target code block corresponding to the current subject block; (d) returning, from the executing without returning to the translator run loop, to the translator trampoline function and repeating (c) for another subject block, or else returning from the translator trampoline function to the translator run loop; (e) calling from execution of target code to a second trampoline function; (f) calling from the second trampoline function to a nested translator function; (g) returning from the nested translator function to the second trampoline function; (h) returning from the second trampoline function to the target code execution; and (i) in the second trampoline function, performing a context switch from the first calling convention to the second calling convention when switching between the target code execution and the nested translator execution, and vice versa; wherein the nested translator function includes the translator code generator function to generate a block of target code from a corresponding block of the subject program.