ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 1,823 microarchs · 16,083 chips · 105 sources
Arch:
Tier:

fmax.h

T1 riscv fp insn
Floating-Point Maximum-Number Half-Precision
SourceRISC-V Official Unified Database (riscv-unified-db) (riscv_unified_db)
Reliability TierT1 — Official Specification
ISA / Silicon ScopeRV32/RV64 Zfh, Zhinx
RV32 / RV64 (Ratified & Standard Extensions)
License & VersionApache-2.0 / CC-BY-4.0
main
Upstreamhttps://github.com/riscv/riscv-unified-db
Privilegeuser
ExtensionsZfh, Zhinx

Summary

The fmax.h instruction writes the larger of the half-precision values in _fs1_ and _fs2_ to _fd_. For the purposes of this instruction, the value -0.0 is considered to be less than the value +0.0. If both inputs are NaNs, the result is the canonical NaN. If only one operand is a NaN, the result is the non-NaN operand. Signaling NaN inputs set the invalid operation exception flag, even when the result is not NaN.

Syntax / Encoding

fmax.h fd, fs1, fs2 | 0010110xxxxxxxxxx001xxxxx1010011 (mask=0xfe00707f match=0x2c001053)

Binary Encodings (1)

WidthFormatBit PatternMask / Match
32RV0010110xxxxxxxxxx001xxxxx10100110xfe00707f / 0x2c001053

Operands

NameDescription
fs2bits [24:20]
fs1bits [19:15]
fdbits [11:7]

Reference Notes

The `fmax.h` instruction writes the larger of the half-precision values in _fs1_ and _fs2_ to _fd_. For the purposes of this instruction,
the value `-0.0` is considered to be less than the value `+0.0`. If both inputs are NaNs, the result is
the canonical NaN. If only one operand is a NaN, the result is the non-NaN operand. Signaling NaN inputs
set the invalid operation exception flag, even when the result is not NaN.