You copied the Doc URL to your clipboard.

WN and XN

The WN, and XN directives define names for registers in A64 code.

The WN directive defines a name for a specified 32-bit register.

The XN directive defines a name for a specified 64-bit register.


name directive expr


is the name to be assigned to the register. name cannot be the same as any of the predefined names.
is WN or XN.
evaluates to a register number from 0 to 30.


Use WN and XN to allocate convenient names to registers in A64 code, to help you to remember what you use each register for. Be careful to avoid conflicting uses of the same register under different names.


sqr4        WN w16  ; defines sqr4 for register w16
regname     XN 21  ; defines regname for register x21