Changing between 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 that is executing ThumbEE instructions is operating in ThumbEE state. A processor can also operate in another state called the Jazelle® state. The assembler cannot directly assemble code for the Jazelle 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 or THUMB directives. To generate ThumbEE code, use THUMBX. Assembler code using CODE32 and CODE16 can still be assembled by the assembler, but you are recommended to use ARM and THUMB for new code.

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.

The initial state after reset depends on the processor being used and its configuration.

Show/hideSee also

Copyright © 2010-2011 ARM. All rights reserved.ARM DUI 0473C