ldat

Load Doubleword Atomic

ldat RT,RA,RB

Atomically loads a doubleword from memory.

Details

The ldat instruction performs an atomic load of a doubleword from memory. The effective address is computed as the sum of the contents of general-purpose register RA and general-purpose register RB. The doubleword at the effective address is atomically loaded into register RT. This instruction is part of the Atomic Memory Operations (AMO) category, introduced in PowerISA v3.0.

Pseudocode Operation

Not available in specification

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
 
Format X-form
Opcode 0x7C000000
Extension Base

Operands

  • RT
    Target General Purpose Register
  • RA
    Base Address General Purpose Register
  • RB
    Offset General Purpose Register