Fusion to enhance early address generation of load instructions in a microprocessor
Technology for fusing an add-immediate instruction with a load-immediate instruction (or store-immediate instruction) in a microprocessor. This can result in quicker address generation while performing a load and store operation.
1. A method for performance by a computer processor device, the method comprising:
receiving, by a thread in the processor, a shifted immediate field instruction;
determining, by the processor hardware, that the immediately subsequent instruction in the thread is a load/store-immediate instruction;
responsive to the determination that the immediately subsequent instruction in the thread is a load/store-immediate instruction; and
fusing the shifted immediate field instruction with the load/store-immediate instruction so that: (i) an order of the shifted immediate field instruction and the load/store immediate instruction is swapped, and (ii) the load/store immediate instruction is modified to include the operands of the shifted immediate field instruction.
2. The method of claim 1 further comprising:
reading a regfile to obtain a first operand; and
during the reading of the regfile, concatenating: (i) an immediate field from the shifted immediate field instruction; and (ii) a load location indicative of a second operand.
3. The method of claim 2 further comprising:
receiving, by an address generation portion (AGEN) of a load store unit in the processor hardware, a first operand from regfile;
obtaining, by the AGEN, a second operand from immediate field manipulation; and
generating a read address for use in the execution of the load operation.
4. The method of claim 3 further comprising:
reading, by the processor hardware and from a memory, or set of registers, data at a location indicated by the read address.
5. The method of claim 1 wherein the load/store immediate instruction is a load-immediate instruction (load-imm).
6. The method of claim 1 wherein the load/store immediate instruction is a store-immediate instruction (store-imm).
7. A computer processor device (CPD) including machine logic for causing the CPD to perform the following operations:
receiving, by a thread in the processor, a shifted immediate field instruction;
determining, by the processor hardware, that the immediately subsequent instruction in the thread is a load/store-immediate instruction;
responsive to the determination that the immediately subsequent instruction in the thread is a load/store-immediate instruction; and
fusing the shifted immediate field instruction with the load/store-immediate instruction so that: (i) an order of the shifted immediate field instruction and the load/store immediate instruction is swapped, and (ii) the load/store immediate instruction is modified to include the operands of the shifted immediate field instruction.
8. The CPD of claim 7 further including machine logic for causing the CPD to perform the following further operation(s):
reading a regfile to obtain a first operand; and
during the reading of the regfile, concatenating: (i) an immediate field from the shifted immediate field instruction; and (ii) a load location indicative of a second operand.
9. The CPD of claim 8 further including machine logic for causing the CPD to perform the following further operation(s):
receiving, by an address generation portion (AGEN) of a load store unit in the processor hardware, a first operand from regfile;
obtaining, by the AGEN, a second operand from immediate field manipulation; and
generating a read address for use in the execution of the load operation.
10. The CPD of claim 9 further including machine logic for causing the CPD to perform the following further operation(s):
reading, by the processor hardware and from a memory, or set of registers, data at a location indicated by the read address.
11. The CPD of claim 7 wherein the load/store immediate instruction is a load-immediate instruction (load-imm).
12. The CPD of claim 7 wherein the load/store immediate instruction is a store-immediate instruction (store-imm).
13. The CPD of claim 7 wherein the machine logic is in the form of computer processor hardware.
14. A computer system (CS) comprising:
a storage device with computer code and instructions stored thereon; and
a computer processor device (CPD) including machine logic for causing the CPD to perform the following operations:
receiving, by a thread in the processor, a shifted immediate field instruction,
determining, by the processor hardware, that the immediately subsequent instruction in the thread is a load/store-immediate instruction,
responsive to the determination that the immediately subsequent instruction in the thread is a load/store-immediate instruction, and
fusing the shifted immediate field instruction with the load/store-immediate instruction so that: (i) an order of the shifted immediate field instruction and the load/store immediate instruction is swapped, and (ii) the load/store immediate instruction is modified to include the operands of the shifted immediate field instruction.
15. The CS of claim 14 further including machine logic for causing the CPD to perform the following further operation(s):
reading a regfile to obtain a first operand; and
during the reading of the regfile, concatenating: (i) an immediate field from the shifted immediate field instruction; and (ii) a load location indicative of a second operand.
16. The CS of claim 15 further including machine logic for causing the CPD to perform the following further operation(s):
receiving, by an address generation portion (AGEN) of a load store unit in the processor hardware, a first operand from regfile;
obtaining, by the AGEN, a second operand from immediate field manipulation; and
generating a read address for use in the execution of the load operation.
17. The CS of claim 16 further including machine logic for causing the CPD to perform the following further operation(s):
reading, by the processor hardware and from a memory, or set of registers, data at a location indicated by the read address.
18. The CS of claim 14 wherein the load/store immediate instruction is a load-immediate instruction (load-imm).
19. The CS of claim 14 wherein the load/store immediate instruction is a store-immediate instruction (store-imm).
20. The CS of claim 14 wherein the machine logic is in the form of computer processor hardware.