FMAX.H
Float Maximum (Half)
FMAX.H rd, rs1, rs2
Writes the larger of two 16-bit floating-point values to rd.
Encoding
Binary Layout
0010110
31:25
rs2
24:20
rs1
19:15
001
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
FMAX.H ft0, fa0, fa1
Related
More in Zfh
Reference
View in RISC-V Unprivileged ISA Specification ↗
RISC-V ISA Manual
Description
FMAX.H writes the larger of the half-precision values in rs1 and rs2 to rd. For these instructions -0.0 is considered less than +0.0. If both inputs are NaN the result is the canonical NaN; if only one is a NaN the result is the other operand. A signalling NaN input sets the invalid-operation flag even when the result is not a NaN.
Operation
F[rd] = max(F[rs1], F[rs2]);