What does FMAX.Q 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.
FMAX.Q selects the numerically larger value from two quad-precision floating-point operands.
FMAX.Q uses the OP-FP encoding with the Q format to select the numerically larger value from two quad-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 Q-extension quad-precision OP-FP flow: decode fields, read FP operands, perform FMAX semantics, then write rd.
The word is split as an R-type OP-FP instruction; quad-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 Q-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.
FMAX.Q is not a compare that writes 0/1; it selects a quad-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 «fmax.q f0, f1, f2 # f0 = max(f1,f2)».
Understand this scenario with real code like «fmax.q f0, f1, f2 # f0 = max(f1,f2)».
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.