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.

The Instruction Sets<br />

A4.7 Load/store multiple instructions<br />

Load Multiple instructions load a subset, or possibly all, of the general-purpose registers from memory.<br />

Store Multiple instructions store a subset, or possibly all, of the general-purpose registers to memory.<br />

The memory locations are consecutive word-aligned words. The addresses used are obtained from a base<br />

register, <strong>and</strong> can be either above or below the value in the base register. The base register can optionally be<br />

updated by the total size of the data transferred.<br />

Table A4-11 summarizes the load/store multiple instructions in the <strong>ARM</strong> <strong>and</strong> Thumb instruction sets.<br />

Instruction See<br />

System level variants of the LDM <strong>and</strong> STM instructions load <strong>and</strong> store User mode registers from a privileged<br />

mode. Another system level variant of the LDM instruction performs an exception return. For details, see<br />

Chapter B6 System Instructions.<br />

A4.7.1 Loads to the PC<br />

Table A4-11 Load/store multiple instructions<br />

Load Multiple, Increment After or Full Descending LDM / LDMIA / LDMFD on page A8-110<br />

Load Multiple, Decrement After or Full Ascending a<br />

LDMDA / LDMFA on page A8-112<br />

Load Multiple, Decrement Before or Empty Ascending LDMDB / LDMEA on page A8-114<br />

Load Multiple, Increment Before or Empty Descending a LDMIB / LDMED on page A8-116<br />

Pop multiple registers off the stack b<br />

Push multiple registers onto the stack c<br />

POP on page A8-246<br />

PUSH on page A8-248<br />

Store Multiple, Increment After or Empty Ascending STM / STMIA / STMEA on page A8-374<br />

Store Multiple, Decrement After or Empty Descending a STMDA / STMED on page A8-376<br />

Store Multiple, Decrement Before or Full Descending STMDB / STMFD on page A8-378<br />

Store Multiple, Increment Before or Full Ascending a STMIB / STMFA on page A8-380<br />

a. Not available in the Thumb instruction set.<br />

b. This instruction is equivalent to an LDM instruction with the SP as base register, <strong>and</strong> base register updating.<br />

c. This instruction is equivalent to an STMDB instruction with the SP as base register, <strong>and</strong> base register<br />

updating.<br />

The LDM, LDMDA, LDMDB, LDMIB, <strong>and</strong> POP instructions can be used to load a value into the PC. The value loaded<br />

is treated as an interworking address, as described by the LoadWritePC() pseudocode function in Pseudocode<br />

details of operations on <strong>ARM</strong> core registers on page A2-12.<br />

A4-22 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!