Code generation relating to providing table of contents pointer values
AssigneeInternational Business Machines Corporation
InventorsMichael K. Gschwind, Valentina Salapura
Life of this patent
Estimating the term…
Abstract
Code generation relating to providing table of contents (TOC) pointer values. Code to be compiled is obtained by a processor. Based on obtaining the code, a determination is made as to whether the code is to access a reference data structure. Based on determining the code is to access the reference data structure, other code is included in the code to provide a pointer to the reference data structure. The other code includes an architectural definition to provide the pointer to the reference data structure.
Claims17
A computer program product for facilitating processing within a computing environment, the computer program product comprising:
- at least one computer readable storage medium readable by at least one processing circuit and storing instructions for performing a method comprising:
- obtaining, by a processor, code to be decoded;
- determining, based on obtaining the code, whether the code accesses a reference data structure;
- and
- including within the code, based on determining the code accesses the reference data structure, other code providing a pointer to the reference data structure, the other code including an architectural definition providing the pointer to the reference data structure, wherein the other code comprises a set register instruction that loads a defined register with a value of the pointer to the reference data structure, the set register instruction comprising an operation code indicating the set register operation and a field used to specify the defined register that is loaded with the value of the pointer, and wherein the including, within the code, the other code providing the pointer to the reference data structure comprises:
- scanning the code for an instruction sequence to compute the value of the pointer to the reference data structure and to place the value that is computed in the defined register;
- and
- replacing the instruction sequence with the set register instruction such that the set register instruction is used to load the defined register with the value of the pointer to the reference data structure instead of computing the value using the instruction sequence.
A computer system for facilitating processing within a computing environment, the computer system comprising:
- a memory;
- and
- a processor in communication with the memory, wherein the computer system is configured to perform a method, said method comprising:
- obtaining, by a processor, code to be decoded;
- determining, based on obtaining the code, whether the code accesses a reference data structure;
- and
- including within the code, based on determining the code accesses the reference data structure, other code providing a pointer to the reference data structure, the other code including an architectural definition providing the pointer to the reference data structure, wherein the other code comprises a set register instruction that loads a defined register with a value of the pointer to the reference data structure, the set register instruction comprising an operation code indicating the set register operation and a field used to specify the defined register that is loaded with the value of the pointer, and wherein the including, within the code, the other code providing the pointer to the reference data structure comprises:
- scanning the code for an instruction sequence to compute the value of the pointer to the reference data structure and to place the value that is computed in the defined register;
- and
- replacing the instruction sequence with the set register instruction such that the set register instruction is used to load the defined register with the value of the pointer to the reference data structure instead of computing the value using the instruction sequence.
A computer program product for facilitating processing within a computing environment, the computer program product comprising:
- at least one computer readable storage medium readable by at least one processing circuit and storing instructions for performing a method comprising:
- obtaining, by a processor, code to be decoded;
- determining, based on obtaining the code, whether the code accesses a reference data structure;
- and
- including within the code, based on determining the code accesses the reference data structure, other code to provide a pointer to the reference data structure, the other code including an architectural definition providing the pointer to the reference data structure in a defined register, and wherein the other code provides the pointer by performing a look-up of a value for the pointer, as defined by the architectural definition, and wherein the including, within the code, the other code to provide the pointer to the reference data structure comprises:
- scanning the code for an instruction sequence to compute the value of the pointer to the reference data structure and to place the value that is computed in the defined register;
- and
- replacing the instruction sequence with the architectural definition such that the architectural definition is used to load the defined register with the value of the pointer to the reference data structure instead of computing the value using the instruction sequence.
Dependencies are inferred from the claim text.