Relocation of instructions that use relative addressing
AssigneeInternational Business Machines Corporation
InventorsMichael K. Gschwind, Valentina Salapura
Life of this patent
Estimating the term…
Abstract
Relocation of instructions that use relative addressing. Metadata relating to an instruction that uses relative addressing to access data and is to be relocated is stored prior to relocation. Based on relocating the instruction from one memory location to another memory location, a determination is made of an address to be used to access the data by the instruction. The determining is based on at least one of the metadata or an address of the another memory location. The instruction is executed at the another memory location, and the determined address is used to access the data.
Claims17
A method of facilitating processing within a computing environment, said method comprising:
- storing, by a processor of the computing environment, metadata relating to an instruction of the computing environment to be relocated from one memory location to another memory location, the instruction using program counter (PC)-relative addressing to access data and the instruction included in code that is dynamically optimized resulting in relocating the instruction to provide a relocated instruction;
- based on relocating the instruction, determining an address to be used to access the data by the relocated instruction, the determining being based on at least one of the metadata or an address of the another memory location, wherein the determining the address to be used to access the data comprises:
- accessing a register that is included in the code prior to optimizing the code to obtain a register address from the register, the register being a fixed number of instructions before or after the instruction, and the register address comprising an address of the one memory location;
- determining an offset to be used by the relocated instruction to access the data;
- and
- using the register address and the offset to determine the address to be used to access the data;
- and
- executing the relocated instruction at the another memory location, the executing using the determined address to access the data.
A computer program product for facilitating processing within a computing environment, said computer program product comprising:
- a computer readable storage medium readable by a processing circuit and storing instructions for execution by the processing circuit for performing a method comprising:
- storing, by a processor of the computing environment, metadata relating to an instruction of the computing environment to be relocated from one memory location to another memory location, the instruction using program counter (PC)-relative addressing to access data and the instruction included in code that is dynamically optimized resulting in relocating the instruction to provide a relocated instruction;
- based on relocating the instruction, determining an address to be used to access the data by the relocated instruction, the determining being based on at least one of the metadata or an address of the another memory location, wherein the determining the address to be used to access the data comprises:
- accessing a register that is included in the code prior to optimizing the code to obtain a register address from the register, the register being a fixed number of instructions before or after the instruction, and the register address comprising an address of the one memory location;
- determining an offset to be used by the relocated instruction to access the data;
- and
- using the register address and the offset to determine the address to be used to access the data;
- and
- executing the relocated instruction at the another memory location, the executing using the determined address to access the data.
A computer system for facilitating processing within a computing environment, said computer system comprising:
- a memory;
- and
- a processor in communications with the memory, wherein the computer system is configured to perform a method, said method comprising:
- storing metadata relating to an instruction of the computing environment to be relocated from one memory location to another memory location, the instruction using program counter (PC)-relative addressing to access data and the instruction included in code that is dynamically optimized resulting in relocating the instruction to provide a relocated instruction;
- based on relocating the instruction, determining an address to be used to access the data by the relocated instruction, the determining being based on at least one of the metadata or an address of the another memory location, wherein the determining the address to be used to access the data comprises:
- accessing a register that is included in the code prior to optimizing the code to obtain a register address from the register, the register being a fixed number of instructions before or after the instruction, and the register address comprising an address of the one memory location;
- determining an offset to be used by the relocated instruction to access the data;
- and
- using the register address and the offset to determine the address to be used to access the data;
- and
- executing the relocated instruction at the another memory location, the executing using the determined address to access the data.
Dependencies are inferred from the claim text.