Is vd only a write destination for VNMSUB.VV?
No. This instruction is destructive: old vd is the first multiplicand.
Vector integer negative multiply-subtract using vd as a multiplicand.
VNMSUB.VV computes vs2[i] - (vs1[i] * vd[i]) for active elements and writes the low SEW bits back to vd.
Starts from OP-V encoding fields, then shows how VNMSUB reads old vd as the first multiplicand, subtracts its low-half product with vs1/rs1 from vs2, and writes the SEW-wide result.
The teaching model fixes LMUL=m1, vstart=0, VLEN=4096 and VLMAX=4096/16=256; enabled vector state, valid vtype and support for the selected SEW are assumed. Old vd is the first multiplicand; equal registers require equal initial values. Same-width sources/destination may overlap; masked vd cannot be v0, and v0 cannot supply mask and SEW data together. Only body elements are shown, without definite inactive/tail results; VL=0 updates no destination elements. Steps are teaching stages, not processor cycles.
vnmsub.vv uses OP-V encoding. The animation places fixed fields, register fields, vm, and the vs1 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 first-multiplicand-overwrite negative multiply-subtract, old vd first multiplicand, and vd writeback. It does not model pipelines, caches, or timing.
VNMSUB.VV is a destructive integer multiply-subtract instruction; vd participates in the multiplication and receives the result.
Syntax: vnmsub.vv vd, vs1, vs2[, v0.t]; omit v0.t for vm=1 and include it for vm=0. 32-bit OP-V: opcode=1010111, funct6=101011, funct3=010.
vd is the SEW/LMUL destination and old first multiplicand. Active results are lowSEW(vs2[i]−lowSEW(vs1[i]×old vd[i])). Same-width sources/destination may overlap; equal registers read equal initial values. Results wrap without rounding or saturation.
vs1 supplies the same-lane SEW-wide multiplicand.
Only the low SEW product bits are subtracted from vs2; vd is not the old minuend used by vnmsac.
Require V 1.0, enabled vector state, and valid supported vtype. Masked vd cannot contain v0; v0 cannot supply both the EEW=1 mask and data. Active body satisfies vstart≤i<vl with mask enabled; prestart is unchanged and inactive/tail follow vma/vta. vstart≥vl (including vl=0) updates no destination elements.
Assume enabled V/VS, valid m1, VLEN≥128, supported operand widths, vl=4, vstart=0, v0.mask[0..3]=1111 and initialized sources. SEW=8, old v8=[100,0,255,128], v12=[4,1,255,128], v4=[3,3,3,3] → v8=[216,1,2,0]. Read old vd as a multiplicand, then wrap to low SEW bits. Inactive/tail values follow policy without assumed zeroing.
Assume enabled V/VS, valid m1, VLEN≥128, supported operand widths, vl=4, vstart=0, v0.mask[0..3]=1111 and initialized sources. SEW=8, old v8=[100,0,255,128], v12=[4,1,255,128], v4=[3,3,3,3] → v8=[216,1,2,0]. Read old vd as a multiplicand, then wrap to low SEW bits. Inactive/tail values follow policy without assumed zeroing.
No. This instruction is destructive: old vd is the first multiplicand.