3.2.1. The branch and exchange instruction

The BX instruction branches to the address contained in a specified register. The value of bit 0 of the branch address determines whether execution continues in ARM state or Thumb state. See ARM architecture v5T for additional instructions available with ARM architecture v5.

Bit 0 of an address can be used in this way because:

Syntax

The syntax of BX is one of:

Thumb
BX Rn
ARM
BX{cond} Rn

where:

Rn

Is a register in the range r0 to r15 that contains the address to branch to. The value of bit 0 in this register determines the processor state:

  • if bit 0 is set, the instructions at the branch address are executed in Thumb state

  • if bit 0 is clear, the instructions at the branch address are executed in ARM state.

cond

Is an optional condition code. Only the ARM version of BX can be executed conditionally.

Copyright © 1999-2001 ARM Limited. All rights reserved.ARM DUI 0056D
Non-Confidential