fclass.s

The `fclass.s` instruction 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. `fclass.s` does not set the floating-point exception flags. .Format of result of `fclass` instruction. [%autowidth,float="center",align="center",cols="^,<",options="header",] |=== |_xd_ bit |Meaning |0 |_fs1_ is latexmath:[$-\infty$]. |1 |_fs1_ is a negative normal number. |2 |_fs1_ is a negative subnormal number. |3 |_fs1_ is latexmath:[$-0$]. |4 |_fs1_ is latexmath:[$+0$]. |5 |_fs1_ is a positive subnormal number. |6 |_fs1_ is a positive normal number. |7 |_fs1_ is latexmath:[$+\infty$]. |8 |_fs1_ is a signaling NaN. |9 |_fs1_ is a quiet NaN. |===

Synopsis

fclass.s xd, fs1

Encoding

Type:

067111214151920311010011xd001fs1111000000000
funct7: 1110000
funct3: 001
opcode: 1010011

RISC-V Instruction Encoder/Decoder

open fclass.s in rvcodecjs

Availability