FCLASS.Q

RISC-V FCLASS.Q Instruction Details

Instruction ManualR-type

Examine quad FP value; return 10-bit class mask. R-type, fmt=Q(11).

Instruction Syntax

fclass.q rd, rs1
Operand Breakdown
Destination rd: register receiving the operation result.
Source rs1: register holding the first operand.
Source rs2: register holding the second operand.
QFloating-Point Compare

Instruction Behavior

fclass.q classifies the quad-precision value in f[rs1] and writes a 10-bit class mask to integer register rd.

Quick Understanding & Search Notes

fclass.q classifies the quad-precision value in f[rs1] and writes a 10-bit class mask to integer register rd.

FCLASS does not round and does not compare numeric magnitude; it returns a class bit mask.
Classes include negative/positive infinity, normal, subnormal, zero, signaling NaN, and quiet NaN categories.

Common Usage Scenarios

Floating Point Basic

Understand this scenario with real code like «fclass.q x10, f0 # x10 = class of f0».

Numerical Computing

Understand this scenario with real code like «fclass.q x10, f0 # x10 = class of f0».

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

FCLASS does not round and does not compare numeric magnitude; it returns a class bit mask.
Classes include negative/positive infinity, normal, subnormal, zero, signaling NaN, and quiet NaN categories.

FAQ

Does fclass.q modify the floating-point value?

No. It reads the floating-point source and writes the class mask to an integer register.

Is fclass.q affected by rm?

No. FCLASS has no rounded result.