# US 2004/0024997 A1 · Test with immediate and skip processor instruction

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

- Number: US 2004/0024997 A1
- Document ID: US20040024997A1
- Status: Published application
- Kind: A1
- Application number: 10/632,214
- Filed: 2003-07-31
- Published: 2004-02-05
- Earliest claimed: 2002-07-31
- Assignees: Texas Instruments Incorporated
- Inventors: Gerard Chauvel; Serge Lasserre; Dominique D'Inverno
- Web page: https://patentgrep.com/patent/US20040024997A1

## CPC

- G06F 9/30134: {Register stacks; shift registers}
- G06F 9/30072: {to perform conditional operations, e.g. using predicates or guards}
- G06F 9/30167: {of immediate specifier, e.g. constants}
- G06F 9/30181: {Instruction operation extension or modification}
- G06F 9/30189: {according to execution mode, e.g. mode flag}
- G06F 9/30196: {using decoder, e.g. decoder per instruction set, adaptable or programmable decoders}
- G06F 12/0253: {Garbage collection, i.e. reclamation of unreferenced memory}
- G06F 12/0804: with main memory updating (G06F12/0806 takes precedence)
- G06F 12/0891: using clearing, invalidating or resetting means
- G06F 12/126: with special data handling, e.g. priority of data or instructions, handling errors or pinning
- G06F 2212/502: using adaptive policy
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A processor is disclosed herein that may execute an instruction that includes an immediate value and a reference to a register accessible to the processor. The instruction causes the processor to perform a test using the immediate value and the contents of the register referenced in the instruction. Based on the outcome of test, the subsequent instruction is executed or skipped. Further, the instruction includes at least one bit that specifies how the test is to be performed. The bit may specify that the immediate value is to be compared to the register value, or that the immediate value is used to mask the register value and the masked register value has one or more of its bits tested.

## Claims

### Claim 1

A processor executing a plurality of instructions, comprising:
an arithmetic logic unit; and
a plurality of registers coupled to the ALU, each register programmable to store a register value;
wherein said processor executes a test and skip instruction that includes an immediate value and a reference to a register, performs a comparison using the immediate value and the register value stored in the referenced register, and causes the processor to execute or not execute a subsequent instruction that follows the test and skip instruction based on the comparison.

### Claim 2 (depends on 1)

The processor of claim 1 wherein the comparison is performed by comparing the immediate value to the register value in the referenced register.

### Claim 3 (depends on 2)

The processor of claim 2 wherein the processor does not execute the subsequent instruction if the immediate value does not match the register value and executes the subsequent if the immediate value does match the register value.

### Claim 4 (depends on 1)

The processor of claim 1 wherein the comparison is performed by masking the register value in the referenced register with the immediate value and examining one or more bits in the masked version of the referenced register.

### Claim 5 (depends on 4)

The processor of claim 4 wherein the masking is performed by ANDing the immediate value with the register value.

### Claim 6 (depends on 1)

The processor of claim 1 wherein the instruction includes at least one bit that specifies how the comparison is to be performed.

### Claim 7 (depends on 6)

The processor of claim 6 wherein the at least one bit specifies whether the register reference is to a register from a first group of registers or to a register from a second group of registers, and if a register from the first group of registers is specified by said bit, the comparison is performed by comparing the immediate value to the register value, and, if a register from the second group of registers is specified by said bit, the comparison is performed by masking the register value with the immediate value and examining one or more bits in the masked version of the referenced register.

### Claim 8 (depends on 6)

The processor of claim 6 wherein the registers include a status register and if the register reference specified by said at least one bit is not the status register, the comparison is performed by comparing the immediate value to the register value in the referenced register, and, if the register reference specified by said at least one bit is the status register, the comparison is performed by masking the register value in the status register with the immediate value and examining one or more bits in the masked version of the status register.

### Claim 9

A method of executing an instruction having a reference to a register, an immediate value, and a control bit that dictates one of at least two tests, the method comprising:
examining said control bit to determine its state;
if said control bit is in a first state, comparing the immediate value to the contents of the register referenced in the instruction and skipping a subsequent instruction based on the outcome of the comparison; or
if said control is in a second state, masking the contents of the register with the immediate value, testing one or more bits in the masked version of the contents of the register, and skipping a subsequent instruction based on the outcome of the testing.

### Claim 10 (depends on 9)

The method of claim 9 wherein skipping the subsequent instruction comprises replacing the subsequent instruction with a no operation instruction.

### Claim 11

A system, comprising:
a main processor unit; and
a co-processor coupled to said main processor unit, wherein said co-processor executes an instruction that includes an immediate value and a reference to a register accessible to said co-processor, performs a comparison using the immediate value and the register value, and executes or skips a subsequent instruction based on the comparison.

### Claim 12 (depends on 11)

The system of claim 11 wherein the co-processor performs the comparison by comparing the immediate value to the register value in the referenced register.

### Claim 13 (depends on 12)

The system of claim 12 wherein the co-processor does not execute the subsequent instruction if the immediate value does not match the register value and executes the subsequent if the immediate value does match the register value.

### Claim 14 (depends on 11)

The system of claim 11 wherein the co-processor performs the comparison by masking the register value in the referenced register with the immediate value and examining one or more bits in the masked version of the referenced register.

### Claim 15 (depends on 14)

The system of claim 14 wherein the masking is performed by ANDing the immediate value with the register value.

### Claim 16 (depends on 11)

The system of claim 11 wherein the instruction includes at least one bit that specifies how the comparison is to be performed.

### Claim 17 (depends on 16)

The system of claim 16 wherein the bit specifies whether the register reference is to a register from a first group of registers or to a register from a second group of registers, and if a register from the first group of registers is specified by said bit, the comparison is performed by comparing the immediate value to the register value, and, if a register from the second group of registers is specified by said bit, the comparison is performed by masking the register value with the immediate value and examining one or more bits in the masked version of the referenced register.

### Claim 18 (depends on 11)

The system of claim 11 further comprising wireless communication circuitry and said system comprises a cell phone.

### Claim 19

A programmable logic device comprising;
control logic; and
a means for decoding an instruction that includes an immediate value and a reference to a register for performing a comparison using the immediate value and a register value stored in the referenced register, and for causing the processor to execute or not execute a subsequent instruction that follows the instruction based on the comparison.

### Claim 20 (depends on 19)

The system of claim 19 including means for comparing the immediate value to the register value in the referenced register.
