Fast conditional thunk utility
AssigneeMicrosoft Corporation
InventorsBrian D. Wentz, James Edward Walsh
Life of this patent
Estimating the term…
Loading patent…
AssigneeMicrosoft Corporation
InventorsBrian D. Wentz, James Edward Walsh
Estimating the term…
A conditional thunk utility employing an assembler-level direct-branch thunk technique. In a condition-check alternative, the conditional thunk utility performs a condition check followed by a direct-branch jump. The condition-check methodology is implemented using an assembler-level direct-branch technique, and the conditional thunk utility does not utilize the stack to queue the arguments of a function call. Thus, the stack is not altered from its desired condition just prior to executing the API function call. The condition-check alternative checks the thunk condition for each function call and, for this reason, may be used when the thunk condition can vary relatively frequently while the host computer system is running. In a jump-table alternative, the conditional thunk utility performs an assembler-level jump table check followed by a direct jump to a target address. In the jump-table alternative, the assembler-level direct branch code is configured to retrieve the jump address for the conditional thunk decision from the instruction cache memory (I-cache). Because the thunk conditions are checked and the jump table is configured in advance, the jump-table embodiment does not require a thunk condition check before each jump. For this reason, the jump-table alternative may be used for thunk conditions are invariant, or vary relatively infrequently, while the host computer system is running.
A computer-readable medium having computer-executable instructions for performing the steps of:
A method for processing a function call from a client program to a host program running on a computer system, comprising the steps of:
A computer-readable medium having computer-executable instructions for performing the steps of:
Dependencies are inferred from the claim text.