Operand Breakdown
Syntax: vmsof.m vd, vs2[, v0.t]; omit v0.t for vm=1, include it for vm=0. vd is one mask register: bit i corresponds to element i, independent of SEW/LMUL.
32-bit OP-V: opcode=1010111, funct6=010100, funct3=010 (OPMVV). vs1 is fixed to 00010, selecting vmsof in VMUNARY0.
Only the first active set-source position becomes 1; other active positions become 0, including when no active set source exists. Both source and destination use mask layout, rather than SEW-wide integer elements.
vd cannot overlap vs2; with vm=0, vd cannot be v0. vs2=v0 is legal; with vm=0, source and execution-mask bits must match.
Require RV32/RV64 V 1.0, enabled VS, valid vtype and supported SEW. Nonzero vstart raises illegal-instruction; traps report vstart=0. Inactive follows vma; mask tails are always agnostic. vl=0 updates no destination bits, including tails.