Instruction width selection in T32 code
Some T32 instructions can have either a 16-bit encoding or a 32-bit encoding.
If you do not specify the instruction size, by default:
- For forward reference
Binstructions, armasm always generates a 16-bit instruction, even if that results in failure for a target that could be reached using a 32-bit instruction.
- For external reference
Binstructions, armasm always generates a 32-bit instruction.
- In all other cases, armasm generates the smallest size encoding that can be output.
If you want to override this behavior, you can use the
specifier to ensure a particular instruction size. armasm faults
if it cannot generate an instruction with the specified width.
.W specifier is
ignored when assembling to A32 code, so you can safely use this specifier in code that might
assemble to either A32 or T32 code. However, the
specifier is faulted when assembling to A32 code.