Is the VFCLASS.V result a mask?
No. It writes a 10-bit one-hot class code into ordinary vector data elements; this differs from the one-bit mask result produced by VMFEQ/VMFNE.
Classifies each active FP element with the official FCLASS 10-class table and writes the one-hot class code to the low bits of vd[i].
VFCLASS.V is an RVV unary FP classify instruction with syntax vfclass.v vd, vs2, vm; each active element reads the FP encoding of vs2[i] and writes a 10-bit one-hot class code to the low bits of the ordinary vector data element vd[i], with upper bits zero. Code bits 0..9 represent negative infinity, negative normal, negative subnormal, negative zero, positive zero, positive subnormal, positive normal, positive infinity, signaling NaN, and quiet NaN.
Decode the OP-V encoding and execute VFUNARY1 FP classify lane by lane: each active lane reads the raw vs2[i] FP encoding and writes a 10-bit one-hot class code.
lane 0: class(0xff800000) bit0 -> 0x001 (-infinity)
This lane follows the current-step highlight; the remaining lane results appear below.
V-extension FP instructions use the OP-V major opcode, with funct6, source registers, vm, funct3, vd, and opcode fields.
The teaching context fixes VLEN=4096, LMUL=m1, vstart=0, enabled VS/FS, and supported SEW. FP inputs are first represented as binary32/64. VL=0 updates no destination elements; same-width source/destination overlap is allowed. Inactive and tail values follow ma/ta without definite displayed values.
VFCLASS.V does not produce an FP value or Boolean mask; it maps each active FP element to the official 10-class one-hot integer class code.
vd and vs2 are SEW-wide vector groups; same-EEW source/destination overlap is allowed. VFADD.VV also reads a SEW-wide vs1 vector, and equal source registers read equal initial values. Unary instructions use the encoded vs1 bits as a fixed selector.
Require V, enabled VS/FS and supported vtype. V supports binary32/64; these instructions at SEW=16 require Zvfh, not Zvfhmin alone. FS=Off raises illegal instruction; with H and V=1, vsstatus.FS/VS must also be enabled.
Active elements satisfy vstart≤i<vl and (vm=1 or v0[i]=1); omitting v0.t means vm=1. Prestart elements are unchanged, and inactive/tail elements follow vma/vta. VL=0 or vstart≥vl leaves the entire destination unchanged; successful completion resets vstart=0. Implementations may reject nonzero vstart values they cannot produce.
Masked vd cannot overlap v0; v0 cannot supply both an EEW=1 mask and SEW data source. Invalid frm use is reserved even without rounding, at VL=0 or vstart≥vl; an illegal-instruction exception is not guaranteed by that rule.
The class code occupies the low 10 bits of vd[i], with upper bits zero and exactly one bit set. Even sNaN/qNaN classification sets no fflags.
Assume V/VS/FS enabled, frm=RNE, vstart=0, supported e32,m1, VLMAX≥4 and a0=4. The example is unmasked, so all four body elements execute. Initial values and results: v2=[-0,+0,-2.5,+∞] → v1=[0x008,0x010,0x002,0x080]. Conversion results use the destination integer/FP type; tails follow ta without assumed zeroing.
Assume V/VS/FS enabled, frm=RNE, vstart=0, supported e32,m1, VLMAX≥4 and a0=4. The example is unmasked, so all four body elements execute. Initial values and results: v2=[-0,+0,-2.5,+∞] → v1=[0x008,0x010,0x002,0x080]. Conversion results use the destination integer/FP type; tails follow ta without assumed zeroing.
Assume V/VS/FS enabled, frm=RNE, vstart=0, supported e32,m1, VLMAX≥4 and a0=4. The example is unmasked, so all four body elements execute. Initial values and results: v2=[-0,+0,-2.5,+∞] → v1=[0x008,0x010,0x002,0x080]. Conversion results use the destination integer/FP type; tails follow ta without assumed zeroing.
No. It writes a 10-bit one-hot class code into ordinary vector data elements; this differs from the one-bit mask result produced by VMFEQ/VMFNE.
No. The official FCLASS semantics state that classification does not set FP exception flags, including for signaling NaN or quiet NaN inputs.
The assembly syntax has only vd, vs2, and vm; the encoded vs1 field is fixed to 10000 to select classify inside the VFUNARY1 space.