Does FROUND.D write an integer register?
No. The result is written to floating-point register f[rd]; the floating-point value is integral.
Round a double-precision floating-point value to an integral value in the same FP format, without setting NX.
FROUND.D requires RV32/RV64 Zfa+D and enabled FP state. It rounds f[rs1] to an integral value according to rm and writes it in D format to f[rd]. Zero and infinity are copied unchanged. NaN results are canonical; signaling NaN also accrues NV. It sets no NX, DZ, OF or UF and does not clear existing fflags.
Shows the Zfa + D-extension double-precision OP-FP flow: decode fields, read FP operands, perform FROUND 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; double-precision OP-FP instructions use opcode 1010011.
This bounded teaching model computes whitelisted finite examples plus zero, infinity, and NaN; FROUND.D writes the integral value in D format. Zero and infinity are copied. FROUND does not set NX and sets no exception flags other than NV.
This bounded teaching model computes whitelisted finite examples plus zero, infinity, and NaN; FROUND.D writes the integral value in D format. Zero and infinity are copied. FROUND does not set NX and sets no exception flags other than NV.
Assumes Zfa + D, 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. FROUND does not set NX. rd may overlap rs1, and f0 accepts writeback. Steps are teaching views.
This animation shows only Zfa + D-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.
FROUND.D rounds a D value to an integral value in an FP register. It deliberately does not set NX; FROUNDNX.D sets NX when a non-NaN input differs from the rounded result.
Assume RV32/RV64 Zfa+D, enabled FP state, f11=1.5 as a validly NaN-boxed D value if FLEN is wider, and initial fflags=0: fround.d f10, f11, rup writes f10=2.0 in an FP register, without setting NX; fflags remains 0.
Assume RV32/RV64 Zfa+D, enabled FP state, f11=1.5 as a validly NaN-boxed D value if FLEN is wider, and initial fflags=0: fround.d f10, f11, rup writes f10=2.0 in an FP register, without setting NX; fflags remains 0.
No. The result is written to floating-point register f[rd]; the floating-point value is integral.
FROUND does not set NX; FROUNDNX sets NX only when the input differs from the rounded result and is not NaN.