# US 2012/0260042 A1 · Load multiple and store multiple instructions in a microprocessor that emulates banked registers

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

- Number: US 2012/0260042 A1
- Document ID: US20120260042A1
- Status: Published application
- Kind: A1
- Application number: 13/413,314
- Filed: 2012-03-06
- Published: 2012-10-11
- Earliest claimed: 2011-04-07
- Assignees: VIA Technologies, Inc.
- Inventors: G. Glenn Henry; Terry Parks; Rodney E. Hooker
- Web page: https://patentgrep.com/patent/US20120260042A1

## CPC

- G06F 9/22: Microcontrol or microprogram arrangements
- G06F 9/3017: {Runtime instruction translation, e.g. macros}
- G06F 9/30174: {for non-native instruction set, e.g. Javabyte, legacy code}
- G06F 9/30189: {according to execution mode, e.g. mode flag}
- G06F 12/0875: with dedicated cache, e.g. instruction or stack
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A microprocessor supports an instruction set architecture that specifies: processor modes, architectural registers associated with each mode, and a load multiple instruction that instructs the microprocessor to load data from memory into specified ones of the registers. Direct storage holds data associated with a first portion of the registers and is coupled to an execution unit to provide the data thereto. Indirect storage holds data associated with a second portion of the registers and cannot directly provide the data to the execution unit. Which architectural registers are in the first and second portions varies dynamically based upon the current processor mode. If a specified register is currently in the first portion, the microprocessor loads data from memory into the direct storage, whereas if in the second portion, the microprocessor loads data from memory into the direct storage and then stores the data from the direct storage to the indirect storage.

## Claims

### Claim 1

A microprocessor that supports an instruction set architecture that specifies a plurality of processor modes and that specifies architectural registers associated with each of the plurality of processor modes and that specifies a load multiple instruction that instructs the microprocessor to load data from memory into one or more of the architectural registers specified by the load multiple instruction, the microprocessor comprising:
direct storage, that holds data associated with a first portion of the architectural registers and that is coupled to at least one execution unit of the microprocessor to provide the data to the execution unit;
indirect storage, that holds data associated with a second portion of the architectural registers, wherein the indirect storage is incapable of directly providing the data associated with the second portion of the architectural registers to the at least one execution unit;
wherein which of the architectural registers are in the first and second portions varies dynamically based upon the current processor mode of the plurality of processor modes; and
wherein for each of the architectural registers specified by the load multiple instruction:
if the architectural register is currently in the first portion, the microprocessor loads data from memory into the direct storage; and
if the architectural register is currently in the second portion, the microprocessor loads data from memory into the direct storage and then stores the data from the direct storage to the indirect storage.

### Claim 2 (depends on 1)

The microprocessor of claim 1, wherein instruction set architecture supported by the microprocessor comprises the Advanced RISC Machines (ARM) instruction set architecture (ISA), wherein the plurality of processor modes specified by the ISA comprises the ARM ISA User, System, Supervisor, Abort, Undefined, IRQ, and FIQ processor modes, wherein the architected registers specified by the ISA comprise the ARM ISA R0-R14 registers associated with the User processor mode and banked registers associated with the Supervisor, Abort, Undefined, IRQ, and FIQ processor modes, wherein the load multiple instruction specified by the ISA comprises the ARM ISA Load Multiple (LDM) instruction.

### Claim 3 (depends on 1)

The microprocessor of claim 1, further comprising:
an instruction translator, that translates the load multiple instruction into microinstructions executable by the microprocessor, wherein for each of the architectural registers specified by the load multiple instruction:
if the architectural register is currently in the first portion, the instruction translator emits a microinstruction to load the data from memory into the direct storage; and
if the architectural register is currently in the second portion, the instruction translator emits a first microinstruction to load the data from memory into the direct storage and emits a second microinstruction to store the data from the direct storage to the indirect storage.

### Claim 4 (depends on 3)

The microprocessor of claim 3, wherein the instruction translator comprises:
a first portion that emits the microinstruction to load data from memory into the direct storage and that emits the first microinstruction to load data from memory into the direct storage, wherein the first portion comprises a hardware state machine; and
a second portion that emits the second microinstruction to store the data from the direct storage to the indirect storage, wherein the second portion comprises microcode.

