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.

Assembler syntax<br />

PUSH St<strong>and</strong>ard syntax<br />

STMDB SP!, Equivalent STM syntax<br />

where:<br />

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

Instruction Details<br />

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

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

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

If the list contains more than one register, the instruction is assembled to encoding T1, T2,<br />

or A1. If the list contains exactly one register, the instruction is assembled to encoding T1,<br />

T3, or A2.<br />

The SP <strong>and</strong> PC can be in the list in <strong>ARM</strong> code, but not in Thumb code. However, <strong>ARM</strong><br />

instructions that include the SP or the PC in the list are deprecated, <strong>and</strong> if the SP is in the<br />

list, the value the instruction stores for the SP is UNKNOWN.<br />

Operation<br />

if ConditionPassed() then<br />

EncodingSpecificOperations(); NullCheckIfThumbEE(13);<br />

address = SP - 4*BitCount(registers);<br />

for i = 0 to 14<br />

if registers == ‘1’ then<br />

if i == 13 && i != LowestSetBit(registers) then // Only possible for encoding A1<br />

MemA[address,4] = bits(32) UNKNOWN;<br />

else<br />

MemA[address,4] = R[i];<br />

address = address + 4;<br />

if registers == ‘1’ then // Only possible for encoding A1 or A2<br />

MemA[address,4] = PCStoreValue();<br />

SP = SP - 4*BitCount(registers);<br />

Exceptions<br />

Data Abort.<br />

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

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

Saved successfully!

Ooh no, something went wrong!