subs

Subtract and Set Flags (Immediate)

SUBS <Wd>, <Wn|Wsp>, #<imm> {, lsl #<shift>}

Subtracts immediate and updates flags.

Details

The Subtract and Set Flags instruction subtracts immediate and updates flags.

Pseudocode Operation

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

Example

SUBS w0, Wn, #16

Encoding

Binary Layout
01110001
sh
imm12
Wn
Wd
 
Format Data Processing
Opcode 0x71000000
Extension Base

Operands

  • Wd
    Destination 32-bit integer register
  • Wn
    First source / base 32-bit integer register
  • imm
    Imm