How is FNMADD.Q different from FMUL plus add/subtract?
FNMADD.Q is fused: the product is not first rounded into an intermediate FP result; the whole expression is rounded once at the end according to rm.
quad-precision negated fused multiply-add: rd = -(rs1 * rs2) - rs3, with one final rounding according to rm.
FNMADD.Q uses the R4 four-register format for quad-precision negated fused multiply-add. The rs1*rs2 product is not rounded or written as an intermediate result; it is combined with rs3 as one fused expression, rounded once according to rm, and written to rd.
Shows the Q-extension quad-precision R4 fused multiply-add flow: decode fields, read FP operands, perform FNMADD semantics, then write rd.
The word is split as an R4-type instruction; FNMADD.Q uses its dedicated major opcode 1001111, not the ordinary OP-FP opcode.
The default example -(1.0 * 2.0) - 0.0 = -2.0 is exactly checkable; the fused operation rounds once at the end, so example fflags remains 0.
The default example -(1.0 * 2.0) - 0.0 = -2.0 is exactly checkable; the fused operation rounds once at the end, so example fflags remains 0.
This animation shows only Q-extension ISA-visible R4 encoding, example numeric results, and fflags relationship; it does not model FPU pipelines, latency, every IEEE 754 corner case, or microarchitecture.
FNMADD.Q's key points are R4 encoding and fused semantics: rs3 is a real third source register, and the product plus/minus term forms one exact intermediate expression that is rounded only once.
Understand this scenario with real code like «fnmadd.q f0, f1, f2, f3, rne # f0 = -(rs1 * rs2) - rs3».
Understand this scenario with real code like «fnmadd.q f0, f1, f2, f3, rne # f0 = -(rs1 * rs2) - rs3».
FNMADD.Q is fused: the product is not first rounded into an intermediate FP result; the whole expression is rounded once at the end according to rm.
It needs rd, rs1, rs2, rs3, and rm fields; bits 31..27 hold rs3, not an ordinary R-type funct5 field.
It can set FP exception flags under the official FP rules, such as inexact, overflow, underflow, or invalid operation; the default animation uses exact finite values, so it shows fflags remaining 0.