When does rm matter for fcvt.h.wu?
When the integer value cannot be exactly represented in the destination floating-point format, rm or dynamic frm selects the rounding direction.
Convert an unsigned 32-bit integer to half-precision FP, rounding according to rm or frm.
fcvt.h.wu converts the unsigned 32-bit integer in x[rs1] to a half-precision result in f[rd]. Its OP-FP encoding uses funct5=11010, fmt=H (10), and rs2=WU (00001); an inexact result rounds according to rm or dynamic frm and records applicable fflags.
Shows the Zfh-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.
The word is split as an R-type OP-FP instruction; FCVT uses opcode 1010011.
The current 32-bit integer example overflows the half-precision finite range; rm selects infinity or the same-sign maximum finite value, and the example sets OF|NX.
The current 32-bit integer example overflows the half-precision finite range; rm selects infinity or the same-sign maximum finite value, and the example sets OF|NX.
This animation shows only Zfh-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.
fcvt.h.wu converts an unsigned 32-bit integer source to a half-precision floating-point result. If the value is not exactly representable, the result is rounded according to rm and written to f[rd].
Understand this scenario with real code like «fcvt.h.wu f0, x10, rne # f0 = (half)(unsigned)x10».
When the integer value cannot be exactly represented in the destination floating-point format, rm or dynamic frm selects the rounding direction.
It differs by source/destination format, integer signedness, RV64 restrictions, and whether rounding or invalid conversion can occur.