FADD.H
Float Add Half
FADD.H rd, rs1, rs2
Performs 16-bit floating-point addition.
Encoding
Binary Layout
0000010
31:25
rs2
24:20
rs1
19:15
rm
14:12
rd
11:7
1010011
6:0
Operands
-
rd
Destination floating-point register -
rs1
Floating-point register (first operand) -
rs2
Floating-point register (second operand)
Example
FADD.H ft0, fa0, fa1
// 16-bit float add.
Related
More in Zfh
Reference
View in RISC-V Unprivileged ISA Specification ↗
RISC-V ISA Manual
Description
FADD.H adds rs2 to rs1 as half-precision values and writes the half-precision 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.
Operation
F[rd] = F[rs1] + F[rs2];