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
 
Format R-Type
Opcode 0x0C000053
Extension Zfh

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

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];