Does FROUNDNX.Q write an integer register?
No. The result is written to floating-point register f[rd]; the floating-point value is integral.
Round a quad-precision floating-point value to an integral value in the same FP format; set NX only when the input is not NaN and differs from the rounded result.
When the Q extension is implemented, FROUNDNX.Q rounds the quad-precision floating-point value in f[rs1] to an integral value according to rm, but writes the result back to f[rd] in the same quad-precision floating-point format. It sets NX only when the input is not NaN and differs from the rounded result. A signaling NaN sets NV; a quiet NaN produces the canonical NaN under the general FP NaN rule.
Shows the Zfa + Q-extension quad-precision OP-FP flow: decode fields, read FP operands, perform FROUNDNX semantics, then write rd.
Leave rm empty to use the assembly default dyn encoding and fcsr.frm below.
The word is split as an R-type OP-FP instruction; quad-precision OP-FP instructions use opcode 1010011.
This bounded teaching model computes whitelisted finite examples plus zero, infinity, and NaN; FROUNDNX.Q writes the integral value in Q format. Zero and infinity are copied. NX is set when the input differs from the rounded result and is not NaN.
This bounded teaching model computes whitelisted finite examples plus zero, infinity, and NaN; FROUNDNX.Q writes the integral value in Q format. Zero and infinity are copied. NX is set when the input differs from the rounded result and is not NaN.
Assumes Zfa + Q, FS enabled, correctly NaN-boxed inputs, and initial fflags=0. Accepts the listed exact finite whitelist, signed zeros, infinity, qNaN, and sNaN. Rounding uses rm/frm; zero and infinity are copied, and sNaN sets NV. NX is set when a non-NaN input differs from the rounded result. rd may overlap rs1, and f0 accepts writeback. Steps are teaching views.
This animation shows only Zfa + Q-extension ISA-visible OP-FP encoding, example numeric results, and fflags relationship; it does not model FPU pipelines, latency, every IEEE 754 corner case, or microarchitecture.
Unlike FP-to-integer FCVT.W.Q, FROUNDNX.Q writes an integral value in the same FP format to an FP register. FCVT.W.Q writes an integer register. FROUNDNX sets NX when a non-NaN input changes.
Assume required extensions and FP state enabled, f11=1.5 in this format (validly NaN-boxed when narrower than FLEN), and initial fflags=0: the rne example writes f10=2.0 in an FP register; the changed value sets NX=1.
Assume required extensions and FP state enabled, f11=1.5 in this format (validly NaN-boxed when narrower than FLEN), and initial fflags=0: the rne example writes f10=2.0 in an FP register; the changed value sets NX=1.
No. The result is written to floating-point register f[rd]; the floating-point value is integral.
FROUNDNX sets NX only when the input is not NaN and differs from the rounded result; FROUND does not set NX.