You copied the Doc URL to your clipboard.

ADD (extended register)

Add (extended register).

Syntax

ADD  Wd|WSP, Wn|WSP, Wm{, extend {#amount}}    ; 32-bit general registers
ADD  Xd|SP, Xn|SP, Rm{, extend {#amount}}    ; 64-bit general registers

Where:

Wd|WSP

Is the 32-bit name of the destination general-purpose register or stack pointer, in the range 0 to 31.

Wn|WSP

Is the 32-bit name of the first source general-purpose register or stack pointer, in the range 0 to 31.

Wm

Is the 32-bit name of the second general-purpose source register, in the range 0 to 31.

extend

Is the extension to be applied to the second source operand:

32-bit general registers

Can be one of UXTB, UXTH, LSL|UXTW, UXTX, SXTB, SXTH, SXTW or SXTX.

If Rd or Rn is WSP then LSL is preferred rather than UXTW, and can be omitted when amount is 0. In all other cases extend is required and must be UXTW rather than LSL.

64-bit general registers

Can be one of UXTB, UXTH, UXTW, LSL|UXTX, SXTB, SXTH, SXTW or SXTX.

If Rd or Rn is SP then LSL is preferred rather than UXTX, and can be omitted when amount is 0. In all other cases extend is required and must be UXTX rather than LSL.

Xd|SP

Is the 64-bit name of the destination general-purpose register or stack pointer, in the range 0 to 31.

Xn|SP

Is the 64-bit name of the first source general-purpose register or stack pointer, in the range 0 to 31.

R

Is a width specifier, and can be either W or X.

m

Is the number of the second general-purpose source register, in the range 0 to 30, or the name ZR (31).

amount

Is the left shift amount to be applied after extension in the range 0 to 4, defaulting to 0. It must be absent when extend is absent, is required when extend is LSL, and is optional when extend is present but not LSL.

Usage

The following table shows valid specifier combinations:

Table 32. ADD (64-bit general registers) specifier combinations
Rextend
WSXTB
WSXTH
WSXTW
WUXTB
WUXTH
WUXTW
XLSL|UXTX
XSXTX

Was this page helpful? Yes No