Intel 64 and IA-32 Architectures Software Developers Manual Volume 1, Basic Architecture

10-14 Vol. 1
PROGRAMMING WITH STREAMING SIMD EXTENSIONS (SSE)
The COMISS (compare scalar single-precision floating-point values and set EFLAGS)
and UCOMISS (unordered compare scalar single-precision floating-point values and
set EFLAGS) instructions compare the low values of two packed single-precision
floating-point operands and set the ZF, PF, and CF flags in the EFLAGS register to
show the result (greater than, less than, equal, or unordered). These two instruc-
tions differ as follows: the COMISS instruction signals a floating-point invalid-opera-
tion (#I) exception when a source operand is either a QNaN or an SNaN; the
UCOMISS instruction only signals an invalid-operation exception when a source
operand is an SNaN.
10.4.2.2 SSE Shuffle and Unpack Instructions
SSE shuffle and unpack instructions shuffle or interleave the contents of two packed
single-precision floating-point values and store the results in the destination
operand.
The SHUFPS (shuffle packed single-precision floating-point values) instruction places
any two of the four packed single-precision floating-point values from the destination
operand into the two low-order doublewords of the destination operand, and places
any two of the four packed single-precision floating-point values from the source
operand in the two high-order doublewords of the destination operand (see
Figure 10-7). By using the same register for the source and destination operands,
the SHUFPS instruction can shuffle four single-precision floating-point values into
any order.
The UNPCKHPS (unpack and interleave high packed single-precision floating-point
values) instruction performs an interleaved unpack of the high-order single-precision
floating-point values from the source and destination operands and stores the result
in the destination operand (see Figure 10-8).
Figure 10-7. SHUFPS Instruction, Packed Shuffle Operation
X3 X2 X1 X0
Y3 Y2 Y1 Y0
Y3 ... Y0 Y3 ... Y0 X3 ... X0 X3 ... X0
DEST
SRC
DEST