# US 2010/0169613 A1 · Translating instructions in a speculative processor

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

- Number: US 2010/0169613 A1
- Document ID: US20100169613A1
- Status: Published application
- Kind: A1
- Application number: 12/720,621
- Filed: 2010-03-09
- Published: 2010-07-01
- Earliest claimed: 1999-10-13
- Assignees: Intellectual Ventures Holding 81 LLC
- Inventors: Linus Torvalds; Robert Bedichek; Stephen Johnson
- Web page: https://patentgrep.com/patent/US20100169613A1

## CPC

- G06F 9/3017: {Runtime instruction translation, e.g. macros}
- G06F 9/30076: {to perform miscellaneous control operations, e.g. NOP}
- G06F 9/30087: {Synchronisation or serialisation instructions}
- G06F 9/3842: {Speculative instruction execution}
- G06F 9/3863: {using multiple copies of the architectural state, e.g. shadow registers}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method for use by a host microprocessor which translates sequences of instructions from a target instruction set for a target processor to sequences of instructions for the host microprocessor including the steps of beginning execution of a speculative sequence of target instructions by committing state of the target processor and storing memory stores previously generated by execution at a point in the execution of instructions at which state of the target processor is known, executing the speculative sequence of host instructions until another point in the execution of target instructions at which state of the target processor is known, rolling back to last committed state of the target processor and discarding the memory stores generated by the speculative sequence of host instructions if execution fails, and beginning execution of a next sequence of target instructions if execution succeeds.

## Claims

### Claim 1

A processor comprising:
means for translating a first sequence of instructions in a target instruction set to a second sequence of instructions in an instruction set of said processor; and
means for executing said second sequence of instructions on said processor,
wherein said means for executing comprises means for speculative execution of branch operations.

### Claim 2 (depends on 1)

The processor of claim 1 wherein said second sequence of instructions is of a bounded length before a commit of said speculative execution occurs.

### Claim 3 (depends on 2)

The processor of claim 2 wherein the length of any sequence of stores which occurs between commit points is limited to the length of the longest individual sequence of said second sequence of instructions in a single translation from the initial point at which the last commit occurred.

### Claim 4 (depends on 3)

The processor of claim 3 wherein all branch operations in said second sequence of instructions are committed.

### Claim 5 (depends on 4)

The processor of claim 4 wherein a locking operation may be started and released without generating a rollback operation.

### Claim 6 (depends on 5)

The processor of claim 5 wherein said second sequence of instructions is executed in sequential order without reordering or optimization subsequent to a locking instruction.

### Claim 7 (depends on 6)

The processor of claim 6 wherein said second sequence of instructions is executed in sequential order without reordering or optimization until execution of said second sequence reaches a branch instruction.

### Claim 8

A processor comprising;
means for accessing a first sequence of instructions in a target instruction set;
means for translating said first sequence of instructions to a second sequence of instructions in an instruction set of said processor;
means for determining if said second sequence of instructions includes a locking operation; and
responsive to a presence of said locking operation, means for placing a commit operation at the beginning of said second sequence of instructions.

### Claim 9 (depends on 8)

The processor of claim 8 further comprising means for executing said second sequence of instructions and said commit operation.

### Claim 10 (depends on 8)

The processor of claim 8 further comprising means for placing a commit operation at the end of said second sequence of instructions responsive to an absence of said locking operation.

### Claim 11 (depends on 10)

The processor of claim 10 further comprising means for executing said second sequence of instructions and said commit operation.

### Claim 12 (depends on 11)

The processor of claim 11 wherein said means for executing comprises means for speculative execution of branch operations.

### Claim 13

A processor for translating a first sequence of instructions in a target instruction set to a second sequence of instructions in an instruction set of said processor, said processor comprising:
circuitry operable to access said first sequence of instructions;
circuitry operable to perform said translating;
circuitry operable to determine if said second sequence of instructions includes a locking operation; and
responsive to a presence of said locking operation, circuitry operable to place a commit operation at the beginning of said second sequence of instructions.

### Claim 14 (depends on 13)

The processor of claim 13 further comprising circuitry operable to execute said second sequence of instructions and said commit operation.

### Claim 15 (depends on 13)

The processor of claim 13 further comprising circuitry operable to place a commit operation at the end of said second sequence of instructions responsive to an absence of said locking operation.

### Claim 16 (depends on 15)

The processor of claim 15 further comprising circuitry operable to execute said second sequence of instructions and said commit operation.

### Claim 17 (depends on 16)

The processor of claim 16 wherein said circuitry operable to execute comprises circuitry operable to speculatively execute branch operations.

### Claim 18

A host processor comprising:
circuitry configured to commit state of a target processor, wherein instructions of said target processor are not directly executable by said host processor, and store memory stores generated by previously-executed sequences of said instructions to produce a known state of said target processor in advance of executing a first sequence of target instructions;
circuitry configured to commit state and store memory stores of said host processor to a known state in advance of executing a speculative sequence of host instructions following a branch from said first sequence of target instructions; circuitry configured to execute said speculative sequence of host instructions until another point in the execution of target instructions at which state of said target processor is known; and
circuitry configured to roll back to a last committed state of said target processor and discarding memory stores generated by the speculative sequence of host instructions if execution fails.

### Claim 19 (depends on 18)

The host processor of claim 18 wherein said speculative sequence of host instructions is of a bounded length before said commit occurs.

### Claim 20 (depends on 18)

The processor of claim 18 further comprising circuitry configured to start and release a locking operation without generating a rollback operation.
