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.

ThumbEE<br />

A9.4.2 LDRH (register)<br />

Load Register Halfword (register) calculates an address from a base register value <strong>and</strong> an offset register<br />

value, loads a halfword from memory, zero-extends it to form a 32-bit word, <strong>and</strong> writes it to a register. The<br />

offset register value is shifted left by 1 bit. For information about memory accesses see Memory accesses<br />

on page A8-13.<br />

The similar Thumb instruction does not have a left shift.<br />

Encoding T1 ThumbEE<br />

LDRH ,[,, LSL #1]<br />

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0<br />

0 1 0 1 1 0 1 Rm Rn Rt<br />

t = UInt(Rt); n = UInt(Rn); m = UInt(Rm);<br />

Assembler syntax<br />

LDRH , [, , LSL #1]<br />

where:<br />

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

The destination register.<br />

The base register.<br />

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

Operation<br />

if ConditionPassed() then<br />

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

address = R[n] + LSL(R[m],1);<br />

R[t] = ZeroExtend(MemU[address,2], 32);<br />

Exceptions <strong>and</strong> checks<br />

Data Abort, NullCheck.<br />

A9-10 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!