User Guide
128-Bit Media and Scientific Programming 163
24592—Rev. 3.15—November 2009 AMD64 Technology
The CVTSS2SD instruction converts a single-precision floating-point value in the low-order 32 bits of
the second operand to a double-precision floating-point value in the low-order 64 bits of the
destination. The high-order 64 bits in the destination XMM register are not modified.
The CVTSD2SS instruction converts a double-precision floating-point value in the low-order 64 bits
of the second operand to a single-precision floating-point value in the low-order 64 bits of the
destination. The three high-order doublewords in the destination XMM register are not modified. If the
result of the conversion is an inexact value, the value is rounded.
Convert Floating-Point to XMM Integer. These instructions convert floating-point data types in
XMM registers or memory into integer data types in XMM registers.
• CVTPS2DQ—Convert Packed Single-Precision Floating-Point to Packed Doubleword Integers
• CVTPD2DQ—Convert Packed Double-Precision Floating-Point to Packed Doubleword Integers
• CVTTPS2DQ—Convert Packed Single-Precision Floating-Point to Packed Doubleword Integers,
Truncated
• CVTTPD2DQ—Convert Packed Double-Precision Floating-Point to Packed Doubleword
Integers, Truncated
The CVTPS2DQ and CVTTPS2DQ instructions convert four single-precision floating-point values in
the second operand to four 32-bit signed integer values in the destination. For the CVTPS2DQ
instruction, if the result of the conversion is an inexact value, the value is rounded, but for the
CVTTPS2DQ instruction such a result is truncated (rounded toward zero).
The CVTPD2DQ and CVTTPD2DQ instructions convert two double-precision floating-point values
in the second operand to two 32-bit signed integer values in the destination. The high-order 64 bits in
the destination XMM register are cleared to all 0s. For the CVTPD2DQ instruction, if the result of the
conversion is an inexact value, the value is rounded, but for the CVTTPD2DQ instruction such a result
is truncated (rounded toward zero).
For a description of 128-bit media instructions that convert in the opposite direction—integer to
floating-point—see “Convert Integer to Floating-Point” on page 139.
Convert Floating-Point to MMX™ Integer. These instructions convert floating-point data types in
XMM registers or memory into integer data types in MMX registers.
• CVTPS2PI—Convert Packed Single-Precision Floating-Point to Packed Doubleword Integers
• CVTPD2PI—Convert Packed Double-Precision Floating-Point to Packed Doubleword Integers
• CVTTPS2PI—Convert Packed Single-Precision Floating-Point to Packed Doubleword Integers,
Truncated
• CVTTPD2PI—Convert Packed Double-Precision Floating-Point to Packed Doubleword Integers,
Truncated
The CVTPS2PI and CVTTPS2PI instructions convert two single-precision floating-point values in the
low-order 64 bits of an XMM register or a 64-bit memory location to two 32-bit signed integer values
in an MMX register. For the CVTPS2PI instruction, if the result of the conversion is an inexact value,