subs

Subtract and Set Flags (Shifted)

SUBS <Wd>, <Wn>, <Wm> {, <shift> #<amount>}

Subtracts shifted register and updates flags.

Details

The Subtract and Set Flags instruction subtracts shifted register and updates flags.

Pseudocode Operation

Wd ← Wn - Wm
// Flags affected: N, Z, C, V

Example

SUBS w0, w1, w2

Encoding

Binary Layout
01101011
000
Wm
imm6
Wn
Wd
 
Format Data Processing
Opcode 0x6B000000
Extension Base

Operands

  • Wd
    Destination 32-bit integer register
  • Wn
    First source / base 32-bit integer register
  • Wm
    Second source / offset 32-bit integer register