ARM / OFFLINE REFERENCE

On this page
← Home

LDAPR

Load-acquire RCpc register

This instruction derives an address from a base register value, loads a 32-bit word or 64-bit doubleword from the derived address in memory, and writes it to a register.

LDAPR loads from memory with AcquirePC semantics.

For more information about memory ordering semantics, see Load-Acquire, Load-AcquirePC, and Store-Release.

For information about addressing modes, see Load/Store addressing modes.

It has encodings from 2 classes: Post-index and No offset

Post-index class
(FEAT_LRCPC3)

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1 x 0 1 1 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 1 0 Rn Rt
size L

32-bit encoding

(size == 10)

LDAPR <Wt>, [<Xn|SP>], #4

64-bit encoding

(size == 11)

LDAPR <Xt>, [<Xn|SP>], #8

Decode (all encodings)

if !IsFeatureImplemented(FEAT_LRCPC3) then EndOfDecode(Decode_UNDEF); end;
let t : integer{} = UInt(Rt);
let n : integer{} = UInt(Rn);
var wback : boolean = TRUE;
let acquirepc : boolean = TRUE;
let regsize : integer{} = if size == '11' then 64 else 32;
let datasize : integer{} = 8 << UInt(size);
let offset : integer = 1 << UInt(size);

let tagchecked : boolean = TRUE;

var wb_unknown : boolean = FALSE;

if n == t && n != 31 then
    let c : Constraint = ConstrainUnpredictable(Unpredictable_WBOVERLAPLD);
    assert c IN {Constraint_WBSUPPRESS, Constraint_UNKNOWN, Constraint_UNDEF, Constraint_NOP};
    case c of
        when Constraint_WBSUPPRESS => wback = FALSE;        // writeback is suppressed
        when Constraint_UNKNOWN =>    wb_unknown = TRUE;    // writeback is UNKNOWN
        when Constraint_UNDEF =>      EndOfDecode(Decode_UNDEF);
        when Constraint_NOP =>        EndOfDecode(Decode_NOP);
    end;
end;

No offset class
(FEAT_LRCPC)

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1 x 1 1 1 0 0 0 1 0 1 (1) (1) (1) (1) (1) 1 1 0 0 0 0 Rn Rt
size VR A R Rs o3 opc

32-bit encoding

(size == 10)

LDAPR <Wt>, [<Xn|SP> {, #0}]

64-bit encoding

(size == 11)

LDAPR <Xt>, [<Xn|SP> {, #0}]

Decode (all encodings)

if !IsFeatureImplemented(FEAT_LRCPC) then EndOfDecode(Decode_UNDEF); end;
let t : integer{} = UInt(Rt);
let n : integer{} = UInt(Rn);
let wback : boolean = FALSE;
let acquirepc : boolean = TRUE;
let regsize : integer{} = if size == '11' then 64 else 32;
let datasize : integer{} = 8 << UInt(size);
let offset : integer = 0;

let tagchecked : boolean = n != 31;

let wb_unknown : boolean = FALSE;

Assembler Symbols

<Wt>

Is the 32-bit name of the general-purpose register to be loaded, encoded in the "Rt" field.

<Xn|SP>

Is the 64-bit name of the general-purpose base register or stack pointer, encoded in the "Rn" field.

<Xt>

Is the 64-bit name of the general-purpose register to be loaded, encoded in the "Rt" field.

Operation

var address : bits(64);
var data : bits(datasize);

let accdesc : AccessDescriptor = CreateAccDescLDAcqPC(tagchecked, acquirepc, t);

if n == 31 then
    CheckSPAlignment();
    address = SP{64}();
else
    address = X{64}(n);
end;

data = Mem{datasize}(address, accdesc);
X{regsize}(t) = ZeroExtend{regsize}(data);
if wback then
    if wb_unknown then
        address = ARBITRARY : bits(64);
    else
        address = AddressAdd(address, offset, accdesc);
    end;
    if n == 31 then
        SP{64}() = address;
    else
        X{64}(n) = address;
    end;
end;

Operational information

This instruction is a data-independent-time instruction as described in About PSTATE.DIT.


Version 2026.09 — Copyright © 2010-2026 Arm Limited or its affiliates.

This site is provided as a community resource and is NOT affiliated with nor endorsed by Arm Limited.