tcheck
Transaction Check
tcheck BF
Checks transaction status and updates CR.
Details
Transaction Check. Tests the state of the current transaction and sets CR field BF based on whether a transaction is active, suspended, or whether a failure has been recorded. No effect outside a transaction.
Pseudocode Operation
if Transactional_or_Suspended() then
CR[4*BF:4*BF+3] ← transaction_state_bits()
else
CR[4*BF:4*BF+3] ← 0b0000
Programming Note
The tcheck instruction is used to determine the state of the current transaction, setting the condition register field BF accordingly. It should be used within a transactional context; outside transactions, it will clear the specified CR field. Ensure proper alignment and ordering relative to other transactional instructions for accurate state checks.
Example
tcheck cr0
Encoding
Binary Layout
31
0
BF
6
/
11
/
16
716
21
/
31
Operands
-
BF
CR Field