# US 11,307,855 B2 · Register-provided-opcode instruction

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

- Number: US 11,307,855 B2
- Document ID: US11307855B2
- Status: Granted
- Kind: B2
- Application number: 17/096,014
- Filed: 2020-11-12
- Published: 2021-05-27
- Granted: 2022-04-19
- Earliest claimed: 2019-11-26
- Assignees: Arm Limited
- Applicants: Arm Limited
- Inventors: John Michael Horley; Simon John Craske
- Web page: https://patentgrep.com/patent/US11307855B2

## CPC

- G06F 9/30101: {Special purpose registers}
- G06F 9/30072: {to perform conditional operations, e.g. using predicates or guards}
- G06F 9/30145: {Instruction analysis, e.g. decoding, instruction word fields}
- G06F 9/30181: {Instruction operation extension or modification}
- G06F 9/30189: {according to execution mode, e.g. mode flag}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Instructions have an opcode and at least one data operand, the opcode identifying a data processing operation to perform on the at least one data operand. For a register-provided-opcode instruction specifying at least one source register, at least part of the opcode is a register-provided opcode represented by a first portion of data stored in said at least one source register of the register-provided-opcode instruction, and the at least one data operand comprises data represented by a second portion of the data stored in the at least one source register. The register-provided opcode is used to select between different data processing operations supported for the same instruction encoding of the register-provided-opcode instruction.

## Claims

### Claim 1

An apparatus comprising:
a plurality of registers to store data;
processing circuitry to perform data processing using data obtained from the registers; and
an instruction decoder to decode an instruction specifying an opcode and at least one data operand, to control the processing circuitry to perform a data processing operation identified by the opcode on the at least one data operand, to generate a result value to be written to a destination register;
in which for a register-provided-opcode instruction specifying at least one source register:
at least part of the opcode is a register-provided opcode represented by a first portion of data stored in said at least one source register of the register-provided-opcode instruction;
the at least one data operand comprises data represented by a second portion of the data stored in the at least one source register;
in response to the register-provided-opcode instruction, the instruction decoder is configured to control the processing circuitry to select, based on at least the register-provided opcode, one of a plurality of different data processing operations supported for the same instruction encoding of the register-provided-opcode instruction; and
said plurality of different data processing operations include at least two different data processing operations which are each capable, for at least a subset of possible input values for said at least one data operand, of generating the result value with a different value or a different data format to said at least one data operand.

### Claim 2 (depends on 1)

The apparatus according to claim 1, in which the at least two different data processing operations comprise at least two different transformation functions for generating the result value from the at least one data operand.

### Claim 3 (depends on 2)

The apparatus according to claim 2, in which each of said at least two different transformation functions comprises a different subset or combination of one or more of:
at least one arithmetic operator;
at least one logical operator;
at least one shift operator; and
at least one data format conversion operator.

### Claim 4 (depends on 1)

The apparatus according to claim 1, in which the registers comprise at least two register files; and
the at least two different data processing operations comprise operations which use different register files to provide at least one source register for storing the at least one data operand or the destination register for storing the result value.

### Claim 5 (depends on 1)

The apparatus according to claim 1, wherein the register-provided opcode is represented by data stored in at least part of a general purpose register specified as one of said at least one source register.

### Claim 6 (depends on 5)

The apparatus according to claim 5, in which the register-provided-opcode instruction specifies a plurality of source registers,
the at least one data operand is represented by data stored in one or more of said source registers other than said general purpose register used to provide the register-provided opcode, and
the at least one data operand is independent of data in said general purpose register used to provide the register-provided opcode.

### Claim 7 (depends on 1)

The apparatus according to claim 1, in which the registers comprise a condition status register to store at least one condition indicator;
in response to a conditional instruction, the instruction decoder is configured to control the processing circuitry to perform a conditional operation which is conditional on whether the at least one condition indicator satisfies a test condition specified by the conditional instruction; and
the register-provided opcode is represented by at least part of the at least one condition indicator stored in the condition status register.

### Claim 8 (depends on 7)

The apparatus according to claim 7, in which the condition status register is configured to store a plurality of condition indicators, and the register-provided opcode is represented by all of said plurality of condition indicators.

### Claim 9 (depends on 7)

The apparatus according to claim 7, in which the condition status register is configured to store a plurality of condition indicators; and
the register-provided opcode is represented by a first subset of said plurality of condition indicators.

### Claim 10 (depends on 9)

The apparatus according to claim 9, in which the register-provided-opcode instruction is a conditional register-provided-opcode instruction for which, for at least one of the plurality of different data processing operations, the data processing operation is conditional on whether a remaining subset of said plurality of condition indicators satisfy a test condition specified by the conditional register-provided-opcode instruction.

### Claim 11 (depends on 7)

The apparatus according to claim 7, in which in response to a condition-setting instruction, the instruction decoder is configured to control the processing circuitry to perform the data processing operation represented by the opcode of the condition-setting instruction and to update the at least one condition indicator stored in the condition status register based on a property of a result of performing that data processing operation.

