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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Instruction Details<br />

A8.6.55 LDMDB / LDMEA<br />

Load Multiple Decrement Before (Load Multiple Empty Ascending) loads multiple registers from<br />

consecutive memory locations using an address from a base register. The consecutive memory locations end<br />

just below this address, <strong>and</strong> the address of the lowest of those locations can optionally be written back to the<br />

base register. The registers loaded can include the PC, causing a branch to a loaded address.<br />

Related system instructions are LDM (user registers) on page B6-7 <strong>and</strong> LDM (exception return) on<br />

page B6-5.<br />

Encoding T1 <strong>ARM</strong>v6T2, <strong>ARM</strong>v7<br />

LDMDB {!},<br />

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0<br />

1 1 1 0 1 0 0 1 0 0 W 1 Rn P M (0) register_list<br />

n = UInt(Rn); registers = P:M:’0’:register_list; wback = (W == ‘1’);<br />

if n == 15 || BitCount(registers) < 2 || (P == ‘1’ && M == ‘1’) then UNPREDICTABLE;<br />

if registers == ‘1’ && InITBlock() && !LastInITBlock() then UNPREDICTABLE;<br />

if wback && registers == ‘1’ then UNPREDICTABLE;<br />

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

LDMDB {!},<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 1 0 0 W 1 Rn register_list<br />

n = UInt(Rn); registers = register_list; wback = (W == ‘1’);<br />

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

if wback && registers == ‘1’ && ArchVersion() >= 7 then UNPREDICTABLE;<br />

Assembler syntax<br />

LDMDB {!}, <br />

where:<br />

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

The base register. The SP can be used.<br />

! Causes the instruction to write a modified value back to . Encoded as W = 1.<br />

If ! is omitted, the instruction does not change in this way. Encoded as W = 0.<br />

Is a list of one or more registers to be loaded, separated by commas <strong>and</strong> surrounded by<br />

{ <strong>and</strong> }. The lowest-numbered register is loaded from the lowest memory address, through<br />

to the highest-numbered register from the highest memory address.<br />

Encoding T1 does not support a list containing only one register. If an LDMDB instruction with<br />

just one register in the list is assembled to Thumb, it is assembled to the equivalent<br />

LDR ,[,#-4]{!} instruction.<br />

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

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

Saved successfully!

Ooh no, something went wrong!