0
12kviews
Explain in detail about the Thumb-2 instruction set of ARM Cortex-M3.
1 Answer
1
636views

The Thumb-2 technology extended the Thumb Instruction Set Architecture (ISA) into a highly efficient and powerful instruction set that delivers significant benefits in terms of ease of use, code size, and performance. The extended instruction set in Thumb-2 is a superset of the 16-bit Thumb instruction set, with additional 16-bit instructions alongside 32-bit instructions. It allows more complex operations to be carried out in the Thumb state, thus allowing higher efficiency by reducing the number of states switching between ARM state and Thumb state. Focused on small memory system devices such as microcontrollers and reducing the size of the processor, the Cortex-M3 supports only the Thumb-2 (and traditional Thumb) instruction set. Instead of using ARM instructions for some operations, as in traditional ARM processors, it uses the Thumb-2 instruction set for all operations. As a result, the Cortex-M3 processor is not backward compatible with traditional ARM processors. Nevertheless, the Cortex-M3 processor can execute almost all the 16-bit Thumb instructions, including all 16-bit Thumb instructions supported on ARM7 family processors, making application porting easy. With support for both 16-bit and 32-bit instructions in the Thumb-2 instruction set, there is no need to switch the processor between Thumb state(16-bit instructions) and ARM state (32-bit instructions). Unlike ARM7 or ARM9 family processors, one needs to switch to ARM state to carry out some complex calculations or a large number of conditional operations and good performance is needed, whereas the Cortex-M3 processor works differently. One can mix 32-bit instructions with 16-bit instructions without switching state, getting high code density and high performance with no extra complexity.The Thumb-2 instruction set is a very important feature of the ARMv7 architecture. Compared with the instructions supported on ARM7 family processors (ARMv4Tarchitecture), the Cortex-M3 processor instruction set has a large number of new features. For the first time, hardware divide instruction is available on an ARM processor, and a number of multiply instructions are also available on the Cortex-M3 processor to improve data-crunching performance.The Cortex-M3 processor also supports unaligned data accesses, a feature previously available only in high-end processors.

Relationship between the Thumb Instruction Set in Thumb-2 Technology and the Traditional Thumb

Please log in to add an answer.