Which registers does fcvt.s.wu use?
rd is FP; rs1 is integer, and rs2 only encodes the integer type.
Unsigned Int32 to Single FP; round according to rm when inexact.
rd is FP f0–f31 (f0 is writable); rs1 is integer x0–x31; x0 always reads zero, and W/WU interpret the low 32 bits. rs2 selects the source type; no immediate.
32-bit OP-FP: funct5=11010, fmt=00 (destination S), rs2=00001, opcode=1010011.
RV32/RV64; requires 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. Inexact conversion rounds using rm and raises NX.
Integer sources need no boxing checks. 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.wu converts the low 32 bits of x[rs1], interpreted as an unsigned integer to single precision in FP rd. rm/frm selects rounding; inexact results set NX.
Shows the F-extension FCVT flow: decode OP-FP fields, fmt/rs2 conversion selection, the rm rounding field, read the integer 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.
The current 32-bit integer example is not exactly representable as S format, so the rounded example shows NX.
The current 32-bit integer example is not exactly representable as S format, so the rounded example shows NX.
This animation shows only F-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.
Unsigned Int32 to Single FP; round according to rm when inexact.
Understand this scenario with real code like «# x1 = 16777217; rm=rne; initial fflags=0 fcvt.s.wu f0, x1, rne # f0 = 16777216; fflags=NX».
rd is FP; rs1 is integer, and rs2 only encodes the integer type.
Inexact conversion rounds using rm and raises NX. Omitted rm defaults to dyn using frm; reserved encoding rules still apply.