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.

A4.3 Branch instructions<br />

The Instruction Sets<br />

Table A4-1 summarizes the branch instructions in the <strong>ARM</strong> <strong>and</strong> Thumb instruction sets. In addition to<br />

providing for changes in the flow of execution, some branch instructions can change instruction set.<br />

Instruction See<br />

Table A4-1 Branch instructions<br />

Range<br />

(Thumb)<br />

Range<br />

(<strong>ARM</strong>)<br />

Branch to target address B on page A8-44 +/–16MB +/–32MB<br />

Compare <strong>and</strong> Branch on Nonzero, Compare<br />

<strong>and</strong> Branch on Zero<br />

Call a subroutine<br />

Call a subroutine, change instruction setb Call a subroutine, optionally change instruction<br />

set<br />

CBNZ, CBZ on page A8-66 0-126B a<br />

BL, BLX (immediate) on page A8-58 +/–16MB<br />

+/–16MB<br />

BLX (register) on page A8-60 Any Any<br />

Branch to target address, change instruction set BX on page A8-62 Any Any<br />

Change to Jazelle state BXJ on page A8-64 - -<br />

Table Branch (byte offsets)<br />

Table Branch (halfword offsets)<br />

TBB, TBH on page A8-446 0-510B<br />

0-131070B<br />

a. These instructions do not exist in the <strong>ARM</strong> instruction set.<br />

b. The range is determined by the instruction set of the BLX instruction, not of the instruction it branches to.<br />

+/–32MB<br />

+/–32MB<br />

Branches to loaded <strong>and</strong> calculated addresses can be performed by LDR, LDM <strong>and</strong> data-processing instructions.<br />

For details see Load/store instructions on page A4-19, Load/store multiple instructions on page A4-22,<br />

St<strong>and</strong>ard data-processing instructions on page A4-8, <strong>and</strong> Shift instructions on page A4-10.<br />

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

a

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

Saved successfully!

Ooh no, something went wrong!