Check vl first
The current vl determines the number of body elements. Typical code executes vsetvli, vsetivli, or vsetvl before this instruction.
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.
V-extension FP instructions use the OP-V major opcode, with funct6, source registers, vm, funct3, vd, and opcode fields.
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.
When reading VFCLASS.V, do not stop at the mnemonic. Official V-extension semantics also depend on the current vl, vtype, and mask state. The suffix and operand form determine whether sources are vector, scalar, or immediate values.
The current vl determines the number of body elements. Typical code executes vsetvli, vsetivli, or vsetvl before this instruction.
The current vtype supplies SEW, LMUL, tail policy, and mask policy; these affect element width, register-group size, and inactive/tail destination elements.
For ordinary vector instructions with vm, vm=0 uses v0 as the execution mask and vm=1 is unmasked. A few forms such as VMERGE use v0 as data-selection input.
Understand this scenario with real code like «vsetvli t0, a0, e32, m1, ta, ma vfclass.v v1, v2».
Understand this scenario with real code like «vsetvli t0, a0, e32, m1, ta, ma vfclass.v v1, v2».
Understand this scenario with real code like «vsetvli t0, a0, e32, m1, ta, ma vfclass.v v1, v2».
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.