FEQ.H

Float Equal (Half)

FEQ.H rd, rs1, rs2

Sets integer rd to 1 if half-precision rs1 equals rs2, else 0.

Encoding

Binary Layout
1010010
31:25
rs2
24:20
rs1
19:15
010
14:12
rd
11:7
1010011
6:0
 
Format R-Type
Opcode 0xA4002053
Extension Zfh

Operands

  • rd
    Destination integer register (0 or 1)
  • rs1
    Floating-point register (first operand)
  • rs2
    Floating-point register (second operand)

Example

FEQ.H t0, fa0, fa1

Related

More in Zfh

Description

FEQ.H writes 1 to integer register rd if the half-precision value in rs1 is equal to the value in rs2, and 0 otherwise. The result is 0 if either operand is a NaN. FEQ.H is a quiet comparison: it sets the invalid-operation flag only if an input is a signalling NaN.

Operation

R[rd] = (F[rs1] == F[rs2]) ? 1 : 0;