fadd.d
Floating add (64 bit)
Adds the double-precision values in the second and third registers and stores the sum in the first.
Used in
- Floating point and the F and D extensionsRISC-V assembly
Forms
fadd.d , , ,
Pseudo-instructions
The processor does not have these forms. The assembler replaces each of them with one or more real instructions. Open a row to see them.
Operands
f1- Any floating-point register,
f0tof31, or its named alias, such asft0,fa0orft11. f2- A floating-point register. It may be the same register as
f1. f3- A floating-point register. It may be the same register as
f1. rm- A rounding mode:
rne(nearest, ties to even),rtz(toward zero),rdn(toward negative infinity),rup(toward positive infinity),rmm(nearest, ties away from zero) ordyn(use the rounding mode infcsr).
.data
a: .double 6.0
b: .double 2.0
.text
la t0, a
fld f1, 0(t0)
la t1, b
fld f2, 0(t1)
# f1 (ft1)=6 and f2 (ft2)=2; fadd.d writes 8.
fadd.d f3, f1, f2