Requests that the compiler targets the T32 or Thumb® instruction sets.
Most ARMv7-A (and earlier) processors support two instruction sets: the ARM instruction set, and the Thumb instruction set. ARMv8-A AArch32 continues to support these two instruction sets, but they are renamed as A32 and T32 respectively. ARMv8-A additionally introduces the A64 instruction set, used in the AArch64 execution state.
Different architectures support different instruction sets:
- ARMv8-A processors in AArch64 state execute A64 instructions.
- ARMv8-A processors in AArch32 state, in addition to ARMv7 and earlier A- and R- profile processors execute A32 (formerly ARM) and T32 (formerly Thumb) instructions.
- M-profile processors execute T32 (formerly Thumb) instructions.
-mthumb option targets the T32 (formerly Thumb) instruction set.
-mthumboption is not valid with AArch64 targets, for example
--target=aarch64-arm-none-eabi. The compiler ignores the
-mthumboption and generates a warning with AArch64 targets.
The default for all targets that support ARM or A32 instructions is
armclang -c --target=arm-arm-none-eabi -march=armv8-a -mthumb test.c