Requests that the compiler targets the T32 or Thumb® instruction sets.
Different architectures support different instruction sets:
- ARMv8-A processors in AArch64 state execute A64 instructions.
- ARMv8-A processors in AArch32 state can execute A32 or T32 instructions.
- ARMv7-A processors can execute ARM® or Thumb instructions.
-mthumb option targets the T32 (ARMv8-A
AArch32 state) or Thumb (ARMv7-A) 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 ARMv8-A AArch32 and ARMv7-A targets is
armclang -c --target=arm-arm-none-eabi -march=armv8-a -mthumb test.c