You copied the Doc URL to your clipboard.

Instructionwidth 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 LDR, ADR,and B instructions, armasm alwaysgenerates a 16-bit instruction, even if that results in failurefor a target that could be reached using a 32-bit instruction.
  • For external reference LDR and B instructions, armasm alwaysgenerates a 32-bit instruction.
  • In all other cases, armasm generatesthe smallest size encoding that can be output.

If you want to override this behavior, you can use the .W or .N widthspecifier to ensure a particular instruction size. armasm faultsif it cannot generate an instruction with the specified width.

The .W specifier is ignored when assemblingto A32 code, so you can safely use this specifier in code that mightassemble to either A32 or T32 code. However, the .N specifieris faulted when assembling to A32 code.

Was this page helpful? Yes No