### Claim 5 (depends on 3)

The microprocessor of claim 3, wherein the hardware instruction translator translates instructions of x86 ISA machine language programs and ARM ISA machine language programs into the microinstructions, wherein the microinstructions are encoded in a distinct manner from the manner in which the instructions defined by the instruction sets of the x86 ISA and ARM ISA are encoded, wherein the microprocessor further comprises:
an execution pipeline, coupled to the hardware instruction translator, wherein the execution pipeline executes the microinstructions to generate results defined by the x86 ISA and ARM ISA instructions.

### Claim 6 (depends on 1)

The microprocessor of claim 1,
wherein if the current processor mode is the ARM ISA User mode then the direct storage holds data associated with the User mode architectural registers, and the indirect storage holds data associated with the R13-R14 architectural registers of the ARM ISA exception modes and the R8-R12 architectural registers of the ARM ISA FIQ mode;
wherein if the current processor mode is the ARM ISA FIQ mode then the direct storage holds data associated with the FIQ mode architectural registers, and the indirect storage holds data associated with the R13-R14 architectural registers of the ARM ISA User mode and non-FIQ exception modes and the R8-R12 architectural registers of the ARM ISA mode previous to the current mode;
wherein if the current processor mode is an ARM ISA non-FIQ exception mode then the direct storage holds data associated with the non-FIQ exception mode architectural registers, and the indirect storage holds data associated with the R13-R14 architectural registers of the ARM ISA User mode and non-current exception mode and the R8-R12 architectural registers of the ARM ISA FIQ mode.

### Claim 7

A method for operating a microprocessor that supports an instruction set architecture that specifies a plurality of processor modes and that specifies architectural registers associated with each of the plurality of processor modes and that specifies a load multiple instruction that instructs the microprocessor to load data from memory into one or more of the architectural registers specified by the load multiple instruction, the method comprising:
for each of the architectural registers specified by the load multiple instruction:
if the architectural register is currently in the first portion, loading data from memory into direct storage of the microprocessor; and
if the architectural register is currently in the second portion, loading data from memory into the direct storage and then storing the data from the direct storage to the indirect storage;
wherein the direct storage holds data associated with a first portion of the architectural registers and is coupled to at least one execution unit of the microprocessor to provide the data to the execution unit;
wherein the indirect storage holds data associated with a second portion of the architectural registers, wherein the indirect storage is incapable of directly providing the data associated with the second portion of the architectural registers to the at least one execution unit;
wherein the architectural registers in the first and second portions vary dynamically based upon the current processor mode of the plurality of processor modes.

### Claim 8 (depends on 7)

The method of claim 7, wherein instruction set architecture supported by the microprocessor comprises the Advanced RISC Machines (ARM) instruction set architecture (ISA), wherein the plurality of processor modes specified by the ISA comprises the ARM ISA User, System, Supervisor, Abort, Undefined, IRQ, and FIQ processor modes, wherein the architected registers specified by the ISA comprise the ARM ISA R0-R14 registers associated with the User processor mode and banked registers associated with the Supervisor, Abort, Undefined, IRQ, and FIQ processor modes, wherein the load multiple instruction specified by the ISA comprises the ARM ISA Load Multiple (LDM) instruction.

### Claim 9 (depends on 7)

The method of claim 7, further comprising:
translating the load multiple instruction into microinstructions executable by the microprocessor, wherein for each of the architectural registers specified by the load multiple instruction:
if the architectural register is currently in the first portion, emitting a microinstruction to load the data from memory into the direct storage; and
if the architectural register is currently in the second portion, emitting a first microinstruction to load the data from memory into the direct storage and emitting a second microinstruction to store the data from the direct storage to the indirect storage.

### Claim 10 (depends on 9)

The method of claim 9, wherein said emitting the microinstruction to load the data from memory into the direct storage is performed by a hardware state machine, wherein said emitting the second microinstruction to store the data from the direct storage to the indirect storage is performed by microcode.

### Claim 11 (depends on 7)

