1.2.2. The Thumb instruction set

The Thumb instruction set is a subset of the most commonly used 32-bit ARM instructions. Thumb instructions are each 16 bits long, and have a corresponding 32-bit ARM instruction that has the same effect on the processor model. Thumb instructions operate with the standard ARM register configuration, enabling excellent interoperability between ARM and Thumb states.

The Thumb instruction set has all the advantages of a 32-bit core:

The Thumb instruction set therefore offers a long branch range, powerful arithmetic operations, and a large address space.

Thumb code is typically 65% of the size of the ARM code, and provides 160% of the performance of ARM code when running on a 16-bit memory system. The Thumb instruction set makes the ARM7EJ-S processor ideally suited to embedded applications with restricted memory bandwidth, where code density is important.

There is no performance penalty when moving between ARM and Thumb state.

The availability of both 16-bit Thumb and 32-bit ARM instruction sets, gives designers the flexibility to emphasize performance or code size on a subroutine level, according to the requirements of their applications. For example, critical loops for fast interrupts and DSP algorithms can be coded using the full ARM instruction set, and linked with Thumb code.

Copyright ©  2001 ARM Limited. All rights reserved.ARM DDI 0214B
Non-Confidential