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.

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

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

just one register in the list is assembled to Thumb <strong>and</strong> encoding T1 is not available, it<br />

is assembled to the equivalent STR ,[]{,#4} instruction.<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.<br />

Encoding T2 is not available for instructions with the base register in the list <strong>and</strong> ! specified,<br />

<strong>and</strong> the use of such instructions is deprecated. If the base register is not the lowest-numbered<br />

register in the list, such an instruction stores an UNKNOWN value for the base register.<br />

STMEA <strong>and</strong> STMIA are pseudo-instructions for STM. STMEA refers to its use for pushing data onto Empty<br />

Ascending stacks.<br />

The pre-UAL syntaxes STMIA <strong>and</strong> STMEA are equivalent to STM.<br />

Operation<br />

if ConditionPassed() then<br />

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

address = R[n];<br />

for i = 0 to 14<br />

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

if i == n && wback && i != LowestSetBit(registers) then<br />

MemA[address,4] = bits(32) UNKNOWN; // Only possible for encodings T1 <strong>and</strong> A1<br />

else<br />

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

address = address + 4;<br />

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

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

if wback then R[n] = R[n] + 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-375

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

Saved successfully!

Ooh no, something went wrong!