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.
Assumes required extensions and FS enabled, valid NaN-boxing, and initial fflags=0. Finite inputs use the exact whitelist; signed zeros, infinities, qNaN, and sNaN are supported. Other inputs stop execution. One source register has one initial value; rd may overlap a source and f0 accepts writes. Steps are teaching views.
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 selects a quad-precision maximum into an FP destination register; one NaN returns the non-NaN operand, and two NaNs return canonical NaN.
Assume required extensions and FP state enabled, f1=-0.0 and f2=+0.0 in this instruction's format (validly NaN-boxed for wider FLEN), and initial fflags=0: the example writes f0=+0.0 with fflags still 0. f0 is writable.
Assume required extensions and FP state enabled, f1=-0.0 and f2=+0.0 in this instruction's format (validly NaN-boxed for wider FLEN), and initial fflags=0: the example writes f0=+0.0 with fflags still 0. f0 is writable.
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.