FNMADD.H
Float Negated Fused Multiply-Add (Half)
FNMADD.H rd, rs1, rs2, rs3
Computes -(rs1 * rs2) - rs3 with single rounding (16-bit).
Encoding
Binary Layout
rs3
31:27
10
26:25
rs2
24:20
rs1
19:15
rm
14:12
rd
11:7
1001111
6:0
Operands
-
rd
Destination floating-point register -
rs1
Floating-point register (multiplicand) -
rs2
Floating-point register (multiplier) -
rs3
Floating-point register (addend)
Example
FNMADD.H ft0, fa0, fa1, fa2
Related
More in Zfh
Reference
View in RISC-V Unprivileged ISA Specification ↗
RISC-V ISA Manual
Description
FNMADD.H computes -(rs1 * rs2) - rs3 on half-precision values with a single rounding and writes the result to rd. The result is rounded according to the rm field (rm=DYN selects the rounding mode held in frm) and the accrued exception flags are updated in fflags. It sets the invalid-operation flag for (infinity x 0) even when an addend is a quiet NaN.
Operation
F[rd] = -(F[rs1] * F[rs2]) - F[rs3];