You copied the Doc URL to your clipboard.

ANDS (immediate)

Bitwise AND (immediate), setting the condition flags.

This instruction is used by the alias TST (immediate).

Syntax

ANDS  Wd, Wn, #imm    ; 32-bit general registers
ANDS  Xd, Xn, #imm    ; 64-bit general registers

Where:

Wd

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

Wn

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

Xd

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

Xn

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

imm

Is the bitmask immediate. Such an immediate is a 32-bit or 64-bit pattern viewed as a vector of identical elements of size e = 2, 4, 8, 16, 32, or 64 bits. Each element contains the same sub-pattern: a single run of 1 to e-1 non-zero bits, rotated by 0 to e-1 bits. This mechanism can generate 5,334 unique 64-bit patterns (as 2,667 pairs of pattern and their bitwise inverse). Because the all-zeros and all-ones values cannot be described in this way, the assembler generates an error message.