3-393
INSTRUCTION SET REFERENCE
MAXSS—Scalar Single-FP Maximum (Continued)
Comments
Note that if only one source is a NaN for these instructions, the Src2 operand (either NaN or real
value) is written to the result; this differs from the behavior for other instructions as defined in
Table 7-9 in Chapter 7, Floating-Point Unit of the Intel Architecture Software DeveloperÂ’s
Manual, Volume 1, which is to always write the NaN to the result, regardless of which source
operand contains the NaN. The upper three operands are still bypassed from the src1 operand,
as in all other scalar operations. This approach for MAXSS allows compilers to use the MAXSS
instruction for common C conditional constructs. If instead of this behavior, it is required that
the NaN source operand be returned, the min/max functionality can be emulated using a
sequence of instructions: comparison followed by AND, ANDN, and OR.