What does FMIN.H do with one NaN operand?
Ordinary FMIN/FMAX returns the other non-NaN operand when exactly one operand is NaN; it returns canonical NaN when both operands are NaN.
FMIN.H selects the numerically smaller value from two half-precision floating-point operands.
FMIN.H uses the OP-FP encoding with the Zfh format to select the numerically smaller value from two half-precision source operands. Ordinary FMIN/FMAX returns the non-NaN operand when exactly one input is NaN, returns canonical NaN when both inputs are NaN, and sets NV if either input is a signaling NaN. The official rule orders -0.0 below +0.0.
Shows the Zfh-extension half-precision OP-FP flow: decode fields, read FP operands, perform FMIN semantics, then write rd.
The word is split as an R-type OP-FP instruction; half-precision OP-FP instructions use opcode 1010011.
The default example shows the official signed-zero ordering: -0.0 is less than +0.0. With NaNs, ordinary FMIN/FMAX returns the non-NaN operand for a single NaN and canonical NaN for two NaNs; signaling NaN sets NV.
The default example shows the official signed-zero ordering: -0.0 is less than +0.0. With NaNs, ordinary FMIN/FMAX returns the non-NaN operand for a single NaN and canonical NaN for two NaNs; signaling NaN sets NV.
This animation shows only Zfh-extension ISA-visible OP-FP encoding, example numeric results, and fflags relationship; it does not model FPU pipelines, latency, every IEEE 754 corner case, or microarchitecture.
FMIN.H is not a compare that writes 0/1; it selects a half-precision result in the floating-point register file. The key points are single-NaN returns non-NaN, two NaNs return canonical NaN, and -0.0 is ordered below +0.0.
Understand this scenario with real code like «fmin.h f10, f11, f12 ; f10 = min(f11, f12)».
Understand this scenario with real code like «fmin.h f10, f11, f12 ; f10 = min(f11, f12)».
Ordinary FMIN/FMAX returns the other non-NaN operand when exactly one operand is NaN; it returns canonical NaN when both operands are NaN.
No. FMIN/FMAX is a selection operation; its funct3 selects minimum or maximum semantics, not a rounding mode.