# US 6,732,258 B1 · IP relative addressing

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

- Number: US 6,732,258 B1
- Document ID: US6732258B1
- Status: Granted
- Kind: B1
- Application number: 09/824,899
- Filed: 2001-04-02
- Granted: 2004-05-04
- Earliest claimed: 2000-08-09
- Assignees: Advanced Micro Devices, Inc.
- Inventors: Kevin J. McGrath; David S. Christie
- Web page: https://patentgrep.com/patent/US6732258B1

## CPC

- G06F 9/355: Indexed addressing
- G06F 9/30181: {Instruction operation extension or modification}
- G06F 9/30185: {according to one or more bits in the instruction, e.g. prefix, sub-opcode}
- G06F 9/30189: {according to execution mode, e.g. mode flag}
- G06F 9/342: {Extension of operand address space}
- G06F 9/3557: {using program counter as base address}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A processor supports instruction pointer (IP) relative addressing in at least one operating mode of the processor. For example, in some implementations, IP relative addressing is supported in an operating mode or modes in which the address size is greater than 32 bits (e.g. up to 64 bits). In some embodiments, the displacement may be limited to less than the address size (e.g. 32 bits, in one implementation) when such operating modes are active. Code density may be higher than if the displacements were expanded, and flexibility in the placement of variables in memory may be achieved. For example, static variables may be placed in memory with flexibility, and IP relative addressing may be used to locate the static variables.

## Claims

### Claim 1

A processor comprising:
a register configured to store an instruction pointer; and
an execution core coupled to receive an instruction and an operating mode indication indicative of one of a plurality of operating modes of the processor, wherein the execution core is configured, responsive to a first encoding of an addressing mode byte of the instruction and a first operating mode of the plurality of operating modes, to include the instruction pointer as an address operand of the instruction, and wherein the execution core is configured, responsive to a second operating mode of the plurality of operating modes and the first encoding, to include only a displacement as the address operand of the instruction, wherein the first encoding of the addressing mode byte is indicative that the instruction does not include a scale-index-base (SIB) byte.

### Claim 2 (depends on 1)

The processor as recited in claim 1 wherein, in the first operating mode, the execution core is configured to include address operands consisting of the displacement and the instruction pointer for the instruction.

### Claim 3 (depends on 1)

The processor as recited in claim 1 wherein, in the first operating mode, a virtual address size is greater than 32 bits.

### Claim 4 (depends on 1)

The processor as recited in claim 1 wherein the addressing mode byte includes a mod field, a reg field, and a r/m field, and wherein the first encoding comprises the mod field being 00 in binary and the r/m field being 101 in binary.

### Claim 5

An apparatus comprising:
a storage location for storing an instruction pointer; and
a processor coupled to the storage location, wherein the processor is configured, responsive to a first encoding of an addressing mode byte of an instruction and a first operating mode of a plurality of operating modes, to include the instruction pointer as an address operand of the instruction, and wherein the processor is configured, responsive to a second operating mode of the plurality of operating modes and the first encoding, to include only a displacement as the address operand of the instruction, wherein the first encoding of the addressing mode byte is indicative that the instruction does not include a scale-index-base (SIB) byte.

### Claim 6 (depends on 5)

The apparatus as recited in claim 5 wherein, in the first operating mode, the processor is configured to include address operands consisting of the displacement and the instruction pointer for the instruction.

### Claim 7 (depends on 5)

The apparatus as recited in claim 5 wherein, in the first operating mode, a virtual address size is greater than 32 bits.

### Claim 8 (depends on 5)

The apparatus as recited in claim 5 wherein the addressing mode byte includes a mod field, a reg field, and a r/m field, and wherein the first encoding comprises the mod field being 00 in binary and the r/m field being 101 in binary.

### Claim 9

A method comprising:
including an instruction pointer as an address operand of an instruction responsive to a first encoding of an addressing mode byte of the instruction and a first operating mode of a plurality of operating modes of a processor, wherein the first encoding of the addressing mode byte is indicative that the instruction does not include a scale-index-base (SIB) byte; and
including only a displacement as the address operand of the instruction responsive to the first encoding of the addressing mode byte and a second operating mode of the plurality of operating modes.

### Claim 10 (depends on 9)

The method as recited in claim 9 wherein, in the first operating mode, the address operands consist of the displacement and the instruction pointer for the instruction.

### Claim 11 (depends on 9)

The method as recited in claim 9 wherein, in the first operating mode, a virtual address size is greater than 32 bits.

### Claim 12 (depends on 9)

The method as recited in claim 9 wherein the addressing mode byte includes a mod field, a reg field, and a r/m field, and wherein the first encoding comprises the mod field being 00 in binary and the r/m field being 101 in binary.
