fclass.d
Floating-Point Classify Double-Precision
- Extension
- D
- XLEN
- RV32 and RV64
- Assembly (riscv-unified-db)
fclass.d xd, fs1- Length
- 32-bit
Encoding
| 3127 | 2625 | 2420 | 1915 | 1412 | 117 | 62 | 10 | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 11100 | 01 | 00000 | rs1 | 001 | rd | 10100 | 11 | ||||||||||||||||||||||||
Match 0xe2001053, mask 0xfff0707f. Source: fclass.d rd rs1 24..20=0 31..27=0x1C 14..12=1 26..25=1 6..2=0x14 1..0=3 in riscv-opcodes/extensions/rv_d.
| Field | Bits | riscv-opcodes name |
|---|---|---|
| rs1 | 19:15 | rs1 |
| rd | 11:7 | rd |
Description
The fclass.d instruction is defined analogously to its single-precision counterpart, but operates on double-precision
operands. It examines the value in floating-point register fs1 and writes to integer register xd a 10-bit mask that
indicates the class of the floating point number.
The format of the mask is described in the table below. The corresponding bit in xd will be set if the property
is true and clear otherwise. All other bits in xd are cleared. Note that exactly one bit in xd will be set.
Format of result of fclass instruction.
| xd bit | Meaning |
|---|---|
| 0 | fs1 is $-\infty$. |
| 1 | fs1 is a negative normal number. |
| 2 | fs1 is a negative subnormal number. |
| 3 | fs1 is $-0$. |
| 4 | fs1 is $+0$. |
| 5 | fs1 is a positive subnormal number. |
| 6 | fs1 is a positive normal number. |
| 7 | fs1 is $+\infty$. |
| 8 | fs1 is a signaling NaN. |
| 9 | fs1 is a quiet NaN. |
Description from riscv-unified-db, reformatted.