FMAXM.S
Float Maximum (IEEE 754-2019)
FMAXM.S rd, rs1, rs2
Maximum of two single-precision values; the result is the canonical NaN if either input is NaN.
Encoding
Binary Layout
0010100
31:25
rs2
24:20
rs1
19:15
011
14:12
rd
11:7
1010011
6:0
Operands
-
rd
Destination floating-point register -
rs1
Source floating-point register 1 -
rs2
Source floating-point register 2
Example
FMAXM.S t0, a0, a1
Related
More in Zfa
Reference
View in RISC-V Unprivileged ISA Specification ↗
RISC-V ISA Manual
Description
Defined like FMAX.S (+0.0 is greater than -0.0; a signalling NaN input sets the invalid flag) except that if either input is NaN the result is the canonical NaN.
Operation
F[rd] = (isNaN(F[rs1]) || isNaN(F[rs2])) ? canonicalNaN : fmax(F[rs1], F[rs2]);