ldaprb

Load-Acquire RCpc Register Byte

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

Loads a byte with Release Consistency (process consistent) Acquire semantics.

Details

Load-Acquire RCpc Register Byte. Loads an unsigned byte from memory with RCpc (Release Consistent process-consistent) Acquire semantics. Provides a one-way barrier: subsequent memory operations cannot be reordered before this load, but prior stores may be reordered after. The zero-extended byte is written to Wt. Condition flags are not affected. AArch64-only.

Pseudocode Operation

address ← Xn
data ← ZeroExtend([address], 8)
Wt ← data
AcquireBarrier(RCpc)

Example

LDAPRB w3, [x1]

Encoding

Binary Layout
00
111
0
00
1
0
1
11111
1
100
00
Rn
Rt
 
Format Load/Store
Opcode 0x38BFC000
Extension Base (RCpc)

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
0x38BFC000 LDAPRB <Wt>, [<Xn|SP> {, #0}] A64 00 | 111 | 0 | 00 | 1 | 0 | 1 | 11111 | 1 | 100 | 00 | Rn | Rt

Description

Load-Acquire RCpc Register Byte derives an address from a base register value, loads a byte from the derived address in memory, zero-extends it and writes it to a register. The instruction has memory ordering semantics as described in Load-Acquire, Load-AcquirePC, and Store-Release, except that: This difference in memory ordering is not described in the pseudocode. For information about memory accesses, see Load/Store addressing modes.

Operation

bits(64) address;
bits(8) data;

AccessDescriptor accdesc = CreateAccDescLDAcqPC(tagchecked);

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

data = Mem[address, 1, accdesc];
X[t, 32] = ZeroExtend(data, 32);