# US 10,956,156 B2 · Conditional transaction end instruction

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

- Number: US 10,956,156 B2
- Document ID: US10956156B2
- Status: Granted
- Kind: B2
- Application number: 16/439,322
- Filed: 2019-06-12
- Published: 2019-10-17
- Granted: 2021-03-23
- Earliest claimed: 2014-03-14
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Dan F. Greiner; Christian Jacobi; Marcel Mitran; Donald W. Schmidt; Timothy J. Slegel
- Web page: https://patentgrep.com/patent/US10956156B2

## CPC

- G06F 9/30072: {to perform conditional operations, e.g. using predicates or guards}
- G06F 9/3004: {to perform operations on memory}
- G06F 9/30043: {LOAD or STORE instructions; Clear instruction}
- G06F 9/30047: {Prefetch instructions; cache control instructions}
- G06F 9/3005: {to perform operations for flow control}
- G06F 9/30076: {to perform miscellaneous control operations, e.g. NOP}
- G06F 9/30087: {Synchronisation or serialisation instructions}
- G06F 9/30152: {Determining start or end of instruction; determining instruction length}
- G06F 9/323: {for indirect branch instructions}
- G06F 9/3802: {Instruction prefetching}
- G06F 9/3834: {Maintaining memory consistency}
- G06F 9/38585: {with result invalidation, e.g. nullification}
- G06F 9/467: {Transactional memory (G06F9/528 takes precedence)}
- G06F 9/30189: {according to execution mode, e.g. mode flag}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A Conditional Transaction End (CTEND) instruction is provided that allows a program executing in a nonconstrained transactional execution mode to inspect a storage location that is modified by either another central processing unit or the Input/Output subsystem. Based on the inspected data, transactional execution may be ended or aborted, or the decision to end/abort may be delayed, e.g., until a predefined event occurs. For instance, when the instruction executes, the processor is in a nonconstrained transaction execution mode, and the transaction nesting depth is one at the beginning of the instruction, a second operand of the instruction is inspected, and based on the inspected data, transaction execution may be ended or aborted, or the decision to end/abort may be delayed, e.g., until a predefined event occurs, such as the value of the second operand becomes a prespecified value or a time interval is exceeded.

## Claims

### Claim 1

A computer program product for executing an instruction in a computing environment, said computer program product comprising:
at least one computer readable storage medium readable by at least one processing circuit and storing instructions for performing a method comprising:
obtaining the instruction for execution, the instruction having associated therewith an operation code to specify a conditional transaction end operation; and
executing, by a processor, the instruction, the executing comprising:
fetching an operand from a location specified by the instruction;
based on the operand comprising one value, ending a transaction associated with the instruction;
based on the operand comprising another value, delaying completion of the instruction until a predefined action occurs; and
based on the operand comprising a further value, aborting transactional execution of the transaction.

### Claim 2 (depends on 1)

The computer program product of claim 1, wherein the operand is stored by an input/output subsystem coupled to the processor.

### Claim 3 (depends on 1)

The computer program product of claim 1, wherein the further value comprises a negative value, the one value comprises zero, and the other value comprises a positive value.

### Claim 4 (depends on 1)

The computer program product of claim 1, wherein based on aborting transactional execution, a condition code in a transaction abort program status word is set to a defined value.

### Claim 5 (depends on 1)

The computer program product of claim 1, wherein the instruction includes one or more fields to provide the location from which the operand is fetched.

### Claim 6 (depends on 5)

The computer program product of claim 5, wherein the one or more fields comprise an index field, a base field, a first displacement field and a second displacement field, wherein contents of registers designated by one or more of the index field and the base field are added to a concatenation of the second displacement field and the first displacement field to provide the location.

### Claim 7 (depends on 1)

The computer program product of claim 1, wherein the operand is stored by another processor.

### Claim 8 (depends on 1)

The computer program product of claim 1, wherein the predefined action comprises exceeding an interval of time, and wherein the executing further comprises:
aborting transactional execution of the transaction; and
setting a condition code in a transaction abort program status word to a defined value.

### Claim 9 (depends on 1)

The computer program product of claim 1, wherein based on ending the transaction, store accesses made by the transaction are committed, a transaction nesting depth is set to zero, the processor exits transactional execution mode, and a condition code is set to a defined value.

### Claim 10 (depends on 1)

The computer program product of claim 1, wherein the fetching is performed based on the processor being in a nonconstrained transactional execution mode and a transaction nesting depth being of a selected value.

### Claim 11

A computer system for executing an instruction in a computing environment, said computer system comprising:
a memory; and
a processor in communication with the memory, wherein the computer system is configured to perform a method, said method comprising:
obtaining the instruction for execution, the instruction having associated therewith an operation code to specify a conditional transaction end operation; and
executing, by the processor, the instruction, the executing comprising:
fetching an operand from a location specified by the instruction;
based on the operand comprising one value, ending a transaction associated with the instruction;
based on the operand comprising another value, delaying completion of the instruction until a predefined action occurs; and
based on the operand comprising a further value, aborting transactional execution of the transaction.

### Claim 12 (depends on 11)

The computer system of claim 11, wherein the further value comprises a negative value, the one value comprises zero, and the other value comprises a positive value.

### Claim 13 (depends on 11)

The computer system of claim 11, wherein the predefined action comprises exceeding an interval of time, and wherein the executing further comprises:
aborting transactional execution of the transaction; and
setting a condition code in a transaction abort program status word to a defined value.

### Claim 14 (depends on 11)

The computer system of claim 11, wherein based on ending the transaction, store accesses made by the transaction are committed, a transaction nesting depth is set to zero, the processor exits transactional execution mode, and a condition code is set to a defined value.

### Claim 15 (depends on 11)

The computer system of claim 11, wherein the fetching is performed based on the processor being in a nonconstrained transactional execution mode and a transaction nesting depth being of a selected value.

### Claim 16

A computer-implemented method of executing an instruction in a computing environment, said computer-implemented method comprising:
obtaining the instruction for execution, the instruction having associated therewith an operation code to specify a conditional transaction end operation; and
executing, by a processor, the instruction, the executing comprising:
fetching an operand from a location specified by the instruction;
based on the operand comprising one value, ending a transaction associated with the instruction;
based on the operand comprising another value, delaying completion of the instruction until a predefined action occurs; and
based on the operand comprising a further value, aborting transactional execution of the transaction.

### Claim 17 (depends on 16)

The computer-implemented method of claim 16, wherein the further value comprises a negative value, the one value comprises zero, and the other value comprises a positive value.

### Claim 18 (depends on 16)

The computer-implemented method of claim 16, wherein the predefined action comprises exceeding an interval of time, and wherein the executing further comprises:
aborting transactional execution of the transaction; and
setting a condition code in a transaction abort program status word to a defined value.

### Claim 19 (depends on 16)

The computer-implemented method of claim 16, wherein based on ending the transaction, store accesses made by the transaction are committed, a transaction nesting depth is set to zero, the processor exits transactional execution mode, and a condition code is set to a defined value.

### Claim 20 (depends on 16)

The computer-implemented method of claim 16, wherein the fetching is performed based on the processor being in a nonconstrained transactional execution mode and a transaction nesting depth being of a selected value.