The method of claim 7,
wherein if the current processor mode is the ARM ISA User mode then the direct storage holds data associated with the User mode architectural registers, and the indirect storage holds data associated with the R13-R14 architectural registers of the ARM ISA exception modes and the R8-R12 architectural registers of the ARM ISA FIQ mode;
wherein if the current processor mode is the ARM ISA FIQ mode then the direct storage holds data associated with the FIQ mode architectural registers, and the indirect storage holds data associated with the R13-R14 architectural registers of the ARM ISA User mode and non-FIQ exception modes and the R8-R12 architectural registers of the ARM ISA mode previous to the current mode;
wherein if the current processor mode is an ARM ISA non-FIQ exception mode then the direct storage holds data associated with the non-FIQ exception mode architectural registers, and the indirect storage holds data associated with the R13-R14 architectural registers of the ARM ISA User mode and non-current exception mode and the R8-R12 architectural registers of the ARM ISA FIQ mode.

### Claim 12

A microprocessor that supports an instruction set architecture that specifies a plurality of processor modes and that specifies architectural registers associated with each of the plurality of processor modes and that specifies a store multiple instruction that instructs the microprocessor to store data to memory from one or more of the architectural registers specified by the store multiple instruction, the microprocessor comprising:
direct storage, that holds data associated with a first portion of the architectural registers and that is coupled to at least one execution unit of the microprocessor to provide the data to the execution unit;
indirect storage, that holds data associated with a second portion of the architectural registers, wherein the indirect storage is incapable of directly providing the data associated with the second portion of the architectural registers to the at least one execution unit;
wherein the architectural registers in the first and second portions vary dynamically based upon the current processor mode of the plurality of processor modes; and
wherein for each of the architectural registers specified by the store multiple instruction:
if the architectural register is currently in the first portion, the microprocessor stores data to memory from the direct storage; and
if the architectural register is currently in the second portion, the microprocessor loads data from the indirect storage to the direct storage and then stores the data to memory from the direct storage.

### Claim 13 (depends on 12)

The microprocessor of claim 12, wherein instruction set architecture supported by the microprocessor comprises the Advanced RISC Machines (ARM) instruction set architecture (ISA), wherein the plurality of processor modes specified by the ISA comprises the ARM ISA User, System, Supervisor, Abort, Undefined, IRQ, and FIQ processor modes, wherein the architected registers specified by the ISA comprise the ARM ISA R0-R14 registers associated with the User processor mode and banked registers associated with the Supervisor, Abort, Undefined, IRQ, and FIQ processor modes, wherein the store multiple instruction specified by the ISA comprises the ARM ISA Store Multiple (STM) instruction.

### Claim 14 (depends on 12)

The microprocessor of claim 12, further comprising:
an instruction translator, that translates the store multiple instruction into microinstructions executable by the microprocessor, wherein for each of the architectural registers specified by the store multiple instruction:
if the architectural register is currently in the first portion, the instruction translator emits a microinstruction to store the data to memory from the direct storage; and
if the architectural register is currently in the second portion, the instruction translator emits a first microinstruction to load data from the indirect storage to the direct storage and emits a second microinstruction to store the data to memory from the direct storage.

### Claim 15 (depends on 12)

The microprocessor of claim 12,
wherein if the current processor mode is the ARM ISA User mode then the direct storage holds data associated with the User mode architectural registers, and the indirect storage holds data associated with the R13-R14 architectural registers of the ARM ISA exception modes and the R8-R12 architectural registers of the ARM ISA FIQ mode;
wherein if the current processor mode is the ARM ISA FIQ mode then the direct storage holds data associated with the FIQ mode architectural registers, and the indirect storage holds data associated with the R13-R14 architectural registers of the ARM ISA User mode and non-FIQ exception modes and the R8-R12 architectural registers of the ARM ISA mode previous to the current mode;
wherein if the current processor mode is an ARM ISA non-FIQ exception mode then the direct storage holds data associated with the non-FIQ exception mode architectural registers, and the indirect storage holds data associated with the R13-R14 architectural registers of the ARM ISA User mode and non-current exception mode and the R8-R12 architectural registers of the ARM ISA FIQ mode.

### Claim 16

