# US 2015/0178076 A1 · Processor with virtualized instruction set architecture & methods

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

- Number: US 2015/0178076 A1
- Document ID: US20150178076A1
- Status: Published application
- Kind: A1
- Application number: 14/572,186
- Filed: 2014-12-16
- Published: 2015-06-25
- Earliest claimed: 2013-12-20
- Assignees: Imagination Technologies Limited
- Applicants: Imagination Technologies Limited
- Inventors: Ranganathan Sudhakar
- Web page: https://patentgrep.com/patent/US20150178076A1

## CPC

- G06F 9/3016: {Decoding the operand specifier, e.g. specifier format}
- G06F 9/30098: {Register arrangements}
- G06F 9/30145: {Instruction analysis, e.g. decoding, instruction word fields}
- G06F 9/30156: {Special purpose encoding of instructions, e.g. Gray coding}
- G06F 9/30181: {Instruction operation extension or modification}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A processor comprises a decoder for decoding an instruction based both on an explicit opcode identifier and on metadata encoded in the instruction. For example, a relative order of source register names may be used to decode the instruction. As an example, an instruction set may have a Branch Equal (BEQ) specifying two registers (r1 and r2) that store values that are compared for equality. An instruction set can provide a single opcode identifier for BEQ and a processor can determine whether to decode a particular instance of that opcode identifier as BEQ or another instruction, in dependence on an order of appearance of the source registers in that instance. For example, the BEQ opcode can be interpreted as a branch not equal, if a higher numbered register appears before a lower numbered register. Additional forms of metadata can include interpreting a constant included in an instruction, as well as determining equality of source registers, among other forms of metadata.

## Claims

### Claim 1

A decode unit for a processor, comprising:
an input for an element of machine code representing an instruction; and
circuitry configured to
determine whether an opcode identifier portion of the element of machine code identifies a virtually encoded instruction,
responsive to the opcode identifier portion identifying a virtually-encoded instruction, using both the opcode identifier portion and at least part of a remaining portion of the element of machine code to decode the element of machine code into data defining an executable operation for execution on an execution unit coupled with the decode unit, and
otherwise decoding the element of machine code into data defining an executable operation using the opcode identifier portion of the element of machine code.

### Claim 2 (depends on 1)

The decode unit for a processor of claim 1, wherein the opcode identifier portion of the element of machine code comprises a portion identifying a type of operation and a portion defining functional parameters relevant for the type of operation.

### Claim 3 (depends on 1)

The decode unit for a processor of claim 1, wherein the determination whether the opcode identifier identifies a virtually encoded instruction is performed by decoding the opcode identifier portion of data representing the element of machine code.

### Claim 4 (depends on 1)

The decode unit for a processor of claim 1, wherein the element of machine code comprises identifying data for two or more elements, selected from an ordered set, and the circuitry is further configured to determine, using a relative order in which the identifying data for the two or more elements appears in the element of machine code, an operation to be executed in response to the element of machine code.

### Claim 5 (depends on 1)

The decode unit for a processor of claim 1, wherein the element of machine code comprises a pre-defined relative order of fields dedicated to at least a part of the opcode identifier portion, and two or more registers and the circuitry is configured to decode the element of machine code into two different executable operations, in dependence on whether a number associated with a first-appearing register in the pre-defined relative order of fields is larger or smaller than a number associated with a second-appearing register in the pre-defined relative order of fields.

### Claim 6 (depends on 1)

The decode unit for a processor of claim 1, wherein the element of machine code comprises a pre-defined relative order of fields dedicated to at least a part of the opcode identifier portion, identifiers for two or more registers, and a constant, and the circuitry is configured to decode the element of machine code into two different executable operations, in dependence on whether a relative position of an identifier for one of the two or more registers is before or after a relative position of an identifier of another of the two or more registers, within an ordered set of possible identifiers.

### Claim 7 (depends on 1)

The decode unit for a processor of claim 1, wherein the element of machine code comprises fields dedicated to the opcode identifier portion, two registers, and a constant, and the circuitry is configured to decode the element of machine code using a value of the constant, responsive to an identifier associated with one of the two registers being the same as an identifier number associated with the other of the two registers.

### Claim 8

