Which registers does fcvt.s.h use?
rd and rs1 are FP; rs2 encodes the source format.
Half to Single FP; finite widening is exact, with legal rm still required.
rd is FP f0–f31 (f0 is writable); rs1 is FP f0–f31; source/destination may overlap. rs2 selects the source type; no immediate.
32-bit OP-FP: funct5=01000, fmt=00 (destination S), rs2=00010, opcode=1010011.
RV32/RV64; requires Zfhmin (also included in Zfh), depending on F. Enable required extensions and FP state.
Optional rm defaults to dyn using frm; static 101/110 and dynamic frm=101–111 have reserved behavior. Finite widening is exact; software should select rne, and legal rm leaves the value unchanged.
A source narrower than FLEN requires NaN-boxing; an invalid box becomes canonical NaN. S results set all upper bits to ones when FLEN>32. Exceptions accrue in fflags; flag setting alone causes no FP exception trap. Finite animation examples assume initial fflags=0.
fcvt.s.h converts a half-precision value in FP rs1 to single precision in FP rd. Finite widening is exact; rm and reserved encoding rules still apply.
Shows the Zfhmin-extension FCVT flow: decode OP-FP fields, fmt/rs2 conversion selection, the rm rounding field, read the floating-point source, then write the floating-point destination.
Leave rm empty for the assembly default dyn (111); this DYN example fixes frm=RNE. Use lowercase rne/rtz/rdn/rup/rmm/dyn only.
Assume required extensions and FP state are enabled, applicable source NaN-boxing is valid, and initial fflags=0. Results preview the current input; Writeback represents commit.
The word is split as an R-type OP-FP instruction; FCVT uses opcode 1010011.
H-to-S is a floating-point widening conversion; the current finite example is exact, does not need rm rounding, and leaves example fflags at 0.
H-to-S is a floating-point widening conversion; the current finite example is exact, does not need rm rounding, and leaves example fflags at 0.
This animation shows only Zfhmin-extension FCVT ISA-visible encoding, source/destination register direction, rounding field, and example fflags; it does not model FPU pipelines, exception handling, NaN payloads, or microarchitecture.
Half to Single FP; finite widening is exact, with legal rm still required.
Understand this scenario with real code like «# f1 = 1.25; rm=rne; initial fflags=0 fcvt.s.h f0, f1, rne # f0 = 1.25; fflags=0».
rd and rs1 are FP; rs2 encodes the source format.
Finite widening is exact; legal rm leaves the value unchanged, but rm remains encoded and software should select rne. Omitted rm defaults to dyn using frm; reserved encoding rules still apply.