When does rm matter for fcvt.h.w?
When the integer value cannot be exactly represented in the destination floating-point format, rm or dynamic frm selects the rounding direction.
Convert signed 32-bit integer to half-precision float
fcvt.h.w converts a signed 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].
fcvt.h.w converts a signed 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.w f10, x11, rne ; f10 = (half)x11».
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.