3-386
INSTRUCTION SET REFERENCE
MAXPS—Packed Single-FP Maximum
Description
The MAXPS instruction returns the maximum SP FP numbers from XMM1 and XMM2/Mem.
If the values being compared are both zeroes, source2 (xmm2/m128) would be returned. If
source2 (xmm2/m128) is an sNaN, this sNaN is forwarded unchanged to the destination (i.e., a
quieted version of the sNaN is not returned).
Figure 3-36. Operation of the MAXPS Instruction
Operation
IF (DEST[31-0]=NaN) THEN
DEST[31-0] = SRC[31-0];
ELSE
IF (SRC[31-0] = NaN) THEN
DEST[31-0] = SRC[31-0];
ELSE
IF (DEST[31-0] > SRC/m128[31-0]) THEN
DEST[31-0] = DEST[31-0];
ELSE
DEST[31-0] = SRC/m128[31-0];
FI
FI
FI
OpcodeInstruction
Description
0F,5F,/rMAXPS xmm1,
xmm2/m128
Return the maximum SP FP numbers between XMM2/Mem and
XMM1.
Xmm1
>
>
>
>
Xmm1
Xmm2/
m128
99.1
10.99
519.0
8.7
65.0
267.0
519.0
=
=
=
=