ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 913 microarchs · 15,555 chips · 105 sources
Arch:
Tier:

Zfinx

T1 riscv feature feature
Single-precision floating-point instructions using integer registers
SourceRISC-V Official Unified Database (riscv-unified-db) (riscv_unified_db)
Reliability TierT1 — Official Specification
ISA / Silicon Scopev1.0.0 (ratified)
RV32 / RV64 (Ratified & Standard Extensions)
License & VersionApache-2.0 / CC-BY-4.0
main
Upstreamhttps://github.com/riscv/riscv-unified-db
ExtensionsZicsr

Summary

The "Zfinx" extension (pronounced "z-f-in-x") provides instructions similar to those in the standard floating-point F extension for single-precision floating-point instructions but which operate on the x registers instead of the f registers.

Syntax / Encoding

Zfinx v1.0.0 (ratified)

Reference Notes

The "Zfinx" extension (pronounced "z-f-in-x") provides instructions similar to those in the
standard floating-point F extension for single-precision floating-point instructions but
which operate on the x registers instead of the f registers.

[NOTE]
--
The F extension uses separate f registers for floating-point computation,
to reduce register pressure and simplify the provision of register-file ports for wide superscalars. However, the additional architectural state increases the minimal implementation cost. By eliminating the f registers, the Zfinx extension substantially reduces the cost of simple RISC-V implementations with floating-point instruction-set support. Zfinx also reduces context-switch cost.

In general, software that assumes the presence of the F extension is incompatible with software that assumes the presence of the Zfinx extension, and vice versa.
--

The Zfinx extension adds all of the instructions that the F extension adds,
except for the transfer instructions FLW, FSW, FMV.W.X, FMV.X.W, C.FLW[SP], and C.FSW[SP].

Zfinx software uses integer loads and stores to transfer floating-point values from and to memory.
Transfers between registers use either integer arithmetic or floating-point sign-injection instructions.

The Zfinx variants of these F-extension instructions have the same semantics,
except that whenever such an instruction would have accessed an f register,
it instead accesses the x register with the same number.

= Processing of Narrower Values

Floating-point operands of width w stem cec1626943fd22b8bc5d3763224c7c1f XLEN bits occupy bits w-1:0 of an x register. Floating-point operations on w-bit operands ignore operand bits XLEN-1: w.

Floating-point operations that produce w stem cec1626943fd22b8bc5d3763224c7c1f XLEN-bit results fill bits XLEN-1: w with copies of bit w-1 (the sign bit).

[NOTE]
--
The NaN-boxing scheme employed in the f registers was designed to efficiently support recoded floating-point formats. Recoding is less practical for Zfinx, though, since the same registers hold both floating-point and integer operands. Hence, the need for NaN boxing is diminished.

Sign-extending 32-bit floating-point numbers when held in RV64 x registers is compatible with the existing RV64 calling conventions, which leave bits 63-32 undefined when passing a 32-bit floating point value in x registers. To keep the architecture more regular, we extend this pattern to 16-bit floating-point numbers in both RV32 and RV64.
--