ldarb
Load-Acquire Register Byte
LDARB <Wt>, [<Xn|SP>]
Loads a byte with Acquire semantics.
Details
Load-Acquire Register Byte loads an 8-bit byte 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 the loaded byte is zero-extended to 32 bits in the destination register.
Pseudocode Operation
Wt ← ZeroExtend(Mem8[Xn], 8)
# Acquire semantics: subsequent memory operations appear after this load
Example
LDARB w3, [x1]
Encoding
Binary Layout
00
0010001
1
0
11111
1
11111
Rn
Rt
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 | ||
|---|---|---|---|---|---|
| 0x08DFFC00 | LDARB <Wt>, [<Xn|SP>{, #0}] | A64 | 00 | 0010001 | 1 | 0 | 11111 | 1 | 11111 | Rn | Rt |
Description
Load-Acquire Register Byte derives an address from a base register value, loads a byte from memory, zero-extends it 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(8) data;
AccessDescriptor accdesc;
accdesc = CreateAccDescAcqRel(MemOp_LOAD, tagchecked);
if n == 31 then
CheckSPAlignment();
address = SP[];
else
address = X[n, 64];
data = Mem[address, 1, accdesc];
X[t, 32] = ZeroExtend(data, 32);