# US 2015/0178085 A1 · System, method, and computer program product for remapping registers based on a change in execution mode

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

- Number: US 2015/0178085 A1
- Document ID: US20150178085A1
- Status: Published application
- Kind: A1
- Application number: 14/137,842
- Filed: 2013-12-20
- Published: 2015-06-25
- Earliest claimed: 2013-12-20
- Assignees: NVIDIA Corporation
- Applicants: NVIDIA Corporation
- Inventors: Ben Hertzberg; Guillermo Juan Rozas; Alexander Christian Klaiber; Nickolas Andrew Fortino
- Web page: https://patentgrep.com/patent/US20150178085A1

## CPC

- G06F 9/30189: {according to execution mode, e.g. mode flag}
- G06F 9/30109: {having multiple operands in a single register}
- G06F 9/384: {Register renaming}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system, method, and computer program product are provided for remapping registers based on a change in execution mode. A sequence of instructions is received for execution by a processor and a change in an execution mode from a first execution mode to a second execution mode within the sequence of instructions is identified, where a first register mapping is associated with the first execution mode and a second register mapping is associated with the second execution mode. Data stored in a set of registers within a processor is reorganized based on the first register mapping and the second register mapping in response to the change in the execution mode.

## Claims

### Claim 1

A method comprising,
receiving a sequence of instructions for execution by a processor;
identifying a change in an execution mode from a first execution mode to a second execution mode within the sequence of instructions, wherein a first register mapping is associated with the first execution mode and a second register mapping is associated with the second execution mode; and
reorganizing data stored in a set of registers within a processor based on the first register mapping and the second register mapping in response to the change in the execution mode, wherein the first execution mode is used to perform vector operations on the data stored in the set of registers and the second execution mode is used to perform scalar operations on the data stored in the set of registers.

### Claim 2 (depends on 1)

The method of claim 1, further comprising executing, by a processor, the sequence of instructions.

### Claim 3 (depends on 2)

The method of claim 2, further comprising:
identifying a second change in the execution mode within the sequence of instructions from the second execution mode to the first execution mode; and
reorganizing the data stored in the set of registers within the processor based on the first register mapping and the second register mapping in response to the second change in the execution mode.

### Claim 4 (depends on 1)

The method of claim 1, wherein the reorganizing comprises inserting at least one instruction into the sequence of instructions to copy data from a first register in the set of registers to a second register in the set of registers.

### Claim 5 (depends on 1)

The method of claim 1, wherein the reorganizing comprises inserting at least one instruction into the sequence of instructions to move data from a first portion of a first register in the set of registers to a second portion of the first register.

### Claim 6 (depends on 1)

The method of claim 1, wherein the reorganizing comprises inserting at least one instruction into the sequence of instructions indicating the change in the execution mode.

### Claim 7 (depends on 1)

The method of claim 1, wherein the scalar operations are 32-bit floating point scalar operations.

### Claim 8 (depends on 1)

The method of claim 1, wherein the scalar operations are 64-bit floating point scalar operations.

### Claim 9 (depends on 1)

The method of claim 1 wherein the vector operations are 128-bit floating point vector operations.

### Claim 10 (depends on 1)

The method of claim 1, wherein the reorganizing comprises:
writing a first portion of the data that is stored in a first subset of registers within the set of registers in a second subset of registers within the set of registers; and
writing a second portion of the data to the first subset of registers.

### Claim 11 (depends on 1)

The method of claim 1, wherein a first subset of registers within the set of registers stores the data organized according to the first register mapping and a second subset of registers within the set of registers stores the data organized according to the second register mapping.

### Claim 12 (depends on 1)

The method of claim 1, wherein the identifying the change in the execution mode is performed by a loader associated with the processor.

### Claim 13 (depends on 1)

The method of claim 1, wherein the identifying the change in the execution mode is performed by circuitry within the processor.

### Claim 14 (depends on 1)

The method of claim 1, wherein the identifying the change in the execution mode comprises tracking the execution mode for each instruction in the sequence of instructions.

### Claim 15 (depends on 1)

The method of claim 1, further comprising monitoring latency incurred for the reorganizing of the data and a number of register accesses between changes in the execution mode.

### Claim 16 (depends on 15)

The method of claim 15, further comprising:
determining that the number of register accesses is less than a threshold value;
reorganizing a portion of the data stored in registers specified as operands of a first instruction associated with the second execution mode;
executing the first instruction; and
reorganizing the portion of the data stored in the registers according to the first execution mode.

### Claim 17

A non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to perform steps comprising:
receiving a sequence of instructions for execution by a processor;
identifying a change in an execution mode from a first execution mode to a second execution mode within the sequence of instructions, wherein a first register mapping is associated with the first execution mode and a second register mapping is associated with the second execution mode; and
reorganizing data stored in a set of registers within a processor based on the first register mapping and the second register mapping at the change in the execution mode, wherein the first execution mode is used to perform vector operations on the data stored in the set of registers and the second execution mode is used to perform scalar operations on the data stored in the set of registers.

### Claim 18

A system comprising:
a memory storing a sequence of instructions; and
a processor that is coupled to the memory and configured to:
receive the sequence of instructions for execution;
identify a change in an execution mode from a first execution mode to a second execution mode within the sequence of instructions, wherein a first register mapping is associated with the first execution mode and a second register mapping is associated with the second execution mode; and
reorganize data stored in a set of registers within the processor based on the first register mapping and the second register mapping in response to the change in the execution mode, wherein the first execution mode is used to perform vector operations on the data stored in the set of registers and the second execution mode is used to perform scalar operations on the data stored in the set of registers.

### Claim 19 (depends on 18)

The system of claim 18, wherein the processor is further configured to identify a second change in the execution mode within the sequence of instructions from the second execution mode to the first execution mode; and
reorganize the data stored in the set of registers within the processor based on the first register mapping and the second register mapping in response to the second change in the execution mode.

### Claim 20 (depends on 18)

The system of claim 18, wherein the processor is further configured to insert at least one instruction into the sequence of instructions to copy data from a first register in the set of registers to a second register in the set of registers.
