ldat
Load Doubleword Atomic
ldat RT,RA,RB
Atomically loads a doubleword from memory.
Details
Atomically loads a doubleword from memory at the address formed by RA + RB and places the result in RT. This instruction provides atomic semantics for load operations on Power10 and later processors. The instruction updates CR0 when Rc=1.
Pseudocode Operation
EA ← (RA) + (RB)
RT ← [EA]
Programming Note
Places a reservation on the cache line containing the effective address. The subsequent store-conditional (stwcx./stdcx. etc.) will fail if the reservation has been lost due to an intervening store from any processor or an exception. Always check the EQ bit in CR0 after the store-conditional.
Example
ldat r3, r4, r5
Encoding
Binary Layout
011111
0
RT
6
RA
11
RB
16
10011
21
00110
31
Rc
Operands
-
RT
Target General Purpose Register -
RA
Base Address General Purpose Register -
RB
Offset General Purpose Register