FCLASS.S

Float Classify (Single)

FCLASS.S rd, rs1

Examines the value in a float register and generates a 10-bit bitmask indicating its class (NaN, Inf, Zero, Normal, etc.).

Details

Classifies the single-precision (32-bit) floating-point value in rs1, writing a 10-bit one-hot result to integer rd. Bits represent: negative infinity, negative normal, negative subnormal, negative zero, positive zero, positive subnormal, positive normal, positive infinity, signalling NaN, quiet NaN.

Pseudocode Operation

R[rd] = classify_float(F[rs1]);

Example

FCLASS.S x10, f1

Encoding

Binary Layout
1110000
31:25
00000
24:20
rs1
19:15
001
14:12
rd
11:7
1010011
6:0
 
Format R-Type
Opcode 0x53
Extension F

Operands

  • rd
    Dest (Integer Mask)
  • rs1
    Source (Float)