05.02.2013 Views

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

B6.1.3 LDM (user registers)<br />

System Instructions<br />

Load Multiple (user registers) is UNPREDICTABLE in User or System modes. In exception modes, it loads<br />

multiple User mode registers from consecutive memory locations using an address from a banked base<br />

register. Writeback to the base register is not available with this instruction.<br />

The registers loaded cannot include the PC.<br />

Encoding A1 <strong>ARM</strong>v4*, <strong>ARM</strong>v5T*, <strong>ARM</strong>v6*, <strong>ARM</strong>v7<br />

LDM{} ,^<br />

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<br />

cond 1 0 0 P U 1 (0) 1 Rn 0 register_list<br />

n = UInt(Rn); registers = register_list; increment = (U == ‘1’); wordhigher = (P == U);<br />

if n == 15 || BitCount(registers) < 1 then UNPREDICTABLE;<br />

Assembler syntax<br />

LDM{} , ^<br />

where:<br />

See St<strong>and</strong>ard assembler syntax fields on page A8-7.<br />

is one of:<br />

DA Decrement After. The consecutive memory addresses end at the address in the<br />

base register. For this instruction, FA, meaning Full Ascending, is equivalent to<br />

DA. Encoded as P = 0, U = 0.<br />

DB Decrement Before. The consecutive memory addresses end one word below the<br />

address in the base register. For this instruction, EA, meaning Empty Ascending,<br />

is equivalent to DB. Encoded as P = 1, U = 0.<br />

IA Increment After. The consecutive memory addresses start at the address in the<br />

base register. This is the default, <strong>and</strong> is normally omitted. For this instruction,<br />

FD, meaning Full Descending, is equivalent to IA. Encoded as P = 0, U = 1.<br />

IB Increment Before. The consecutive memory addresses start one word above the<br />

address in the base register. For this instruction, ED, meaning Empty<br />

Descending, is equivalent to IB. Encoded as P =1, U =1.<br />

The base register. This register can be the SP.<br />

<br />

Is a list of one or more registers, separated by commas <strong>and</strong> surrounded by { <strong>and</strong> }. It<br />

specifies the set of registers to be loaded by the LDM instruction. The registers are loaded with<br />

the lowest-numbered register from the lowest memory address, through to the<br />

highest-numbered register from the highest memory address. The PC must not be in the<br />

register list.<br />

<strong>ARM</strong> DDI 0406B Copyright © 1996-1998, 2000, 2004-2008 <strong>ARM</strong> Limited. All rights reserved. B6-7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!