Webcentive RISC-V Reference

Zfa instructions

Additional Floating-Point Instructions

Zfa adds instructions for immediate loads, IEEE 754-2019 minimum and maximum operations, round-to-integer operations, and quiet floating-point comparisons. For RV32D, the Zfa extension also adds instructions to transfer double-precision floating-point values to and from integer registers, and for RV64Q, it adds analogous instructions for quad-precision floating-point values. The Zfa extension depends on the F extension.

Extension description from riscv-unified-db, reformatted.

Specification chapter: The RISC-V Instruction Set Manual, src/unpriv/zfa.adoc.

Instructions (33)

MnemonicName (riscv-unified-db)XLEN
fcvtmod.w.dFloating-Point Convert Double-Precision to Word with ModuloRV32 and RV64
fleq.dFloating-Point Less Than or Equal Quiet Double-PrecisionRV32 and RV64
fleq.hNo synopsis availableRV32 and RV64
fleq.qFloating-Point Less Than or Equal Quiet Quad-PrecisionRV32 and RV64
fleq.sFloating-Point Less Than or Equal Quiet Single-PrecisionRV32 and RV64
fli.dFloating-Point Load Immediate Double-PrecisionRV32 and RV64
fli.hFloating-point Load Immediate Half-precisionRV32 and RV64
fli.qFloating-Point Load Immediate Quad-PrecisionRV32 and RV64
fli.sNo synopsis availableRV32 and RV64
fltq.dFloating-Point Less Than Quiet Double-PrecisionRV32 and RV64
fltq.hNo synopsis availableRV32 and RV64
fltq.qFloating-Point Less Than Quiet Quad-PrecisionRV32 and RV64
fltq.sFloating-Point Less Than Quiet Single-PrecisionRV32 and RV64
fmaxm.dFloating-Point Maximum-Number NaN Double-PrecisionRV32 and RV64
fmaxm.hNo synopsis availableRV32 and RV64
fmaxm.qFloating-Point Maximum-Number NaN Quad-PrecisionRV32 and RV64
fmaxm.sNo synopsis availableRV32 and RV64
fminm.dFloating-Point Minimum-Number NaN Double-PrecisionRV32 and RV64
fminm.hNo synopsis availableRV32 and RV64
fminm.qFloating-Point Minimum-Number NaN Quad-PrecisionRV32 and RV64
fminm.sNo synopsis availableRV32 and RV64
fmvh.x.dFloating-Point Move High Half from Double-Precision Register to Integer RegisterRV32 only
fmvh.x.qFloating-Point Move High Half to Integer from Quad-PrecisionRV64 only
fmvp.d.xFloating-Point Move Pair from Integer Registers to Double-Precision RegisterRV32 only
fmvp.q.xFloating-Point Move Pair from Integer Registers to Quad-Precision RegisterRV64 only
fround.dFloating-Point Round Double-PrecisionRV32 and RV64
fround.hNo synopsis availableRV32 and RV64
fround.qFloating-Point Round Quad-PrecisionRV32 and RV64
fround.sFloating-point round single-precision float to integerRV32 and RV64
froundnx.dFloating-Point Round-to-Integer Inexact Double-PrecisionRV32 and RV64
froundnx.hNo synopsis availableRV32 and RV64
froundnx.qFloating-Point Round-to-Integer Inexact Quad-PrecisionRV32 and RV64
froundnx.sFloating-point Round Single-precision to Integer with InexactRV32 and RV64