5.4.1. B

Branch. This is the only instruction in the Thumb instruction set that can be conditional.


B{cond} label



is an optional condition code (see Table 5.2).


is a program-relative expression. This is usuallya label within the same piece of code. See Register-relative and program-relative expressions for more information.

label must be within:

  • –252 to +258 bytes of the current instruction, if cond is used

  • ±2KB if the instruction is unconditional.


The B instruction causes a branch to label, if cond is satisfied, or if cond is not used.


label must be within the specified limits. The ARM linker cannot add code to generate longer branches.


This instruction is available in all T variants of the ARM architecture.


    B   dloop
    BEQ  sectB

Table 5.2.  Condition codes for Thumb B instruction

EQZ setEqual
NEZ clearNot equal
CS/HS C set Higher or same (unsigned >= )
CC/LOC clearLower (unsigned < )
MIN setNegative
PLN clearPositive or zero
VSV setOverflow
VCV clearNo overflow
HIC set and Z clearHigher (unsigned <= )
LSC clear or Z setLower or same (unsigned <= )
GEN and V the sameSigned >=
LTN and V differentSigned <
GTZ clear, and N and V the sameSigned >
LEZ set, or N and V differentSigned <=
Copyright © 2000, 2001 ARM Limited. All rights reserved.ARM DUI 0068B