A method for operating a microprocessor that supports an instruction set architecture that specifies a plurality of processor modes and that specifies architectural registers associated with each of the plurality of processor modes and that specifies a store multiple instruction that instructs the microprocessor to store data to memory from one or more of the architectural registers specified by the store multiple instruction, the method comprising:
for each of the architectural registers specified by the store multiple instruction:
if the architectural register is currently in the first portion, storing data to memory from direct storage of the microprocessor; and
if the architectural register is currently in the second portion, loading data from the indirect storage to the direct storage and then storing the data from the indirect storage to memory;
wherein the direct storage holds data associated with a first portion of the architectural registers and is coupled to at least one execution unit of the microprocessor to provide the data to the execution unit;
wherein the indirect storage holds data associated with a second portion of the architectural registers, wherein the indirect storage is incapable of directly providing the data associated with the second portion of the architectural registers to the at least one execution unit;
wherein the architectural registers in the first and second portions vary dynamically based upon the current processor mode of the plurality of processor modes.

### Claim 17 (depends on 16)

The method of claim 16, wherein instruction set architecture supported by the microprocessor comprises the Advanced RISC Machines (ARM) instruction set architecture (ISA), wherein the plurality of processor modes specified by the ISA comprises the ARM ISA User, System, Supervisor, Abort, Undefined, IRQ, and FIQ processor modes, wherein the architected registers specified by the ISA comprise the ARM ISA R0-R14 registers associated with the User processor mode and banked registers associated with the Supervisor, Abort, Undefined, IRQ, and FIQ processor modes, wherein the store multiple instruction specified by the ISA comprises the ARM ISA Store Multiple (STM) instruction.

### Claim 18 (depends on 17)

The method of claim 17, further comprising:
translating the store multiple instruction into microinstructions executable by the microprocessor, wherein for each of the architectural registers specified by the store multiple instruction:
if the architectural register is currently in the first portion, emitting a microinstruction to store the data to memory from the direct storage; and
if the architectural register is currently in the second portion, emitting a first microinstruction to load data from the indirect storage to the direct storage and emitting a second microinstruction to store the data from the indirect storage to memory.

### Claim 19 (depends on 16)

The method of claim 16,
wherein if the current processor mode is the ARM ISA User mode then the direct storage holds data associated with the User mode architectural registers, and the indirect storage holds data associated with the R13-R14 architectural registers of the ARM ISA exception modes and the R8-R12 architectural registers of the ARM ISA FIQ mode;
wherein if the current processor mode is the ARM ISA FIQ mode then the direct storage holds data associated with the FIQ mode architectural registers, and the indirect storage holds data associated with the R13-R14 architectural registers of the ARM ISA User mode and non-FIQ exception modes and the R8-R12 architectural registers of the ARM ISA mode previous to the current mode;
wherein if the current processor mode is an ARM ISA non-FIQ exception mode then the direct storage holds data associated with the non-FIQ exception mode architectural registers, and the indirect storage holds data associated with the R13-R14 architectural registers of the ARM ISA User mode and non-current exception mode and the R8-R12 architectural registers of the ARM ISA FIQ mode.

### Claim 20

A computer program product encoded in at least one computer readable storage medium for use with a computing device, the computer program product comprising:
computer readable program code embodied in said medium, for specifying a microprocessor that supports an instruction set architecture that specifies a plurality of processor modes and that specifies architectural registers associated with each of the plurality of processor modes and that specifies a load multiple instruction that instructs the microprocessor to load data from memory into one or more of the architectural registers specified by the load multiple instruction, the computer readable program code comprising:
first program code for specifying direct storage, that holds data associated with a first portion of the architectural registers and that is coupled to at least one execution unit of the microprocessor to provide the data to the execution unit; and
second program code for specifying indirect storage, that holds data associated with a second portion of the architectural registers, wherein the indirect storage is incapable of directly providing the data associated with the second portion of the architectural registers to the at least one execution unit;
wherein the architectural registers in the first and second portions vary dynamically based upon the current processor mode of the plurality of processor modes; and
wherein for each of the architectural registers specified by the load multiple instruction:
if the architectural register is currently in the first portion, the microprocessor loads data from memory into the direct storage; and
if the architectural register is currently in the second portion, the microprocessor loads data from memory into the direct storage and then stores the data from the direct storage to the indirect storage.

### Claim 21 (depends on 20)

The computer program product of claim 20, wherein the at least one computer readable storage medium is selected from the set of a disk, tape, or other magnetic, optical, or electronic storage medium and a network, wire line, wireless or other communications medium.
