Instruction width selection in Thumb

If you are writing Thumb code for ARMv6T2 or later processors, some instructions can have either a 16-bit encoding or a 32-bit encoding.

If you do not specify the instruction size, by default:

If you want to over-ride this behavior, you can use the .W or .N width specifier to ensure a particular instruction size. The assembler will fault if it cannot generate an instruction with the specified width.

The .W specifier is ignored when assembling to ARM code, so you can safely use this specifier in code that might assemble to either ARM or Thumb code. However, the .N specifier will be faulted when assembling to ARM code.

Show/hideSee also

Concepts
Reference

Assembler Reference:

Copyright © 2010-2011 ARM. All rights reserved.ARM DUI 0473C
Non-ConfidentialID080411