ldar

Load-Acquire Register

LDAR <Wt>, [<Xn|SP>]

Loads a word with Acquire semantics.

Details

Load-Acquire Register loads a 32-bit word from memory with Acquire semantics, establishing a one-way barrier that prevents subsequent memory operations from being observed before the load completes. The instruction is AArch64-only, does not modify condition flags, and provides explicit synchronization without atomic read-modify-write. The loaded value is zero-extended to 64 bits in the destination register.

Pseudocode Operation

Wt ← ZeroExtend(Mem32[Xn], 32)
# Acquire semantics: subsequent memory operations appear after this load

Example

LDAR w3, [x1]

Encoding

Binary Layout
10
0010001
1
0
11111
1
11111
Rn
Rt
 
Format Load/Store
Opcode 0x88DFFC00
Extension Base (Atomic)

Operands

  • Wt
    Transfer 32-bit integer register (load/store)
  • Xn
    First source / base 64-bit integer register

Reference (Arm A64 ISA)

Instruction Forms

Encoding Instruction ISA Bit pattern
0x88DFFC00 LDAR <Wt>, [<Xn|SP>{, #0}] A64 10 | 0010001 | 1 | 0 | 11111 | 1 | 11111 | Rn | Rt
0xC8DFFC00 LDAR <Xt>, [<Xn|SP>{, #0}] A64 11 | 0010001 | 1 | 0 | 11111 | 1 | 11111 | Rn | Rt

Description

Load-Acquire Register derives an address from a base register value, loads a 32-bit word or 64-bit doubleword from memory, and writes it to a register. The instruction also has memory ordering semantics as described in Load-Acquire, Store-Release. For information about memory accesses, see Load/Store addressing modes.

Operation

bits(64) address;
bits(elsize) data;
constant integer dbytes = elsize DIV 8;

AccessDescriptor accdesc;
accdesc = CreateAccDescAcqRel(MemOp_LOAD, tagchecked);

if n == 31 then
    CheckSPAlignment();
    address = SP[];
else
    address = X[n, 64];

data = Mem[address, dbytes, accdesc];
X[t, regsize] = ZeroExtend(data, regsize);