You copied the Doc URL to your clipboard.

13.20 BL

Branch with Link.

Syntax

BL{cond}{.W} label

where:

cond

is an optional condition code. cond isnot available on all forms of this instruction.

.W

is an optional instruction width specifier to force the use of a 32-bit BL instruction in T32.

label

is a PC-relative expression.

Operation

The BL instruction causes a branchto label, and copies the addressof the next instruction into LR (R14, the linkregister).

Instruction availability and branch ranges

The following table shows the BL instructions that are available in A32 and T32 state. Instructions that are not shown in this table are not available.

Table 13-5 BL instruction availability and range

Instruction A32 T32, 16-bit encoding T32, 32-bit encoding
BL label ±32MB ±4MB a ±16MB
BL{cond} label ±32MB - -

Extending branch ranges

Machine-level BL instructions haverestricted ranges from the address of the current instruction. However,you can use these instructions even if label isout of range. Often you do not know where the linker places label.When necessary, the linker adds code to enable longer branches. Theadded code is called a veneer.

Condition flags

The BL instruction does not changethe flags.

Availability

See the preceding table for details of availability of the BL instruction in both instruction sets.

Examples

    BLE     ng+8    BL      subC    BLLT    rtX

Related reference

a 

BL label and BLX label are an instruction pair.

Was this page helpful? Yes No