Home/Instructions/VFCLASS-V
VFCLASS.V

RISC-V VFCLASS.V Instruction Details

Instruction ManualR-type

Classify each float element per IEEE 754; 10-bit classification mask to vd[i].

Instruction Syntax

vfclass.v vd, vs2, vm
Operand Breakdown
Destination rd: register receiving the operation result.
Source rs1: register holding the first operand.
Source rs2: register holding the second operand.
VZvfhVector OperationsFloating-Point

Instruction Behavior

VFCLASS.V classifies each active floating-point element and writes the 10-bit class code into the low bits of an ordinary integer vector data element. It performs no FP rounding and is not arithmetic FP operation.

Quick Understanding & Search Notes

VFCLASS.V is a classify instruction: the input is FP data, and the output is an integer class code.

The operation applies only to active elements within vl; inactive and tail elements follow the current vma/vta policy.
vm=0 uses v0 as the execution mask and vm=1 is unmasked.
The class result is not a mask-register result; the low 10 bits encode mutually exclusive FP classes.
The instruction performs no numeric rounding and should not use ordinary FP arithmetic rounding text.

Common Usage Scenarios

Numerical Analysis

Understand this scenario with real code like «vsetvli t0, a0, e32, m1, ta, ma vfclass.v v1, v2».

Outlier Detection

Understand this scenario with real code like «vsetvli t0, a0, e32, m1, ta, ma vfclass.v v1, v2».

Pre-Use Checklist

Syntax Check
  • Confirm the current instruction format is R-type.
  • Confirm the operand order matches the example.
Semantic Check
  • Ensure the destination register usage is compatible with the calling convention.
  • Confirm this is not the lower-level form of a pseudo-instruction expansion.

Pitfalls / Common Confusions

The result is written to ordinary vector data elements, not a mask register.
The result is a 10-bit class code; do not treat it as a Boolean comparison result.
No frm or vxrm rounding is involved.

FAQ

Is the VFCLASS.V result a mask?

No. It writes a 10-bit class code into ordinary vector data elements.