2.2.3. ARM, Thumb, and ThumbEE state

A processor that is executing ARM instructions is operating in ARM state. A processor that is executing Thumb instructions is operating in Thumb state.

A processor in one state cannot execute instructions from another instruction set. For example, a processor in ARM state cannot execute Thumb instructions, and a processor in Thumb state cannot execute ARM instructions. You must ensure that the processor never receives instructions of the wrong instruction set for the current state.

ARM processors always start executing code in ARM state.

Thumb-2EE introduces a new instruction set state, ThumbEE state. In this state, the instruction set is almost identical to the Thumb instruction set. However, some instructions have modified behavior, some instructions are not available, and some new instructions become available.

Changing state

Each instruction set includes instructions to change processor state.

To change between ARM and Thumb states, you must switch the assembler mode to produce the correct opcodes using ARM (CODE32), THUMB, or CODE16 directives. To generate Thumb-2EE code, use THUMBX.

See Instruction set and syntax selection directives for details.

To change between Thumb and ThumbEE states use ENTERX (to change from Thumb state to ThumbEE state) or LEAVEX (to change from Thumb-2EE to Thumb state). See Miscellaneous instructions for details.

Copyright © 2002-2006 ARM Limited. All rights reserved.ARM DUI 0204G
Non-Confidential