10.66 NEG pseudo-instruction

Negate the value in a register.


NEG{cond} Rd, Rm
is an optional condition code.
is the destination register.
is the register containing the value that is subtracted from zero.


The NEG pseudo-instruction negates the value in one register and stores the result in a second register.
NEG{cond} Rd, Rm assembles to RSBS{cond} Rd, Rm, #0.


The ARM encoding of this pseudo-instruction is available in all versions of the ARM architecture.
The 32-bit Thumb encoding of this pseudo-instruction is available in ARMv6T2 and later.

Register restrictions

In ARM instructions, using SP or PC for Rd or Rm is deprecated. In Thumb instructions, you cannot use SP or PC for Rd or Rm.

Condition flags

This pseudo-instruction updates the condition flags, based on the result.
Related reference
10.10 ADD
Non-ConfidentialPDF file icon PDF versionARM DUI0379G
Copyright © 2007, 2008, 2011, 2012, 2014, 2015 ARM. All rights reserved.