A processor, comprising:
an execution unit;
a register set coupled with the execution unit, the execution unit configured to receive operands from registers within the register set; and
an instruction decoder configured to translate a single element of machine code into a selected operation from a plurality of virtually-encoded operations, to be performed by the execution unit, responsive to the single element of machine code, using both an opcode identifier in the single element of machine code and metadata about the single element of machine code.

### Claim 9 (depends on 8)

The processor of claim 8, wherein the metadata comprises a relative order in which two or more discrete elements appear in the single element of machine code, compared with a relative order in which those two or more discrete elements appear in a canonical ordering of a set of elements.

### Claim 10 (depends on 8)

The processor of claim 8, wherein the single element of machine code identifies respective numbers of two or more source registers and the metadata comprises determining a relative order in which those two or more source registers are identified.

### Claim 11 (depends on 8)

The processor of claim 8, wherein the single element of machine code identifies respective numbers of two or more source registers and the metadata comprises determining whether both of the two or more source registers identify the same register number.

### Claim 12 (depends on 8)

The processor of claim 8, wherein the instruction decoder is configured to decode the single element of machine code in dependence on whether a first register identified in the element of machine code is greater than or less than a second register identified in the element of machine code.

### Claim 13 (depends on 8)

The processor of claim 8, wherein the single element of machine code specifies both a first register and a second register from a set of architecture registers.

### Claim 14 (depends on 8)

The processor of claim 8, wherein the instruction decoder is configured to decode the single element of machine code into a branch instruction that is either conditional or unconditional, in dependence on portions of the element of machine code that specify each of a first register and a second register.

### Claim 15 (depends on 8)

The processor of claim 8, wherein the instruction decoder is configured to decode the single element of machine code into a branch instruction and to further decode the branch instruction into a branch if equal or a branch if not equal, in dependence on portions of the element of machine code that specify each of a first register and a second register.

### Claim 16 (depends on 8)

The processor of claim 8, wherein the instruction decoder is configured to decode the single element of machine code into an arithmetic instruction, to further decode the single element of machine code into an arithmetic instruction that either performs the arithmetic instruction and a further action on a specified condition arising from performing the arithmetic instruction or an instruction that performs the arithmetic instruction and ignores the specified condition.

### Claim 17

A method of decoding machine code in a processor, comprising:
receiving a element of machine code in a decode unit of the processor, and
producing data indicating an operation to be executed by the processor, wherein the operation is from a set of virtually-encoded operations, wherein which operation is indicated by the produced data depends both on an opcode identifier in the single element of machine code and metadata about the single element of machine code.

### Claim 18 (depends on 17)

The method of decoding machine code in a processor of claim 17, wherein the opcode identifier portion in the element of machine code comprises a portion identifying a type of operation and a portion defining functional parameters relevant for the type of operation, and the producing data indicating the operation comprises using the portion identifying the type of operation to determine whether the single element of machine code indicates a virtually-encoded operation.

### Claim 19 (depends on 17)

The method of decoding machine code in a processor of claim 17, wherein the element of machine code comprises identifying data for two or more elements, selected from an ordered set, and further comprising determining, using a relative order in which the identifying data for the two or more elements appears in the element of machine code, an operation to be executed in response to the element of machine code.

### Claim 20 (depends on 17)

The method of decoding machine code in a processor of claim 17, wherein the element of machine code comprises a pre-defined relative order of fields dedicated to at least a part of the opcode identifier portion, two or more registers, and a constant, and further comprising decoding the element of machine code into two different executable operations, in dependence on whether a number associated with a first-appearing register is larger or smaller than a number associated with the second-appearing register.

### Claim 21 (depends on 17)

The method of decoding machine code in a processor of claim 17, wherein the element of machine code comprises a pre-defined relative order of fields dedicated to at least a part of the opcode identifier portion, two or more registers, and a constant, and further comprising decoding the element of machine code into two different executable operations, in dependence on whether a relative position of an identifier for a one of the two or more registers is before or after a relative position of an identifier of another of the two or more registers, within an ordered set of possible identifiers.

### Claim 22

The method of decoding machine code in a processor of claim Error! Reference source not found., wherein the element of machine code comprises fields dedicated to the opcode identifier portion, two registers, and a constant, and further comprising decoding the element of machine code using a value of the constant, responsive to an identifier associated with one of the two registers being the same as an identifier number associated with the other of the two registers.
