When does rm matter for fcvt.h.q?
When the destination format cannot exactly represent the source value, rm or dynamic frm selects the rounding direction.
Convert quad to half FP. R-type, fmt=H(10), rs2=Q(11). Significant precision loss.
fcvt.h.q converts a quad-precision source operand to a narrower half-precision result. If the destination format cannot represent the value exactly, the result is rounded according to rm.
fcvt.h.q converts a quad-precision source operand to a narrower half-precision result. If the destination format cannot represent the value exactly, the result is rounded according to rm.
Understand this scenario with real code like «fcvt.h.q f0, f1, rne # f0 = (half)(quad)f1».
Understand this scenario with real code like «fcvt.h.q f0, f1, rne # f0 = (half)(quad)f1».
When the destination format cannot exactly represent the source value, 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.