### Claim 12 (depends on 7)

The apparatus according to claim 7, comprising a program counter register to store a program counter indicative of an instruction address representing a current point of program execution;
for a given instruction other than said register-provided-opcode instruction, when a source register identifier specified by the given instruction has a predetermined program-counter-register-indicating value, the at least one data operand for the given instruction includes the program counter stored in the program counter register; and
when the register-provided-opcode instruction specifies a source register identifier having said predetermined program-counter-register-indicating value, said at least one source register includes the condition status register.

### Claim 13 (depends on 1)

The apparatus according to claim 1, in which the register-provided-opcode instruction specifies a plurality of source register identifiers indicating a plurality of source registers, and the register-provided opcode is stored in at least one of the plurality of source registers.

### Claim 14 (depends on 1)

The apparatus according to claim 1, in which an instruction encoding of the register-provided-opcode instruction also specifies an immediate value representing another part of the opcode of the register-provided-opcode instruction; and
in response to the register-provided-opcode instruction, the processing circuitry is configured to select the selected data processing operation in dependence on both the immediate value and the register-provided opcode.

### Claim 15 (depends on 1)

The apparatus according to claim 1, in which, for a non-register-provided-opcode instruction specifying at least one source register:
the opcode is represented by a portion of the instruction encoding of the non-register-provided opcode instruction; and
the data in the at least one source register is used as the at least one data operand and is not used as part of the opcode; and
the register-provided-opcode instruction and the non-register-provided opcode instruction have different encodings for said portion of the instruction encoding.

### Claim 16 (depends on 1)

The apparatus according to claim 1, in which part of the opcode of each instruction is specified by an instruction-encoded opcode represented in a predetermined portion of the instruction encoding;
none of a first subset of instructions having a first subset of values for the instruction-encoded opcode is said register-provided-opcode instruction; and
for a second subset of instructions having a second subset of values for the instruction-encoded opcode, an immediate value specified in another portion of the instruction encoding from the instruction-encoded opcode specifies a further part of the opcode, and the register-provided-opcode instruction is one of said second subset of instructions for which the instruction-encoded opcode and the immediate value have one of a predetermined subset of values.

### Claim 17 (depends on 1)

The apparatus according to claim 1, in which the processing circuitry is configured to process instructions according to a given instruction set architecture; and
the register-provided-opcode instruction is a custom instruction having an encoding defined in the given instruction set architecture, for which the plurality of data processing operations comprise implementation-specific custom data processing operations not prescribed by the given instruction set architecture.

### Claim 18 (depends on 17)

The apparatus according to claim 17, in which whether a given encoding of said custom instruction is decoded as the register-provided-opcode instruction or as a non-register-provided-opcode instruction is not prescribed by the given instruction set architecture.

### Claim 19

A data processing method comprising:
decoding an instruction specifying an opcode and at least one data operand, to control processing circuitry to perform a data processing operation identified by the opcode on the at least one data operand, to generate a result value to be written to a destination register; and
when the decoded instruction is a register-provided-opcode instruction specifying at least one source register:
at least part of the opcode is a register-provided opcode represented by a first portion of data stored in the at least one source register of the register-provided-opcode instruction;
the at least one data operand comprises data represented by a second portion of the data stored in the at least one source register;
in response to the register-provided-opcode instruction, the processing circuitry selects, based on at least the register-provided opcode, one of a plurality of different data processing operations supported for the same instruction encoding of the register-provided-opcode instruction; and
said plurality of different data processing operations include at least two different data processing operations which are each capable, for at least a subset of possible input values for said at least one data operand, of generating the result value with a different value or a different data format to said at least one data operand.

### Claim 20

A non-transitory, computer-readable storage medium storing a computer program, which when executed by a host data processing apparatus, causes the host data processing apparatus to simulate processing of a target program by target processing circuitry, the computer program comprising:
register emulating program logic to maintain a register emulating data structure emulating a plurality of registers of the target processing circuitry; and
instruction decoding program logic to decode an instruction of the target program specifying an opcode and at least one data operand, to control the host data processing apparatus to perform a data processing operation identified by the opcode on the at least one data operand, to generate a result value to be written to part of the register emulating data structure corresponding to a destination register of said plurality of registers;
in which for a register-provided-opcode instruction specifying at least one source register:
at least part of the opcode is a register-provided opcode represented by a first portion of data corresponding to the at least one source register of the register-provided-opcode instruction;
the at least one data operand comprises data represented by a second portion of the data corresponding to the at least one source register;
in response to the register-provided-opcode instruction, the instruction decoding program logic is configured to control the host data processing apparatus to select, based on at least the register-provided opcode, one of a plurality of different data processing operations supported for the same instruction encoding of the register-provided-opcode instruction; and
said plurality of different data processing operations include at least two different data processing operations which are each capable, for at least a subset of possible input values for said at least one data operand, of generating the result value with a different value or a different data format to said at least one data operand.
