When is conversion invalid?
Round before checking 0..2^64−1; below-range values or −infinity yield 0, while above-range values, +infinity, or any NaN yield 2^64−1, setting NV.
Convert quad-precision FP to unsigned 64-bit integer. RV64 Q only.
rd selects integer x0–x31; x0 discards results without suppressing fflags; rs1 selects FP f0–f31; rs2 is a format selector, not a second source register.
32-bit OP-FP: funct5=11000, fmt=11, rs2=00011, opcode=1010011; no immediate.
RV64 Q only; enable required extensions and FP state. Optional rm defaults to dyn, using frm; static 101/110 and dynamic frm=101–111 have reserved behavior. Round before checking integer range; invalid sets NV, otherwise inexact sets NX.
A Q source occupies full FLEN=128, without narrower-source boxing checks. Integer results are not boxed. Exceptions accrue in fflags; setting a flag does not itself cause an FP exception trap.
fcvt.lu.q reads a quad-precision value from FP register rs1, rounds it to a unsigned 64-bit integer using rm/frm, and writes integer register rd.
Shows the Q-extension FCVT flow: decode OP-FP fields, fmt/rs2 conversion selection, the rm rounding field, read the floating-point source, then write the integer destination.
Leave rm empty for the assembly default dyn (111); this DYN example fixes frm=RNE. Use lowercase rne/rtz/rdn/rup/rmm/dyn only.
Assume required extensions and FP state are enabled, applicable source NaN-boxing is valid, and initial fflags=0. Results preview the current input; Writeback represents commit.
The word is split as an R-type OP-FP instruction; FCVT uses opcode 1010011.
The current example rounds to a 64-bit integer according to rm and shows NX because the source has a fractional part.
The current example rounds to a 64-bit integer according to rm and shows NX because the source has a fractional part.
This animation shows only Q-extension FCVT ISA-visible encoding, source/destination register direction, rounding field, and example fflags; it does not model FPU pipelines, exception handling, NaN payloads, or microarchitecture.
fcvt.lu.q reads a quad-precision value from FP register rs1, rounds it to a unsigned 64-bit integer using rm/frm, and writes integer register rd.
Understand this scenario with real code like «# RV64; f1=3.5; fflags=0 fcvt.lu.q x10, f1, rtz # x10=3; NX».
Round before checking 0..2^64−1; below-range values or −infinity yield 0, while above-range values, +infinity, or any NaN yield 2^64−1, setting NV.
No. Only the integer writeback is discarded; NV or NX still accrues according to the source and rounded result.