LDM (User registers)
Load Multiple (User registers)
In an EL1 mode other than System mode, Load Multiple (User registers) loads multiple User mode registers from consecutive memory locations using an address from a base register. The registers loaded cannot include the PC. The PE reads the base register value normally, using the current mode to determine the correct Banked version of the register. This instruction cannot writeback to the base register.
Load Multiple (User registers) is undefined in Hyp mode, and unpredictable in User and System modes.
Armv8.2 permits the deprecation of some Load Multiple ordering behaviors in AArch32 state, for more information see FEAT_LSMAOC.
For more information about the constrained unpredictable behavior of this instruction, see Architectural Constraints on UNPREDICTABLE behaviors.
Instructions with similar syntax but with the PC included in <registers_without_pc> are described in LDM (exception return).
If CPSR.DIT is 1, the timing of this instruction is insensitive to the value of the data being loaded or stored.
!= 1111
1
0
0
1
(0)
1
0
LDM{<amode>}{<c>}{<q>} <Rn>, <registers_without_pc>^
n = UInt(Rn); registers = register_list; increment = (U == '1'); wordhigher = (P == U);
if n == 15 || BitCount(registers) < 1 then UNPREDICTABLE;
BitCount(registers) < 1
The instruction operates as an LDM with the same addressing mode but targeting an unspecified set of registers. These registers might include R15.
<amode>
is one of:
DADecrement After. The consecutive memory addresses end at the address in the base register. Encoded as P = 0, U = 0.
FAFull Ascending. For this instruction, a synonym for DA.
DBDecrement Before. The consecutive memory addresses end one word below the address in the base register. Encoded as P = 1, U = 0.
EAEmpty Ascending. For this instruction, a synonym for DB.
IAIncrement After. The consecutive memory addresses start at the address in the base register. This is the default. Encoded as P = 0, U = 1.
FDFull Descending. For this instruction, a synonym for IA.
IBIncrement Before. The consecutive memory addresses start one word above the address in the base register. Encoded as P = 1, U = 1.
EDEmpty Descending. For this instruction, a synonym for IB.
<c>
See Standard assembler syntax fields.
<q>
See Standard assembler syntax fields.
<Rn>
Is the general-purpose base register, encoded in the "Rn" field.
<registers_without_pc>
Is a list of one or more registers, separated by commas and surrounded by { and }. It specifies the set of registers to be loaded by the LDM instruction. The registers are loaded with the lowest-numbered register from the lowest memory address, through to the highest-numbered register from the highest memory address. The PC must not be in the register list. See also Encoding of lists of general-purpose registers and the PC.
if ConditionPassed() then
EncodingSpecificOperations();
if PSTATE.EL == EL2 then UNDEFINED;
elsif PSTATE.M IN {M32_User,M32_System} then UNPREDICTABLE;
else
length = 4*BitCount(registers);
address = if increment then R[n] else R[n]-length;
if wordhigher then address = address+4;
for i = 0 to 14
if registers<i> == '1' then // Load User mode register
Rmode[i, M32_User] = MemS[address,4]; address = address + 4;
PSTATE.M IN {M32_User,M32_System}
The instruction operates as an LDM with the same addressing mode but targeting an unspecified set of registers. These registers might include R15.