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

STR , [ {, #+/-}] Offset: index==TRUE, wback==FALSE<br />

STR , [, #+/-]! Pre-indexed: index==TRUE, wback==TRUE<br />

STR , [], #+/- Post-indexed: index==FALSE, wback==TRUE<br />

where:<br />

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

Instruction Details<br />

The source register. The SP or the PC can be used. However, use of the PC is deprecated.<br />

The base register. The SP can be used. For offset addressing only, the PC can be used.<br />

However, use of the PC is deprecated.<br />

+/- Is + or omitted if the immediate offset is to be added to the base register value (add == TRUE),<br />

or – if it is to be subtracted (add == FALSE). #0 <strong>and</strong> #-0 generate different instructions.<br />

The immediate offset used to form the address. Any value in the range 0-4095 is permitted.<br />

For the offset addressing syntax, can be omitted, meaning an offset of 0.<br />

Operation<br />

if ConditionPassed() then<br />

EncodingSpecificOperations();<br />

offset_addr = if add then (R[n] + imm32) else (R[n] - imm32);<br />

address = if index then offset_addr else R[n];<br />

MemU[address,4] = if t == 15 then PCStoreValue() else R[t];<br />

if wback then R[n] = offset_addr;<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-385

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

Saved successfully!

Ooh no, something went wrong!