发明名称 Execution control during program code conversion
摘要 Execution control techniques are described for use in a translator that converts subject code into target code. The translator includes a translator trampoline function that is called from a translator run loop and which in turn calls either to a translator code generator to generate target code, or else calls previously generated target code for execution. Control then returns to the translator trampoline function to make a new call, or returns to the translator run loop. Other aspects include making context switches through the trampoline function and setting first and second calling conventions either side of the trampoline function. Jumping directly or indirectly between target code blocks during execution is also described.
申请公布号 US9317264(B2) 申请公布日期 2016.04.19
申请号 US201314139486 申请日期 2013.12.23
申请人 International Business Machines Corporation 发明人 Barraclough Gavin;Wan Kit Man;Brown ALexander B.;MacKintosh David N.
分类号 G06F9/45;G06F9/455 主分类号 G06F9/45
代理机构 Greg Goshorn, P.C. 代理人 Tyson Thomas E.;Goshorn Gregory K.;Greg Goshorn, P.C.
主权项 1. A method of execution control for use during program code conversion of a subject program into target code executable by a target processor, the 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 first translator trampoline function from the translator run loop; (c) without returning to the translator run loop, calling from the first 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 first translator trampoline function and repeating (c) for another subject block, or else returning from the first translator trampoline function to the translator run loop; (e) retuning from execution of target code to the first translator trampoline function; (f) calling from the execution of target code to a nested second translator trampoline function; (g) returning from the nested second translator trampoline function to the first translator trampoline function; (h) calling from the first translator trampoline function to the target code execution; and (i) in the first translator 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 second translator trampoline function execution, and vice versa; wherein the nested second translator trampoline function includes the translator code generator function to generate a block of target code from a corresponding block of the subject program.
地址 Armonk NY US