Does VMSBC.VX write the add/subtract result?
No. It writes only borrow mask bits; data differences come from instructions such as VSBC.
Compute element-wise subtract borrow-out and write the Boolean result to mask destination vd.
VMSBC.VX is a RISC-V V-extension vector-scalar subtract borrow-out instruction. Each body element subtracts the SEW-width value of x[rs1] from unsigned vs2[i]. vd.mask[i] is 1 iff the difference before truncation is negative, otherwise 0. It writes borrow bits, not integer differences. Fixed vm=1 has no borrow-in or ordinary execution-mask operand.
Starts from OP-V encoding fields, then shows non-m VMSBC processing every body element with vm=1, no borrow-in, and one borrow-out mask bit per element.
Require valid vtype, enabled VS, and supported SEW; VL=0 updates no destination, including tails. VMSBC writes one mask bit per body element; tails are always agnostic. With m1, vd may equal a data source or v0. With borrow-in, v0 cannot also be a SEW data source.
The teaching model fixes LMUL=m1 and vstart=0 and shows only body elements in the selected VL. It fixes VLEN=4096, VLMAX=4096/16=256, and assumes support for the selected SEW; equal vector sources require equal elements. VMSBC.VX fixes vm=1 with no v0 borrow-in; when v0 is specified as a SEW data source, its data is still read. Each body element produces one destination-mask bit.
vmsbc.vx uses OP-V encoding. The animation places fixed fields, register fields, vm, and the rs1 field in one encoding strip.
This animation shows only ISA-visible relationships from the official V extension: OP-V field decode, active-element reads, SEW-width integer borrow-out generation, fixed vm=1 with no borrow-in, and vd writeback. It does not model pipelines, caches, or timing.
VMSBC.VX generates only borrow bits: vd.mask[i] = (unsigned(vs2[i]) - unsigned(scalar) < 0).
Syntax: vmsbc.vx vd, vs2, rs1; vd is one mask register, vs2 is a SEW data source, and rs1 selects an integer scalar.
32-bit OP-V: opcode=1010111, funct6=010011, funct3=100 (OPIVX). Fixed vm=1.
Compute unsigned vs2[i]-scalar; write 1 iff the pre-truncation difference is negative. XLEN>SEW uses low SEW scalar bits; XLEN<SEW sign-extends. There is no borrow-in.
The mask destination may be v0. Overlap with a SEW source must start at the source group's lowest register; legal different-EEW overlap forces ma/ta. With m1, equal register names are legal. An explicit vs2=v0 still reads data.
Require RV32/RV64 V 1.0, valid vtype, enabled VS, and supported SEW; body is vstart≤i<vl and prestart is unchanged. Every body element writes borrow-out; mask tails are always agnostic. VL=0 updates no destination, including tails. The animation shows only body elements in a fixed legal configuration; steps are not processor cycles.
Assume RV32/RV64 V 1.0, enabled VS, valid e32,m1, VLEN≥128, vl=4, vstart=0, and initialized sources; The example is unmasked. v2=[0,7,0xffffffff,4], x11=7 → v1.mask[0..3]=[1,0,0,1]. Only mask bits are written; tails are always agnostic without assumed zeroing.
Assume RV32/RV64 V 1.0, enabled VS, valid e32,m1, VLEN≥128, vl=4, vstart=0, and initialized sources; The example is unmasked. v2=[0,7,0xffffffff,4], x11=7 → v1.mask[0..3]=[1,0,0,1]. Only mask bits are written; tails are always agnostic without assumed zeroing.
No. It writes only borrow mask bits; data differences come from instructions such as VSBC.