# US 2023/0058716 A1 · Functional test of processor code modification operations

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

- Number: US 2023/0058716 A1
- Document ID: US20230058716A1
- Status: Published application
- Kind: A1
- Application number: 17/409,059
- Filed: 2021-08-23
- Published: 2023-02-23
- Earliest claimed: 2021-08-23
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Charles Leverett Meissner; Elena Tsanko; Brenton Yiu; John Martin Ludden; Bryan G. Hickerson
- Web page: https://patentgrep.com/patent/US20230058716A1

## CPC

- G06F 11/22: Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F 9/30181: {Instruction operation extension or modification}
- G06F 9/3851: {from multiple instruction streams, e.g. multistreaming}
- G06F 11/3688: {for test execution, e.g. scheduling of test suites}
- G06F 11/3684: {for test design, e.g. generating new test cases}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Methods and systems for testing a functionality of a code modification operation are described. In an example, a processor can include a processor pipeline comprising one or more execution units. The processor pipeline can execute a first thread. The processor pipeline can further execute a second thread concurrently with the execution of the first thread. The second thread can be executed to modify the first thread using a code modification operation. The processor can further include a test module configured to validate a functionality of the code modification operation based on a result of the modified first thread.

## Claims

### Claim 1

A processor comprising:
a processor pipeline comprising one or more execution units configured to:
execute a first thread; and
execute a second thread concurrently with the execution of the first thread, the second thread being executed to modify the first thread using a code modification operation; and
a test module configured to validate a functionality of the code modification operation based on a result of the modified first thread.

### Claim 2 (depends on 1)

The processor of claim 1, wherein the one or more execution units are configured to execute the second thread to introduce an intended fail condition to the first thread.

### Claim 3 (depends on 1)

The processor of claim 1, wherein the code modification operation replaces a segment of code in the first thread with a segment of code in the second thread.

### Claim 4 (depends on 1)

The processor of claim 1, wherein the code modification operation writes a branch operation to the first thread to branch over a specific type of instruction in the first thread to override the specific type of instruction.

### Claim 5 (depends on 1)

The processor of claim 1, wherein the code modification operation modifies a prefix of a multiword instruction in the first thread.

### Claim 6 (depends on 1)

The processor of claim 1, wherein the code modification operation exits out of a loop of instructions in the first thread.

### Claim 7 (depends on 1)

The processor of claim 1, wherein the code modification operation replaces an instruction in the first thread with a prefix of a multiword instruction, such that the modified first thread includes a valid multiword instruction.

### Claim 8 (depends on 1)

The processor of claim 1, wherein the code modification operation overlays a segment of code in the first thread with another segment of code, and restores the segment of code to the first thread in response to a completion of an execution of said another segment of code.

### Claim 9

A computing system comprising:
a memory; and
a processor comprising a processor pipeline, the processor pipeline comprising one or more execution units configured to execute a first thread; and
execute a second thread concurrently with the execution of the first thread, the second thread being executed to modify the first thread using a code modification operation; and
a test module configured to validate a functionality of the code modification operation based on a result of the modified first thread.

### Claim 10 (depends on 9)

The computer system of claim 9, wherein the one or more execution units are configured to execute the second thread to introduce an intended fail condition to the first thread.

### Claim 11 (depends on 9)

The computer system of claim 9, wherein the code modification operation replaces a segment of code in the first thread with a segment of code in the second thread.

### Claim 12 (depends on 1, 9)

The computer system of claim 9, processor of claim 1, wherein the code modification operation writes a branch operation to the first thread to branch over a specific type of instruction in the first thread to override the specific type of instruction.

### Claim 13 (depends on 9)

The computer system of claim 9, wherein the code modification operation modifies a prefix of a multiword instruction in the first thread.

### Claim 14 (depends on 9)

The computer system of claim 9, wherein the code modification operation exits out of a loop of instructions in the first thread.

### Claim 15 (depends on 9)

The computer system of claim 9, wherein the code modification operation replaces an instruction in the first thread with a prefix of a multiword instruction, such that the modified first thread includes a valid multiword instruction.

### Claim 16 (depends on 9)

The computer system of claim 9, wherein the code modification operation overlays a segment of code in the first thread with another segment of code, and restores the segment of code to the first thread in response to a completion of an execution of said another segment of code.

### Claim 17

A computer-implemented method comprising:
executing, by a processor, a first thread;
executing, by the processor, a second thread concurrently with the execution of the first thread, the second thread being executed to modify the first thread using a code modification operation; and
validating, by the processor, a functionality of the code modification operation based on a result of the modified first thread.

### Claim 18 (depends on 17)

The computer-implemented method of claim 17, wherein executing the second thread comprises introducing an intended fail condition to the first thread.

### Claim 19 (depends on 17)

The computer-implemented method of claim 17, wherein executing the second thread comprises replacing a segment of code in the first thread with a segment of code in the second thread.

### Claim 20 (depends on 17)

The computer-implemented method of claim 17, wherein executing the second thread comprises modifying a prefix of a multiword instruction in the first thread.
