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.

next_instr_addr = PC - 2;<br />

BranchWritePC(LR + ZeroExtend(imm11:’0’, 32));<br />

LR = next_instr_addr : ‘1’;<br />

if op == ‘0’ then<br />

next_instr_addr = PC - 2;<br />

SelectInstrSet(InstrSet_<strong>ARM</strong>);<br />

BranchWritePC(Align(LR,4) + ZeroExtend(imm10:’00’, 32));<br />

LR = next_instr_addr;<br />

else<br />

UNDEFINED;<br />

<strong>ARM</strong>v6 Differences<br />

Encoding H2 <strong>ARM</strong>v4T, <strong>ARM</strong>v5T*, <strong>ARM</strong>v6, <strong>ARM</strong>v6K Used for BL<br />

BL Second of two 16-bit instructions<br />

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

1 1 1 1 1 imm11<br />

Encoding H3 <strong>ARM</strong>v5T*, <strong>ARM</strong>v6, <strong>ARM</strong>v6K Used for BLX<br />

BLX Second of two 16-bit instructions<br />

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

1 1 1 0 1 imm10 op<br />

An encoding H1 instruction must be followed by an encoding H2 or encoding H3 instruction. Similarly, an<br />

encoding H2 or encoding H3 instruction must be preceded by an encoding H1 instruction. Otherwise, the<br />

behavior is UNPREDICTABLE.<br />

It is IMPLEMENTATION DEFINED whether processor exceptions can occur between the two instructions of a<br />

BL or BLX pair. If they can, the <strong>ARM</strong> exception return instructions must be able to return correctly to the<br />

second instruction of the pair. The exception h<strong>and</strong>ler does not have to take special precautions. See<br />

Exception return on page B1-38 for the definition of exception return instructions.<br />

Note<br />

There are no Thumb exception return instructions in the architecture versions that support separate<br />

execution of the two halfwords of BL <strong>and</strong> BLX (immediate) instructions. Also, the <strong>ARM</strong> RFE instruction is only<br />

defined from <strong>ARM</strong>v6 onwards.<br />

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

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

Saved successfully!

Ooh no, something went wrong!