Zfh instructions
Half-precision floating point
16-bit half-precision binary floating-point instructions compliant with the IEEE 754-2008
arithmetic standard.
The Zfh extension depends on the single-precision floating-point extension, F.
The NaN-boxing scheme is extended to allow a half-precision value to be NaN-boxed inside a
single-precision value (which may be recursively NaN-boxed inside a double- or quad-precision
value when the D or Q extension is present).
Extension description from riscv-unified-db, reformatted.
Specification chapter: The RISC-V Instruction Set Manual, src/unpriv/zfh.adoc.
Instructions (36)
| Mnemonic | Name (riscv-unified-db) | XLEN |
|---|---|---|
fabs.h | (pseudo-op) | RV32 and RV64 |
fadd.h | Floating-Point Add Half-Precision | RV32 and RV64 |
fclass.h | Floating-Point Classify Half-Precision | RV32 and RV64 |
fcvt.h.l | Floating-point Convert Long to Half-precision | RV64 only |
fcvt.h.lu | Floating-point Convert Unsigned Long to Half-precision | RV64 only |
fcvt.h.w | Floating-point Convert Word to Half-precision | RV32 and RV64 |
fcvt.h.wu | Floating-point Convert Unsigned Word to Half-precision | RV32 and RV64 |
fcvt.l.h | Floating-point Convert Half-precision to Long | RV64 only |
fcvt.lu.h | Floating-point Convert Half-precision to Unsigned Long | RV64 only |
fcvt.w.h | Floating-point Convert Half-precision to Word | RV32 and RV64 |
fcvt.wu.h | Floating-point Convert Half-precision to Unsigned Word | RV32 and RV64 |
fdiv.h | Floating-Point Divide Half-Precision | RV32 and RV64 |
feq.h | Floating-Point Equal Half-Precision | RV32 and RV64 |
fle.h | Floating-Point Less Than or Equal Half-Precision | RV32 and RV64 |
fleq.h | No synopsis available | RV32 and RV64 |
fli.h | Floating-point Load Immediate Half-precision | RV32 and RV64 |
flt.h | Floating-Point Less Than Half-Precision | RV32 and RV64 |
fltq.h | No synopsis available | RV32 and RV64 |
fmadd.h | Floating-Point Multiply-Add Half-Precision | RV32 and RV64 |
fmax.h | Floating-Point Maximum-Number Half-Precision | RV32 and RV64 |
fmaxm.h | No synopsis available | RV32 and RV64 |
fmin.h | Floating-Point Minimum-Number Half-Precision | RV32 and RV64 |
fminm.h | No synopsis available | RV32 and RV64 |
fmsub.h | Floating-Point Multiply-Subtract Half-Precision | RV32 and RV64 |
fmul.h | Floating-Point Multiply Half-Precision | RV32 and RV64 |
fmv.h | (pseudo-op) | RV32 and RV64 |
fneg.h | (pseudo-op) | RV32 and RV64 |
fnmadd.h | Floating-Point Negate-Multiply-Add Half-Precision | RV32 and RV64 |
fnmsub.h | Floating-Point Negate-Multiply-Subtract Half-Precision | RV32 and RV64 |
fround.h | No synopsis available | RV32 and RV64 |
froundnx.h | No synopsis available | RV32 and RV64 |
fsgnj.h | Floating-Point Sign-Inject Half-Precision | RV32 and RV64 |
fsgnjn.h | Floating-Point Sign-Inject Negate Half-Precision | RV32 and RV64 |
fsgnjx.h | Floating-Point Sign-Inject XOR Half-Precision | RV32 and RV64 |
fsqrt.h | Floating-Point Square Root Half-Precision | RV32 and RV64 |
fsub.h | Floating-Point Subtract Half-Precision | RV32 and RV64 |