← Home

fclass.h

Floating-Point Classify Half-Precision

The `fclass.h` instruction examines the half-precision 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.h` does not set the floating-point exception flags.

.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.

Assembly format

fclass.h xd, fs1

Encoding

313029282726252423222120191817161514131211109876543210
111001000000fs1001xd1010011

Decode variables

VariableBitsWidth
fs1[19:15]5
xd[11:7]5

No execution pseudocode is available for this instruction.

Defined by

one of Zfh, Zhinx

Access

SUVSVU
AlwaysAlwaysAlwaysAlways

Version af3eaf9+cheriot.f635218

Data from the RISC-V Unified Database, copyright RISC-V International and contributors.

CHERIoT extensions from the CHERIoT specification and Sail model, copyright Microsoft and the CHERIoT Platform contributors.

This site is provided as a community resource and is NOT affiliated with nor endorsed by RISC-V International.