Opcode | Encoding | 16-bit | 32-bit | 64-bit | CPUID Feature Flag(s) | Description |
---|---|---|---|---|---|---|
F3 0F E6 /r CVTDQ2PD xmm1, xmm2/m128 | rm | Invalid | Valid | Valid | sse2 | Convert packed doubleword integers from xmm2/m128 into packed double-precision floating-point values. Store the result in xmm1. |
VEX.128.F3.0F.WIG E6 /r VCVTDQ2PD xmm1, xmm2/m128 | rm | Invalid | Valid | Valid | avx | Convert packed doubleword integers from xmm2/m128 into packed double-precision floating-point values. Store the result in xmm1. |
VEX.256.F3.0F.WIG E6 /r VCVTDQ2PD ymm1, ymm2/m256 | rm | Invalid | Valid | Valid | avx | Convert packed doubleword integers from ymm2/m256 into packed double-precision floating-point values. Store the result in ymm1. |
EVEX.128.F3.0F.W0 E6 /r VCVTDQ2PD xmm1 {k1}{z}, xmm2/m128/m64bcst | erm | Invalid | Valid | Valid | avx512-f avx512-vl | Convert packed doubleword integers from xmm2/m128/m64bcst into packed double-precision floating-point values. Store the result in xmm1. |
EVEX.256.F3.0F.W0 E6 /r VCVTDQ2PD ymm1 {k1}{z}, ymm2/m256/m64bcst | erm | Invalid | Valid | Valid | avx512-f avx512-vl | Convert packed doubleword integers from ymm2/m256/m64bcst into packed double-precision floating-point values. Store the result in ymm1. |
EVEX.512.F3.0F.W0 E6 /r VCVTDQ2PD zmm1 {k1}{z}, zmm2/m512/m64bcst{er} | erm | Invalid | Valid | Valid | avx512-f | Convert packed doubleword integers from zmm2/m512/m64bcst into packed double-precision floating-point values. Store the result in zmm1. |
Encoding
Encoding | Operand 1 | Operand 2 | Operand 3 |
---|---|---|---|
rm | n/a | ModRM.reg[w] | ModRM.r/m[r] |
erm | half | ModRM.reg[w] | ModRM.r/m[r] |
Description
The (V)CVTDQ2PD
instruction converts two, four, or eight doubleword integers from the source operand into double-precision floating-point values. The result is stored in the destination operand.
All forms except the legacy SSE one will zero the upper (untouched) bits.
Operation
public void CVTDQ2PD(SimdF64 dest, SimdI32 src)
{
dest[0] = ConvertToF64(src[0]);
dest[1] = ConvertToF64(src[1]);
// dest[2..] is unmodified
}
void VCVTDQ2PD_Vex(SimdF64 dest, SimdI32 src, int kl)
{
for (int n = 0; n < kl; n++)
dest[n] = ConvertToF64(src[n]);
dest[kl..] = 0;
}
public void VCVTDQ2PD_Vex128(SimdF64 dest, SimdI32 src) =>
VCVTDQ2PD_Vex(dest, src, 2);
public void VCVTDQ2PD_Vex128(SimdF64 dest, SimdI32 src) =>
VCVTDQ2PD_Vex(dest, src, 4);
void VCVTDQ2PD_EvexMemory(SimdF64 dest, SimdI32 src, KMask k, int kl)
{
for (int n = 0; n < kl; n++)
{
if (k[n])
dest[n] = ConvertToF64(EVEX.b ? src[0] : src[n]);
else if (EVEX.z)
dest[n] = 0;
// otherwise unchanged
}
dest[kl..] = 0;
}
public void VCVTDQ2PD_Evex128Memory(SimdF64 dest, SimdI32 src, KMask k) =>
VCVTDQ2PD_EvexMemory(dest, src, k, 2);
public void VCVTDQ2PD_Evex256Memory(SimdF64 dest, SimdI32 src, KMask k) =>
VCVTDQ2PD_EvexMemory(dest, src, k, 4);
public void VCVTDQ2PD_Evex512Memory(SimdF64 dest, SimdI32 src, KMask k) =>
VCVTDQ2PD_EvexMemory(dest, src, k, 8);
void VCVTDQ2PD_EvexRegister(SimdF64 dest, SimdI32 src, KMask k, int kl)
{
if (kl == 8 && EVEX.b)
OverrideRoundingModeForThisInstruction(EVEX.rc);
for (int n = 0; n < kl; n++)
{
if (k[n])
dest[n] = ConvertToF64(src[n]);
else if (EVEX.z)
dest[n] = 0;
// otherwise unchanged
}
dest[kl..] = 0;
}
public void VCVTDQ2PD_Evex128Register(SimdF64 dest, SimdI32 src, KMask k) =>
VCVTDQ2PD_EvexRegister(dest, src, k, 2);
public void VCVTDQ2PD_Evex256Register(SimdF64 dest, SimdI32 src, KMask k) =>
VCVTDQ2PD_EvexRegister(dest, src, k, 4);
public void VCVTDQ2PD_Evex512Register(SimdF64 dest, SimdI32 src, KMask k) =>
VCVTDQ2PD_EvexRegister(dest, src, k, 8);
Intrinsics
__m128 _mm_cvtepi32_pd(__m128i src)
__m128 _mm_mask_cvtepi32_pd(__m128 s, __mmask8 k, __m128i a)
__m128 _mm_maskz_cvtepi32_pd(__mmask8 k, __m128i a)
__m256 _mm256_cvtepi32_pd(__m256i src)
__m256 _mm256_mask_cvtepi32_pd(__m256 s, __mmask8 k, __m256i a)
__m256 _mm256_maskz_cvtepi32_pd(__mmask8 k, __m256i a)
__m512 _mm512_cvtepi32_pd(__m512i a)
__m512 _mm512_cvt_roundepi32_pd(__m512i a, const int rounding)
__m512 _mm512_mask_cvtepi32_pd(__m512 s, __mmask8 k, __m512i a)
__m512 _mm512_mask_cvt_roundepi_pd(__m512 s, __mmask8 k, __m512i a, const int rounding)
__m512 _mm512_maskz_cvtepi32_pd(__mmask8 k, __m512i a)
__m512 _mm512_maskz_cvt_roundepi32_pd(__mmask8 k, __m512i a, const int rounding)
Exceptions
SIMD Floating-Point
#XM
#P
- Inexact result.
Other Exceptions
VEX Encoded Form: See Type 2 Exception Conditions.
EVEX Encoded Form: See Type E2 Exception Conditions.
#UD
- If
VEX.vvvv
is not1111b
. - If
EVEX.vvvvv
is not11111b
.