Developer Guide and Reference

Contents

Conversion Intrinsics

Intel® Streaming SIMD Extensions 2 (Intel® SSE2) intrinsics for floating-point conversion operations are listed in this topic. The prototypes for Intel® SSE2 intrinsics are in the
emmintrin.h
header file.
To use these intrinsics, include the
immintrin.h
file as follows:
#include <immintrin.h>
Each conversion intrinsic takes one data type and performs a conversion to a different type. Some conversions, such as those performed by the
_mm_cvtpd_ps
intrinsic, result in a loss of precision. The rounding mode used in such cases is determined by the value in the
MXCSR
register. The default rounding mode is round-to-nearest.
The rounding mode used by the C and C++ languages when performing a type conversion is to truncate. The
_mm_cvttpd_epi32
and
_mm_cvttsd_si32
intrinsics use the truncate rounding mode regardless of the mode specified by the
MXCSR
register.
The results of each intrinsic operation are placed in a register. The information about what is placed in each register appears in the tables below, in the detailed explanation for each intrinsic. For each intrinsic, the resulting register is represented by
R
,
R0
,
R1
,
R2
, and
R3
, where each represent the registers in which results are placed.
Intrinsic Name
Operation
Corresponding
Intel® SSE2 Instruction
_mm_cvtpd_ps
Convert DP FP to SP FP
CVTPD2PS
_mm_cvtps_pd
Convert from SP FP to DP FP