# US 12,717,583 B2 · Processor macro-operation fusion

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

- Number: US 12,717,583 B2
- Document ID: US12717583B2
- Status: Granted
- Kind: B2
- Application number: 18/491,242
- Filed: 2023-10-20
- Published: 2025-04-24
- Granted: 2026-08-25
- Earliest claimed: 2023-10-20
- Assignees: Ampere Computing LLC
- Applicants: Ampere Computing LLC
- Inventors: Benjamin Crawford Chaffin; Bret Toll; Jacob Daniel Morgan; Rishank Santosh Nair
- Web page: https://patentgrep.com/patent/US12717583B2

## CPC

- G06F 9/30181: {Instruction operation extension or modification}
- G06F 9/3001: {Arithmetic instructions}
- G06F 9/30145: {Instruction analysis, e.g. decoding, instruction word fields}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Disclosed are techniques for macro-operation fusion. In an aspect, a method for macro-operation fusion comprises detecting that a plurality of macro-operations involving a first register is a fusible set of macro-operations comprising a first macro-operation to perform an arithmetic operation using a second register and a second macro-operation to perform the arithmetic operation using an immediate value, wherein the arithmetic operation is addition or subtraction. The method also comprises decoding the fusible set to one micro-operation that performs functions of the fusible set, and executing the one micro-operation that performs the functions of the fusible set. In some aspects, the detection, decoding, and executing steps may be performed by an instruction fetch unit, a decoder unit, and an execution unit, respectively, of a processor. In some aspects, the instruction fetch unit routes the fusible set of macro-operations to the same decoder unit from a plurality of available decoder units.

## Claims

### Claim 1

A method for macro-operation fusion, the method comprising:
detecting that a plurality of macro-operations involving a first register is a fusible set of macro-operations comprising a first macro-operation to perform an arithmetic operation using a second register and a second macro-operation to perform the arithmetic operation using an immediate value, wherein the arithmetic operation is addition, the immediate value is one, and the micro-operation adds the second register to the first register while forcing a carry-in bit value to logic 1, or wherein the arithmetic operation is subtraction, the immediate value is one, and the micro-operation subtracts the second register from the first register while forcing a carry-in bit value to logic 1;
decoding the fusible set of macro-operations to one micro-operation that performs functions of the fusible set of macro-operations; and
executing the one micro-operation that performs the functions of the fusible set of macro-operations.

### Claim 2

An apparatus for macro-operation fusion, the apparatus comprising:
an instruction cache for storing macro-operations; and
processing circuitry configured to:
identify, from the macro-operations provided by the instruction cache, a plurality of macro-operations involving a first register as a fusible set of macro-operations comprising a first macro-operation to perform an arithmetic operation using a second register and a second macro-operation to perform the arithmetic operation using an immediate value, wherein the arithmetic operation is addition, the immediate value is one, and the micro-operation adds the second register to the first register while forcing a carry-in bit value to logic 1, or wherein the arithmetic operation is subtraction, the immediate value is one, and the micro-operation subtracts the second register from the first register while forcing a carry-in bit value to logic 1;
decode the fusible set of macro-operations to one micro-operation that performs functions of the fusible set of macro-operations; and
execute the one micro-operation that performs the functions of the fusible set of macro-operations.

### Claim 3 (depends on 2)

The apparatus of claim 2, wherein the processing circuitry comprises:
an execution unit for executing micro-operations;
a plurality of decoder units, each for decoding macro-operations into micro-operations; and
an instruction fetch unit for providing macro-operations from the instruction cache to the plurality of decoder units,
wherein the instruction fetch unit identifies the plurality of macro-operations involving the first register as the fusible set of macro-operations and routes the fusible set of macro-operations to a first decoder unit from the plurality of decoder units,
wherein the first decoder unit decodes the fusible set of macro-operations to the one micro-operation that performs the functions of the fusible set of macro-operations and routes the one micro-operation to the execution unit, and
wherein the execution unit executes the one micro-operation that performs the functions of the fusible set of macro-operations.

### Claim 4

An apparatus for macro-operation fusion, the apparatus comprising:
first means for detecting that a plurality of macro-operations involving a first register is a fusible set of macro-operations comprising a first macro-operation to perform an arithmetic operation using a second register and a second macro-operation to perform the arithmetic operation using an immediate value, wherein the arithmetic operation is addition, the immediate value is one, and the micro-operation adds the second register to the first register while forcing a carry-in bit value to logic 1, or wherein the arithmetic operation is subtraction, the immediate value is one, and the micro-operation subtracts the second register from the first register while forcing a carry-in bit value to logic 1;
second means for decoding the fusible set of macro-operations to one micro-operation that performs functions of the fusible set of macro-operations; and
third means for executing the one micro-operation that performs the functions of the fusible set of macro-operations.

### Claim 5

A non-transitory computer-readable medium storing computer-executable instructions that, when executed by an apparatus, cause the apparatus to:
detect that a plurality of macro-operations involving a first register is a fusible set of macro-operations comprising a first macro-operation to perform an arithmetic operation using a second register and a second macro-operation to perform the arithmetic operation using an immediate value, wherein the arithmetic operation is addition, the immediate value is one, and the micro-operation adds the second register to the first register while forcing a carry-in bit value to logic 1, or wherein the arithmetic operation is subtraction, the immediate value is one, and the micro-operation subtracts the second register from the first register while forcing a carry-in bit value to logic 1;
decode the fusible set of macro-operations to one micro-operation that performs functions of the fusible set of macro-operations; and
execute the one micro-operation that performs the functions of the fusible set of macro-operations.
