16.52 CMN (immediate)

Compare Negative (immediate).

This instruction is an alias of ADDS (immediate).

The equivalent instruction is ADDS WZR, Wn|WSP, #imm {, shift}.

Syntax

CMN Wn|WSP, #imm{, shift} ; 32-bit

CMN Xn|SP, #imm{, shift} ; 64-bit

Where:

Wn|WSP
Is the 32-bit name of the source general-purpose register or stack pointer.
Xn|SP
Is the 64-bit name of the source general-purpose register or stack pointer.
imm
Is an unsigned immediate, in the range 0 to 4095.
shift
Is the optional left shift to apply to the immediate, defaulting to LSL #0, and can be either LSL #0 or LSL #12.

Operation

Compare Negative (immediate) adds a register value and an optionally-shifted immediate value. It updates the condition flags based on the result, and discards the result.

Rn + shift(imm), where R is either W or X.

Non-ConfidentialPDF file icon PDF versionDUI0801J
Copyright © 2014–2017, 2019 Arm Limited or its affiliates. All rights reserved.