ia-32_volume1_basic-arch

Values instruction multiplies the low single

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: eption 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. DEST X3 X2 X1 X0 SRC Y3 Y2 Y1 Y0 DEST Y3 ... Y0 Y3 ... Y0 X3 ... X0 X3 ... X0 Figure 10-7. SHUFPS Instruction, Packed Shuffle Operation 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). 10-14 Vol. 1 PROGRAMMING WITH STREAMING SIMD EXTENSIONS (SSE) DEST X3 X2 X1 X0 SRC Y3 Y2 Y1 Y0 DEST Y3 X3 Y2 X2 Figure 10-8. UNPCKHPS Instruction, High Unpack and Interleave Operation The UNPCKLPS (unpack and interleave low packed single-precision floating-point values) instruction performs an interleaved unpack of the low-order single-precision floating-point values from the source and destination operands and stores the result in the destination operand (see Figure 10-9). DEST X3 X2 X1 X0 SRC Y3 Y2 Y1 Y0 DEST Y1 X1 Y0 X0 Figure 10-9. UNPCKLPS Instruction, Low Unpack and Interleave Operation 10.4.3 SSE Conversion Instructions SSE conversion instructions (see Figure 11-8) support packed and scalar conversions between single-precision floating-point and doubleword integer formats. The CVTPI2PS (convert packed doubleword integers to packed single-precision floating-point values) instruction converts two packed signed doubleword integers into two packed single-precision floating-point values. When the conversion is inexact, the result is rounded according to the rounding mode selected in the MXCSR register. Vol. 1 10-15 PROGRAMMING WITH STREAMING SIMD EXTENSIONS (SSE) The CVTSI2SS (convert doubleword integer to scalar single-precision floating-point value) instruction converts a signed doubleword integer into a single-precision floating-point value. When the conversion is inexact, the result is rounded according to the rounding mode selected in the MXCSR register. The CVTPS2PI (convert packed single-precision floating-point values to packed doubleword integers) instruction converts two packed single-precision floating-point values into two packed signed doubleword integers. When the conversion i...
View Full Document

This note was uploaded on 10/01/2013 for the course CPE 103 taught by Professor Watlins during the Winter '11 term at Mississippi State.

Ask a homework question - tutors are online