VSBC.VXM

RISC-V VSBC.VXM Instruction Details

Instruction ManualR-type

Vector integer subtract with borrow-in.

Instruction Syntax

vsbc.vxm vd, vs2, rs1, 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.VXM computes vs2 - x[rs1] - 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.VXM 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.vxm v8, v12, x5, v0.t».

BigInt

Understand this scenario with real code like «vsbc.vxm v8, v12, x5, 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.VXM produce borrow-out?

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