When does rm matter for fcvt.h.l?
When the integer value cannot be exactly represented in the destination floating-point format, rm or dynamic frm selects the rounding direction.
Convert signed 64-bit int to half FP [RV64]. R-type, fmt=H(10). Large ints lose precision.
fcvt.h.l converts a signed 64-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.l converts a signed 64-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.l f0, x10, rne # f0 = (half)(long)x10 (RV64)».
Understand this scenario with real code like «fcvt.h.l f0, x10, rne # f0 = (half)(long)x10 (RV64)».
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.