How is fcvtmod.w.d different from fcvt.w.d?
fcvtmod.w.d takes the low 32 bits of the unbounded RTZ conversion result modulo 2^32; fcvt.w.d uses the official invalid-conversion result for out-of-range integer conversion.
Modular convert double-precision float to signed word (mod 2^32)
fcvtmod.w.d is a Zfa instruction. It converts a double-precision value toward zero to an unbounded two's-complement integer, takes the low 32 bits, sign-extends to XLEN, and converts NaN and infinities to zero.
fcvtmod.w.d is a Zfa instruction. It converts a double-precision value toward zero to an unbounded two's-complement integer, takes the low 32 bits, sign-extends to XLEN, and converts NaN and infinities to zero.
Understand this scenario with real code like «fcvtmod.w.d x10, f0, rtz # x10 = (int32_t)(f0) mod 2^32, always RTZ».
Understand this scenario with real code like «fcvtmod.w.d x10, f0, rtz # x10 = (int32_t)(f0) mod 2^32, always RTZ».
Understand this scenario with real code like «fcvtmod.w.d x10, f0, rtz # x10 = (int32_t)(f0) mod 2^32, always RTZ».
fcvtmod.w.d takes the low 32 bits of the unbounded RTZ conversion result modulo 2^32; fcvt.w.d uses the official invalid-conversion result for out-of-range integer conversion.
Zfa requires assembly syntax to explicitly specify RTZ; other rm encodings are reserved.