Mechanism for finding spare registers in binary code
AssigneeHewlett-Packard Company
InventorPratap Subrahmanyam
Life of this patent
Estimating the term…
Loading patent…
AssigneeHewlett-Packard Company
InventorPratap Subrahmanyam
Estimating the term…
The inventive system and method determines the availability of spare registers in binary code for use by an instrument or program by conducting a local search of either the immediate block of program code or of successor blocks, depending upon where instrumenting code is to be inserted. When inserting code near the begining the of a block of code, the system checks for available registers within the current block of code after the intended insertion point. A register is considered available if the original program overwrites its contents in a statement succeeding the insertion point without first having read data from this register between the insertion point and the current program statement. The system logs all registers found to be available within the immediate block of code using this approach. When the insertion point is at or near the end of a block of code, the system checks all immediate successor blocks for available registers in the same manmer as for the single block case. The system then determines which registers are available, or overwritten without prior access, in all of the successor blocks and deems only these registers to be available to the inserted instrumenting code. The system thus assures that the use of registers by instrumenting code at an insertion point near the end of a code block is harmless to data needed by the main program regardless of where main program execution branches to after the current code block.
A method for identifying at least one data storage element referenced in existing program code available for use by inserted code, wherein the program code references a plurality of data storage elements, the method comprising the steps of:
A system for identifying at least one data storage element referenced in existing program code available for use by inserted code, wherein the program code references a plurality of data storage elements, the system comprising:
A computer program product for identifying at least one data storage element referenced in existing program code available for use by inserted code, wherein the program code references a plurality of data storage elements, the computer program product comprising:
Dependencies are inferred from the claim text.