3-123
INSTRUCTION SET REFERENCE
CVTPS2PIĀPacked Single-FP to Packed INT32 Conversion
Description
The CVTPS2PI instruction converts the lower two SP FP numbers in xmm/m64 to signed 32-bit
integers in mm. When the conversion is inexact, the value rounded according to the MXCSR is
returned. If the converted result(s) is/are larger than the maximum signed 32 bit value, the
Integer Indefinite value (0x80000000) will be returned.
Figure 3-29. Operation of the CVTPS2PI Instruction
Operation
DEST[31-0]= (int) (SRC/m64[31-0]);
DEST[63-32]= (int) (SRC/m64[63-32]);
Intel C/C++ Compiler Intrinsic Equivalent
__m64 _mm_cvt_ps2pi(__m128 a)
__m64 _mm_cvtps_pi32(__m128 a)
Convert the two lower SP FP values of a to two 32-bit integers with truncation, returning the
integers in packed form.
OpcodeInstruction
Description
0F,2D,/rCVTPS2PI mm, xmm/m64Convert lower two SP FP from XMM/Mem to two 32-bit
signed integers in MM using rounding specified by
MXCSR.
Xmm1
Xmm2/
m64
CVTPS2PI xmm1, xmm1/m64
1.0
Mm1
Int
Int