# US 2025/0094209 A1 · Configurable context save and restore

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

- Number: US 2025/0094209 A1
- Document ID: US20250094209A1
- Status: Published application
- Kind: A1
- Application number: 18/959,787
- Filed: 2024-11-26
- Published: 2025-03-20
- Earliest claimed: 2021-08-13
- Assignees: Infineon Technologies AG
- Applicants: Infineon Technologies AG
- Inventors: Manoj Kumar Harihar; Arndt Voigtlaender
- Web page: https://patentgrep.com/patent/US20250094209A1

## CPC

- G06F 9/461: {Saving or restoring of program or task context}
- G06F 9/30043: {LOAD or STORE instructions; Clear instruction}
- G06F 9/30054: {Unconditional branch instructions}
- G06F 9/30101: {Special purpose registers}
- G06F 9/3806: {using address prediction, e.g. return stack, branch history buffer}
- G06F 9/4484: {Executing subprograms}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Systems, devices, circuitries, and methods are disclosed for identifying, within a call instruction, context registers for storing prior to a jump to another subroutine. In one example, a method includes receiving, while executing a first subroutine, a call instruction that includes a first opcode and a first set of bits, wherein the call instruction identifies a first target address, wherein the first target address stores a first instruction of a set of instructions for performing a second subroutine. A first set of context registers mapped to the first set of bits is identified and content of the first set of context registers is stored in first memory allocated for context storage for the first subroutine. The first instruction stored in the first target address is executed.

## Claims

### Claim 1

A processor coupled to a memory and configured to, when executing instructions stored in the memory, perform operations comprising.
receiving, while executing a first subroutine, a call instruction that includes a first opcode and a first set of bits, wherein the call instruction identifies a first target address, wherein the first target address stores a first instruction of a set of instructions for performing a second subroutine;
determining a first set of context registers mapped to the first set of bits;
storing content of the first set of context registers in first memory allocated for context storage for the first subroutine; and
executing the first instruction stored in the first target address.

### Claim 2 (depends on 1)

The processor of claim 1, wherein the operations further comprise storing, in the memory, a mapping of sets of bits to sets of context registers.

### Claim 3 (depends on 1)

The processor of claim 1, wherein the operations further comprise accessing the memory to determine the first set of context registers.

### Claim 4 (depends on 1)

The processor of claim 1, wherein the operations further comprise storing identifying information for the first set of context registers in a state register in the first memory allocated for context storage for the first subroutine.

### Claim 5 (depends on 1)

The processor of claim 1, wherein the operations further comprise
while executing the second subroutine, receiving a return instruction that includes a second opcode and a second set of bits, wherein the return instruction identifies a second target address, wherein the second target address stores instructions for performing a third subroutine;
determining a second set of context registers mapped to the second set of bits;
restoring content of the second set of context registers from memory allocated for context storage for the third subroutine; and
executing the instruction stored in the second target address.

### Claim 6 (depends on 1)

The processor of claim 1, wherein the first set of bits encodes a constant value mapped to the first set of context registers.

### Claim 7 (depends on 1)

The processor of claim 1, wherein the first set of bits comprises a bitmap that identifies the first set of context registers.

### Claim 8

A method, comprising.
receiving, while executing a first subroutine, a call instruction that includes a first opcode and a first set of bits, wherein the call instruction identifies a first target address, wherein the first target address stores a first instruction of a set of instructions for performing a second subroutine;
determining a first set of context registers mapped to the first set of bits;
storing content of the first set of context registers in first memory allocated for context storage for the first subroutine; and
executing the first instruction stored in the first target address.

### Claim 9 (depends on 8)

The method of claim 8, further comprising storing, in a memory, a mapping of sets of bits to sets of context registers.

### Claim 10 (depends on 9)

The method of claim 9, further comprising accessing the memory to determine the first set of context registers.

### Claim 11 (depends on 8)

The method of claim 8, further comprising storing identifying information for the first set of context registers in a state register in the first memory allocated for context storage for the first subroutine.

### Claim 12 (depends on 8)

The method of claim 8, further comprising
while executing the second subroutine, receiving a return instruction that includes a second opcode and a second set of bits, wherein the return instruction identifies a second target address, wherein the second target address stores instructions for performing a third subroutine;
determining a second set of context registers mapped to the second set of bits;
restoring content of the second set of context registers from memory allocated for context storage for the third subroutine; and
executing the instruction stored in the second target address.

### Claim 13 (depends on 12)

The method of claim 12, wherein the first set of bits and the second set of bits encode a different constant values mapped to different sets of context registers.

### Claim 14 (depends on 12)

The method of claim 12, wherein the first set of bits and the second set of bits comprise bitmaps that identify different sets of context registers.

### Claim 15

A processor coupled to a memory and configured to, when executing instructions stored in the memory, perform operations comprising.
receiving, while executing a second subroutine, a return instruction that includes a first opcode and a first set of bits, wherein the return instruction identifies a first target address, wherein the first target address stores a first instruction of a set of instructions for performing a first subroutine;
determining a set of context registers mapped to the first set of bits;
restoring content of the set of context registers from memory allocated for context storage for the first subroutine; and
executing the instruction stored in the first target address.

### Claim 16 (depends on 15)

The processor of claim 15, wherein the operations further comprise storing, in the memory, a mapping of sets of bits to sets of context registers.

### Claim 17 (depends on 15)

The processor of claim 15, wherein the operations further comprise accessing the memory to determine the first set of context registers.

### Claim 18 (depends on 15)

The processor of claim 15, wherein the first set of bits encode a constant value that is mapped to the first set of context registers.

### Claim 19 (depends on 15)

The processor of claim 15, wherein the first set of bits comprise a bitmap that identifies the first set of context registers.
