IP Library › Granted Patent US 11,422,808
Granted Patent B2
US 11,422,808 · App. 17/258,287 · Granted Aug 23, 2022

Transactional compare-and-discard instruction

Inventors: Matthew James Horsnell (Cambridge, GB); Grigorios Magklis (Cambridge, GB); Stephan Diestelhorst (Cambridge, GB)
Assignee: Arm Limited
G06F9/30043G06F9/3842G06F13/1668
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,422,808
App. No.
17/258,287
Granted
Aug 23, 2022
Kind
B2
Abstract

An apparatus comprising: processing circuitry to process threads of data processing; and transactional memory support circuitry to support execution of a transaction within a thread processed by the processing circuitry. In response to a transactional compare-and-discard instruction executed within a given transaction, specifying a target address and a compare value, the processing circuitry loads a target data value from a memory location corresponding to the target address; sets at least one condition status indication depending on a result of comparing the target data value and the compare value; and discards the target data value without adding the target address to a working set of addresses tracked for the given transaction. This is useful for enabling thread level speculation to be implemented on a transactional memory architecture.

Claims (36)

1. An apparatus comprising:

processing circuitry to process threads of data processing; and

transactional memory support circuitry to support execution of a transaction within a thread processed by the processing circuitry, the transaction comprising instructions of the thread executed speculatively between a transaction start instruction and a transaction end instruction, for which the processing circuitry is configured to prevent commitment of results of the speculatively executed instructions until the transaction end instruction is reached,

the transactional memory support circuitry comprising conflict detection circuitry to trigger an abort of the transaction in response to detecting a conflicting access from another thread to one of a working set of addresses tracked for the transaction; in which:

in response to a transactional compare-and-discard instruction executed within a given transaction, the transactional compare-and-discard instruction specifying a target address and a compare value, the processing circuitry is configured to:

load a target data value from a memory location corresponding to the target address;

set at least one condition status indication depending on a result of comparing the target data value and the compare value; and

discard the target data value without adding the target address to the working set of addresses for the given transaction; and

in response to a conditional instruction specifying a test condition, the processing circuitry is configured to perform a processing operation conditional on said at least one condition status indication meeting said test condition.

2. The apparatus according to claim 1 , in which in response to the transactional compare-and-discard instruction, the processing circuitry is configured to discard the target data value without writing the target data value to an architectural register of the processing circuitry.

3. The apparatus according to claim 1 , in which the transactional memory support circuitry also comprises speculative result storage circuitry to store results of speculatively executed instructions for at least one transaction.

4. The apparatus according to claim 1 , in which the transactional memory support circuitry also comprises restoration state storage circuitry to store state captured in response to the transaction start instruction to be restored on aborting the transaction.

5. The apparatus according to claim 1 , in which in response to the transactional compare-and-discard instruction, the processing circuitry is configured to trigger issue of a first bus protocol message for requesting the load of the target data value from a memory system;

the first bus protocol message comprising an indication which distinguishes the bus protocol message from a second bus protocol message issued for other types of instruction requiring a load of a data value from memory.

6. The apparatus according to claim 5 , comprising a further processing element comprising the transactional memory support circuitry; in which:

in response to receipt of the first bus protocol message or a further bus protocol message triggered by said first bus protocol message, when the target address is within a write set of addresses tracked for a transaction being processed at the further processing element, the further processing element is configured to permit continued unaborted processing of the transaction at the further processing element.

7. The apparatus according to claim 1 , in which the conditional instruction comprises a conditional branch instruction and the processing operation comprises a branch operation.

8. An apparatus comprising:

processing circuitry to process threads of data processing; and

transactional memory support circuitry to support execution of a transaction within a thread processed by the processing circuitry, the transaction comprising instructions of the thread executed speculatively between a transaction start instruction and a transaction end instruction, for which the processing circuitry is configured to prevent commitment of results of the speculatively executed instructions until the transaction end instruction is reached,

the transactional memory support circuitry comprising conflict detection circuitry to trigger an abort of the transaction in response to detecting a conflicting access from another thread to one of a working set of addresses tracked for the transaction; in which:

in response to a transactional compare-and-discard instruction executed within a given transaction, the transactional compare-and-discard instruction specifying a target address and a compare value, the processing circuitry is configured to:

load a target data value from a memory location corresponding to the target address;

set at least one condition status indication depending on a result of comparing the target data value and the compare value; and

discard the target data value without adding the target address to the working set of addresses for the given transaction; and

the transactional compare-and-discard instruction specifies a source register storing the compare value.

9. A data processing method comprising:

executing a transaction comprising instructions of a thread executed speculatively between a transaction start instruction and a transaction end instruction, for which the processing circuitry is configured to prevent commitment of results of the speculatively executed instructions until the transaction end instruction is reached,

detecting conflicting accesses from another thread to one of a working set of addresses tracked for the transaction, and when a conflicting access is detected, aborting the transaction; and

in response to a transactional compare-and-discard instruction specifying a target address and a compare value, which is executed within the transaction:

loading a target data value from a memory location corresponding to the target address;

setting at least one condition status indication depending on a result of comparing the target data value and the compare value; and

discarding the target data value without adding the target address to the working set of addresses for the given transaction; and

comprising performing thread level speculation to execute a plurality of threads of processing, each thread corresponding to a respective one of a plurality of iterations of a program loop and comprising at least one transaction.

10. The data processing method according to claim 9 , in which the transactional compare-and-discard instruction specifies as the target address an address of a loop iteration commit variable for tracking progress in committing transactions for the plurality of iterations of the program loop.

11. The data processing method of claim 9 , comprising executing one or more instructions to determine whether to abort the transaction in dependence on whether the at least one condition status indication satisfies a test condition.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 24, 2021
From: HORSNELL, MATTHEW JAMES; MAGKLIS, GRIGORIOS; DIESTELHORST, STEPHAN
To: ARM LIMITED
Reel/Frame 055382/0618 →
Priority Claims (1)
EP 18386021 · Jul 9, 2018 · regional
Continuity (1)
Related Publication 20210141643A1 · May 13, 2021