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.

Assembler syntax<br />

LDRHT , [ {, #}] Offset: Thumb only<br />

LDRHT , [] {, #+/-} Post-indexed: <strong>ARM</strong> only<br />

LDRHT , [], +/- Post-indexed: <strong>ARM</strong> only<br />

where:<br />

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

The destination register.<br />

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

Instruction Details<br />

+/- Is + or omitted if or the optionally shifted value of is to be added to the base<br />

register value (add == TRUE), or – if it is to be subtracted (permitted in <strong>ARM</strong> code only,<br />

add == FALSE).<br />

The immediate offset applied to the value of . Any value in the range 0-255 is permitted.<br />

can be omitted, meaning an offset of 0.<br />

Contains the offset that is applied to the value of to form the address.<br />

Operation<br />

if ConditionPassed() then<br />

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

offset = if register_form then R[m] else imm32;<br />

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

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

data = MemU_unpriv[address,2];<br />

if postindex then R[n] = offset_addr;<br />

if UnalignedSupport() || address = ‘0’ then<br />

R[t] = ZeroExtend(data, 32);<br />

else // Can only apply before <strong>ARM</strong>v7<br />

R[t] = bits(32) UNKNOWN;<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-159

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

Saved successfully!

Ooh no, something went wrong!