VSBC.VVM

RISC-V VSBC.VVM Instruction Details

Instruction ManualR-type

Vector integer subtract with borrow-in.

Instruction Syntax

vsbc.vvm vd, vs2, vs1, v0.t
Operand Breakdown
Destination rd: register receiving the operation result.
Source rs1: register holding the first operand.
Source rs2: register holding the second operand.
VVector IntegerCarry/Borrow

Instruction Behavior

VSBC.VVM computes vs2 - vs1 - v0.mask[i] for body elements and writes vd; v0.t is the borrow input, not an ordinary execution mask.

Quick Understanding & Search Notes

VSBC.VVM is the data-result instruction for multiword subtraction, with v0.mask[i] supplying the borrow input.

For the m-suffixed form, v0 is an arithmetic borrow input, not an ordinary execution mask.
Borrow-out is generated by VMSBC, not written as a mask by VSBC.
The SEW-width result is written to vd and can be chained with VMSBC for multiword subtraction.

Common Usage Scenarios

Multi-Precision Sub

Understand this scenario with real code like «vsbc.vvm v8, v12, v4, v0.t».

BigInt

Understand this scenario with real code like «vsbc.vvm v8, v12, v4, v0.t».

Pre-Use Checklist

Syntax Check
  • Confirm the current instruction format is R-type.
  • Confirm the operand order matches the example.
Semantic Check
  • Ensure the destination register usage is compatible with the calling convention.
  • Confirm this is not the lower-level form of a pseudo-instruction expansion.

Pitfalls / Common Confusions

vd cannot be v0
vm=0 but all body elements

FAQ

Does VSBC.VVM produce borrow-out?

No. VSBC writes the subtraction data result; use VMSBC to generate borrow-out mask bits.