When does rm matter for fcvt.w.d?
When conversion requires rounding, rm or dynamic frm selects the rounding direction; out-of-range or NaN inputs follow the official invalid-conversion rule.
Convert double to signed int32: rd = (int32_t)f[rs1].
fcvt.w.d converts a double-precision source operand to a signed 32-bit integer result. Floating-point-to-integer conversion rounds according to rm and writes integer register rd.
fcvt.w.d converts a double-precision source operand to a signed 32-bit integer result. Floating-point-to-integer conversion rounds according to rm and writes integer register rd.
Understand this scenario with real code like «fcvt.w.d x10, f0, rtz # x10 = (int)f0».
When conversion requires rounding, rm or dynamic frm selects the rounding direction; out-of-range or NaN inputs follow the official invalid-conversion rule.
It differs by source/destination format, integer signedness, RV64 restrictions, and whether rounding or invalid conversion can occur.