# US 2001/0027383 A1 · Method and apparatus to test an instruction sequence

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

- Number: US 2001/0027383 A1
- Document ID: US20010027383A1
- Status: Published application
- Kind: A1
- Application number: 09/764,725
- Filed: 2001-01-17
- Published: 2001-10-04
- Earliest claimed: 1998-12-21
- Assignees: Intel Corporation
- Inventors: Richard L. Maliszewski
- Web page: https://patentgrep.com/patent/US20010027383A1

## CPC

- G06F 11/3688: {for test execution, e.g. scheduling of test suites}
- G06F 21/54: by adding security routines or objects to programs
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A data processing device associates a test module with a sequence of instructions, the test module producing a test result by performing a test on a sequence of instructions. In the sequence of instructions, a first instruction comprising a target address is replaced with a second instruction having an instruction address in the sequence, the second instruction to transfer control to the test module. The target address is stored within an encrypted table, and the test module locates the target address in the table and transfers control to the target address when the test result indicates the sequence of instructions may proceed.

## Claims

### Claim 1

A method comprising:
generating a test module to produce a test result by performing a test on the sequence of instructions;
in the sequence of instructions, replacing a first instruction comprising a target address with a second instruction having an instruction address in the sequence, the second instruction to transfer control to the test module; and
storing the target address in an encrypted table, the test module to locate the target address in the table and to transfer control to the target address if the test result indicates the sequence of instructions is to proceed.

### Claim 2 (depends on 1)

The method of claim 1 further comprising
compacting the sequence of instructions to eliminate a hole created by replacing the first instruction with the second instruction.

### Claim 3 (depends on 1)

The method of claim 1 further comprising:
corresponding the target address with the instruction address in the encrypted table.

### Claim 4 (depends on 1)

The method of claim 1 further comprising:
profiling the sequence of instructions to identify the first instruction as an instruction to replace.

### Claim 5

A device comprising:
a processor;
a machine-readable storage medium coupled to the processor by way of a bus, the storage medium storing a sequence of instructions which, when executed by the processor, cause the data processing device to
generating a test module to produce a test result by performing a test on the sequence of instructions;
in the sequence of instructions, replace a first instruction comprising a target address with a second instruction having an instruction address in the sequence, the second instruction to transfer control to the test module; and
store the target address in an encrypted table, the test module to locate the target address in the table and to transfer control to the target address if the test result indicates the sequence of instructions is to proceed.

### Claim 6 (depends on 5)

The device of claim 5 in which the sequence of instructions, when executed by the processor, further cause the device to:
compact the sequence of instructions to eliminate a hole created by replacing the first instruction with the second instruction.

### Claim 7 (depends on 5)

The device of claim 5 in which the sequence of instructions, when executed by the processor, further cause the device to:
corresponding the target address with the instruction address in the encrypted table.

### Claim 8 (depends on 5)

The device of claim 5 in which the sequence of instructions, when executed by the processor, further cause the device to:
profile the sequence of instructions to identify the first instruction as an instruction to replace.

### Claim 9

An article comprising:
a machine-readable medium having stored thereon a sequence of instructions which, when executed by a data processing device, cause the data processing device to:
generating a test module to produce a test result by performing a test on the sequence of instructions;
in the sequence of instructions, replace a first instruction comprising a target address with a second instruction having an instruction address in the sequence, the second instruction to transfer control to the test module; and
store the target address in an encrypted table, the test module to locate the target address in the table and to transfer control to the target address if the test result indicates the sequence of instructions is to proceed.

### Claim 10 (depends on 9)

The article of claim 9 in which the sequence of instructions, when executed by a data processing device, further cause the data processing device to:
compact the sequence of instructions to eliminate a hole created by replacing the first instruction with the second instruction.

### Claim 11 (depends on 9)

The article of claim 9 in which the sequence of instructions, when executed by a data processing device, further cause the data processing device to:
correspond the target address with the instruction address in the encrypted table.

### Claim 12 (depends on 9)

The article of claim 9 in which the sequence of instructions, when executed by a data processing device, further cause the data processing device to:
profile the sequence of instructions to identify the first instruction as an instruction to replace.

### Claim 13

An article comprising:
a machine-readable medium having stored thereon:
a sequence of instructions which, when executed by a data processing device, cause the data processing device to:
transfer control to a test module when a second instruction having an instruction address in the sequence is executed by the data processing device, the second instruction replacing a first instruction comprising a target address;
a test module, the test module comprising
a table comprising a target address of the replaced first instruction; and
test instructions to produce a test result by performing a test on the sequence of instructions, the test module to locate the target address in the table and to transfer control to the target address if the test result indicates the sequence of instructions is to proceed.

### Claim 14 (depends on 13)

The article of claim 13 in which the sequence of instructions further comprises
instructions to load the test module.

### Claim 15 (depends on 13)

The article of claim 13 in which the test module further comprises
instructions to set an exception handler to transfer control to the test instructions when the second instruction is executed by the data processing device.

### Claim 16 (depends on 14)

The article of claim 14 in which the test module further comprises
instructions moved from the sequence of instructions to make room for the instructions to load the test module.
