ARM Instruction Reference
4-58 Copyright © 2000, 2001 ARM Limited. A ll rights reserved. ARM DUI 0068B
4.6.1 B and BL
Branch, and Branch wi th Link.
Syntax
B{cond} label
BL{cond} label
where:
cond
is an optional condition code (see Conditional execution on page4-4).
label
is a program-relative expression. See Register-relative and
program-relative expressions on page3-23 for more information.
Usage
The
B
instruction causes a branch to
label
.
The
BL
instruction copies the address of the next instruction into r14 (lr, the link
register), and causes a branch to
label
.
Machine-level
B
and
BL
instructions have a range of ±32Mb from the address of the
current instruction. However, you can use these instructions even if
label
is out of
range. Often you do not know where
label
is placed by the linke r. When necessary, the
ARM linker adds code to allow longer branches (see The ARM linker chapter in ADS
Linker and Utilities Guide). The added code is called a veneer.
Architectures
These instructions are availabl e in all versions of the ARM archit ecture.
Examples
B loopA
BLE ng+8
BL subC
BLLT rtX