FSUB.H
Float Subtract (Half)
FSUB.H rd, rs1, rs2
Performs 16-bit floating-point subtraction.
Encoding
Binary Layout
0000110
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
FSUB.H ft0, fa0, fa1
Related
More in Zfh
Reference
View in RISC-V Unprivileged ISA Specification ↗
RISC-V ISA Manual
Description
FSUB.H subtracts rs2 from 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];