发明名称 Global entry point and local entry point for callee function
摘要 Embodiments relate to a global entry point and a local entry point for a callee function. An aspect includes executing, by a processor, a function call from a calling function to the callee function. Another aspect includes, based on the function call being a direct and external function call, entering the callee function at the global entry point and executing prologue code in the callee function that calculates and stores a table of contents (TOC) value for the callee function in a TOC register. Another aspect includes, based on the function call being a direct and local function call, entering the callee function at the local entry point, wherein entering the callee function at the local entry point skips the prologue code. Another aspect includes, based on the function call being an indirect function call, entering the callee function at the global entry point and executing the prologue code.
申请公布号 US9471340(B2) 申请公布日期 2016.10.18
申请号 US201414483538 申请日期 2014.09.11
申请人 INTERNATIONAL BUSINESS MACHINES CORPORATION 发明人 Gschwind Michael K.;Weigand Ulrich
分类号 G06F9/44;G06F9/445;G06F9/45 主分类号 G06F9/44
代理机构 Cantor Colburn LLP 代理人 Cantor Colburn LLP ;Bennett Steve
主权项 1. A computer implemented method for a global entry point and a local entry point for a callee function, the method comprising: executing, by a processor, a function call from a calling function to the callee function, the executing comprising: based on the function call being a direct and external function call, entering the callee function at the global entry point of the callee function and executing prologue code in the callee function that calculates and stores a table of contents (TOC) value for the callee function in a TOC register, wherein the TOC value for the callee function is calculated by the prologue code based on a function address register and an offset; based on the function call being a direct and local function call, entering the callee function at the local entry point of the callee function, wherein entering the callee function at the local entry point skips the prologue code; and based on the function call being an indirect function call, entering the callee function at the global entry point and executing the prologue code; wherein the global entry point, prologue code, and local entry point are inserted into the callee function by a compiler, such that the compiler inserts the global entry point at the beginning of the calling function, inserts the prologue code directly after the global entry point, and inserts the local entry point directly after the prologue code and before body of the callee function.
地址 Armonk NY US
您可能感兴趣的专利