cneg

Conditional Negate

CNEG <Wd>, <Wn>, <cond>

Negate register if condition is true, else copy. (Alias for CSNEG)

Details

The Conditional Negate instruction negate register if condition is true, else copy. (Alias for CSNEG).

Pseudocode Operation

// Negate register if condition is true, else copy. (Alias for CSNEG)

Example

CNEG w0, w1, cond

Encoding

Binary Layout
01001010
100
Rm
cond
0
1
Rn
Rd
 
Format Cond Select
Opcode 0x4A800400
Extension Base

Operands

  • Wd
    Destination 32-bit integer register
  • Wn
    First source / base 32-bit integer register
  • cond
    Condition