# US 2022/0019436 A1 · Fusion of microprocessor store instructions

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2022/0019436 A1
- Document ID: US20220019436A1
- Status: Published application
- Kind: A1
- Application number: 16/933,241
- Filed: 2020-07-20
- Published: 2022-01-20
- Earliest claimed: 2020-07-20
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Bryan Lloyd; Sundeep Chadha; Dung Q. Nguyen; Christian Gerhard Zoellin; Brian W. Thompto; Sheldon Bernard Levenstein; Phillip G. Williams; Robert A. Cordes; Brian Chen
- Web page: https://patentgrep.com/patent/US20220019436A1

## CPC

- G06F 9/30181: {Instruction operation extension or modification}
- G06F 9/3861: {Recovery, e.g. branch miss-prediction, exception handling (error detection or correction G06F11/00)}
- G06F 9/30043: {LOAD or STORE instructions; Clear instruction}
- G06F 9/3814: {Implementation provisions of instruction buffers, e.g. prefetch buffer; banks}
- G06F 9/3836: {Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution}
- G06F 9/3853: {of compound instructions}
- G06F 9/3858: {Result writeback, i.e. updating the architectural state or memory}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Provided is a method for fusing store instructions in a microprocessor. The method includes identifying two instructions in an execution pipeline of a microprocessor. The method further includes determining that the two instructions meet a fusion criteria. In response to determining that the two instructions meet the fusion criteria, the two instructions are recoded into a fused instruction. The fused instruction is executed.

## Claims

### Claim 1

A method comprising:
identifying two instructions in an execution pipeline of a microprocessor, wherein the two instructions include a first instruction and a second instruction;
determining that the two instructions meet a fusion criteria, wherein determining that the two instructions meet the fusion criteria comprises determining that the first and second instructions have a same instruction form and store data in contiguous memory locations;
recoding, in response to determining that the two instructions meet the fusion criteria, the two instructions into a fused instruction; and
executing the fused instruction.

### Claim 2 (depends on 1)

The method of claim 1, wherein determining that the two instructions meet the fusion criteria further comprises:
determining that the first and second instructions have a same instruction type, a same instruction length, and that they are consecutive instructions in a fetch queue.

### Claim 3 (depends on 1)

The method of claim 1, wherein the method further comprises:
identifying an exception while executing the fused instruction;
flushing the fused instruction; and
re-fetching the two instructions.

### Claim 4 (depends on 3)

The method of claim 3, wherein the method further comprises:
executing, after re-fetching the two instructions, the two instructions separately.

### Claim 5 (depends on 3)

The method of claim 3, the method further comprising:
determining that the exception was related to the first instruction of the two instructions; and
recording the exception against the first instruction.

### Claim 6 (depends on 1)

The method of claim 1, wherein the first instruction was fetched before the second instruction, the method further comprising:
determining that the first instruction is to store data to a first area of memory;
determining that the second instruction is to store data to a second area of memory that directly precedes the first area of memory;
marking the fused instruction as reversed; and
flipping an order of the first and second instructions in the fused instruction.

### Claim 7 (depends on 1)

The method of claim 1, wherein the first and second instructions are D-form store instructions, and wherein determining that the two instructions meet the fusion criteria further comprises:
determining that the first and second store instructions have the same base register;
determining a store length for the first and second instructions, wherein the store length is the same for both the first and second instructions; and
determining that a difference between a first offset of the first instruction and a second offset of the second instruction is equal to the store length.

### Claim 8

A system comprising:
a processor configured to perform a method comprising:
identifying two instructions in an execution pipeline of the processor, wherein the two instructions include a first instruction and a second instruction;
determining that the two instructions meet a fusion criteria, wherein determining that the two instructions meet the fusion criteria comprises determining that the first and second instructions have a same instruction form and store data in contiguous memory locations;
recoding, in response to determining that the two instructions meet the fusion criteria, the two instructions into a fused instruction; and
executing the fused instruction.

### Claim 9 (depends on 8)

The system of claim 8, wherein determining that the two instructions meet the fusion criteria further comprises:
determining that the first and second instructions have a same instruction type, a same instruction length, and that they are consecutive instructions in a fetch queue.

### Claim 10 (depends on 8)

The system of claim 8, wherein the method further comprises:
identifying an exception while executing the fused instruction;
flushing the fused instruction; and
re-fetching the two instructions.

### Claim 11 (depends on 10)

The system of claim 10, wherein the method further comprises:
executing, after re-fetching the two instructions, the two instructions separately.

### Claim 12 (depends on 10)

The system of claim 10, the method further comprising:
determining that the exception was related to the first instruction; and
recording the exception against the first instruction.

### Claim 13 (depends on 8)

The system of claim 8, wherein the first instruction precedes the second instruction in a fetch queue, the method further comprising:
determining that the first instruction is to store data to a first area of memory;
determining that the second instruction is to store data to a second area of memory that directly precedes the first area of memory;
marking the fused instruction as reversed; and
flipping an order of the first and second instructions in the fused instruction.

### Claim 14 (depends on 8)

The system of claim 8, wherein the first and second instructions are D-form store instructions, and wherein determining that the two instructions meet the fusion criteria further comprises:
determining that the first and second instructions have the same base register;
determining a store length for the first and second instructions, wherein the store length is the same for both the first and second instructions; and
determining that a difference between a first offset of the first instruction and a second offset of the second instruction is equal to the store length.

### Claim 15

A processor comprising:
an instruction fetch unit configured to:
determine that two store instructions fetched from memory are fusible by determining that the two store instructions have a same instruction form, store data in contiguous memory locations, and are consecutive in a fetch queue; and
recode the two store instructions into a fused store instruction;
an instruction sequencing unit configured to:
receive the fused store instruction from the instruction fetch unit; and
store the fused store instruction as an entry in an issue queue, wherein a first half of the fused store instruction is stored to a first half of the issue queue, and a second half of the fused store instruction is stored to a second half of the issue queue; and
a load-store unit configured to:
receive the fused store instruction from the issue queue via a vector/scalar unit;
generate a store address using the first half of the fused store instruction;
store the store address in a store reorder queue; and
store data identified by the second half of the fused store instruction in a store data queue.

### Claim 16 (depends on 15)

The processor of claim 15, wherein the load-store unit is further configured to:
identify an exception while executing the fused store instruction;
flush the fused store instruction; and
instruct the instruction fetch unit to re-fetch the two store instructions.

### Claim 17 (depends on 16)

The processor of claim 16, wherein the processor is further configured to:
execute, after re-fetching the two store instructions, the two store instructions as separate instructions.

### Claim 18 (depends on 15)

The processor of claim 15, wherein the two store instructions include a first store instruction and a second store instruction, and wherein determining that the two store instructions are fusible further comprises:
determining that the first and second store instructions have a same instruction type and a same instruction length.

### Claim 19 (depends on 15)

The processor of claim 15, wherein the two store instructions include a first store instruction that was fetched before a second store instruction, and wherein the instruction fetch unit is further configured to:
determine that the first store instruction is configured to store data to a first area of memory;
determine that the second store instruction is configured to store data to a second area of memory that directly precedes the first area of memory; and
mark the fused store instruction as reversed.

### Claim 20 (depends on 19)

The processor of claim 19, wherein the instruction sequencing unit is further configured to:
flip an order of the first and second store instructions in the fused store instruction in response to identifying that the fused store instruction is marked as reversed.
