ldarx
Load Doubleword and Reserve Indexed
ldarx RT,RA,RB
Loads a doubleword and creates a reservation. 64-bit version of lwarx.
Details
Loads a doubleword from memory at address RA+RB and creates a reservation on that memory location for use with subsequent stdcx. instructions. The EH field provides a hint to the processor about the expected outcome of the following store-conditional. This is the 64-bit variant of lwarx and is essential for atomic operations and synchronization primitives.
Pseudocode Operation
EA ← (RA) + (RB)
RT ← MEM(EA, 8)
Reserve(EA, 8)
Programming Note
Load Doubleword And Reserve Indexed X-form serves as both a basic and an extended mnemonic. The Assembler will recognize a ldarx mnemonic with four operands as the basic form, and a ldarx mnemonic with three operands as the extended form.
Extended Mnemonics
| Extended Mnemonic | Equivalent Instruction |
|---|---|
| ldarx |
Example
// Atomic 64-bit load.
Encoding
Operands
-
RT
Target Register -
RA
Base Register -
RB
Index Register -
EH
Hint for subsequent store operation