Skip to content

SBB

Operation

Subtracts source and C borrow from destination, writes the modular difference, and updates ZNCV.

Assembler Syntax

SBB.{B|W|L|Q}(z) Rn(s), Rn(d)

SBB.{B|W|L|Q}(z) Rn(s), <ea>(e)

SBB.{B|W|L|Q}(z) <ea>(e), Rn(d)

Privilege

Unprivileged

Repeat eligibility

REP eligible; REPcc observes dst

Subtracts the selected-width source value and incoming FLAGS.C borrow from the destination, writes the truncated difference, and updates FLAGS.Z, FLAGS.N, FLAGS.C, and FLAGS.V. The written destination result supplies the REPcc observed value.

Let \(n\) be the selected width, \(d\) and \(s\) the unsigned operand bit patterns, and \(b\) the incoming borrow represented by FLAGS.C. The written result is $\(r = (d - s - b) \bmod 2^n .\)$ FLAGS.Z is set when \(r=0\), and FLAGS.N receives the most-significant bit of \(r\). FLAGS.C reports an unsigned borrow from either subtraction. FLAGS.V reports signed overflow for the complete \(d-s-b\) operation.

2.75in

Encodings

SBB.{B|W|L|Q}(z) Rn(s), Rn(d)

Format: Instruction format for SBB.{B|W|L|Q}(z) Rn(s), Rn(d)

Format: Instruction format for SBB.{B|W|L|Q}(z) Rn(s), Rn(d)

2.75in SBB.{B|W|L|Q}(z) Rn(s), <ea>(e)

Format: Instruction format for SBB.{B|W|L|Q}(z) Rn(s), <ea>(e)

Format: Instruction format for SBB.{B|W|L|Q}(z) Rn(s), <ea>(e)

dstexcluded: immediate [invalid_destination]

2.75in SBB.{B|W|L|Q}(z) <ea>(e), Rn(d)

Format: Instruction format for SBB.{B|W|L|Q}(z) <ea>(e), Rn(d)

Format: Instruction format for SBB.{B|W|L|Q}(z) <ea>(e), Rn(d)