VFIXUPIMMPD - FIX UP IMMediate Packed Double

VFIXUPIMMPD xmm1{k1}{z}, xmm2, xmm3/m128/m64bcst, imm8    (V5+VL
__m128d _mm_fixupimm_pd(__m128d a, __m128d b, __m128i c, int imm8);
__m128d _mm_mask_fixupimm_pd(__m128d a, __mmask8 k, __m128d b, __m128i c, int imm8);
__m128d _mm_maskz_fixupimm_pd(__mmask8 k, __m128d a, __m128d b, __m128i c, int imm8);


For each double, look up the table of (3) using the value of (2), and set the value indicated by (3) to the first operand (return value).
VFIXUPIMMPD ymm1{k1}{z}, ymm2, ymm3/m256/m64bcst, imm8    (V5+VL
__m256d _mm256_fixupimm_pd(__m256d a, __m256d b, __m256i c, int imm8);
__m256d _mm256_mask_fixupimm_pd(__m256d a, __mmask8 k, __m256d b, __m256i c, int imm8);
__m256d _mm256_maskz_fixupimm_pd(__mmask8 k, __m256d a, __m256d b, __m256i c, int imm8);


For each double, look up the table of (3) using the value of (2), and set the value indicated by (3) to the first operand (return value).
VFIXUPIMMPD zmm1{k1}{z}, zmm2, zmm3/m512/m64bcst{sae}, imm8    (V5
__m512d _mm512_fixupimm_pd(__m512d a, __m512d b, __m512i c, int imm8);
__m512d _mm512_mask_fixupimm_pd(__m512d a, __mmask8 k, __m512d b, __m512i c, int imm8);
__m512d _mm512_maskz_fixupimm_pd(__mmask8 k, __m512d a, __m512d b, __m512i c, int imm8);
__m512d _mm512_fixupimm_round_pd(__m512d a, __m512d b, __m512i c, int imm8, int sae);
__m512d _mm512_mask_fixupimm_round_pd(__m512d a, __mmask8 k, __m512d b, __m512i c, int imm8, int sae);
__m512d _mm512_maskz_fixupimm_round_pd(__mmask8 k, __m512d a, __m512d b, __m512i c, int imm8, int sae);


For each double, look up the table of (3) using the value of (2), and set the value indicated by (3) to the first operand (return value).

The table of (3)

Specify the following in the lower 32-bit of each QWORD of (3).

bit 3:0 Specify what to return when (2) is QNaN.
bit 7:4 Specify what to return when (2) is SNaN.
bit 11:8 Specify what to return when (2) is zero.
bit 15:12 Specify what to return when (2) is positive 1.
bit 19:16 Specify what to return when (2) is negative infinity.
bit 23:20 Specify what to return when (2) is positive inifinity.
bit 27:24 Specify what to return when (2) is negative.
bit 31:28 Specify what to return when (2) is positive.

What to return:

0000 the value of (1)
0001 the value of (2)
0010 QNaN( (2) )
0011 QNaN_Indefinite
0100 negative infinity
0101 positive infinity
0110 infinity with the sign of (2)
0111 negative zero
1000 positive zero
1001 negative 1
1010 positive 1
1011 0.5
1100 90.0
1101 PI / 2
1110 the max value of double type
1111 - (the max value of double type)

If each bit of imm8 is set, MXCSR IE/ZE flags are set when any elements of (2) have the specific value.

imm8 bit 7 positive infinity -> IE
imm8 bit 6 negative -> IE
imm8 bit 5 negative infinity -> IE
imm8 bit 4 SNaN -> IE
imm8 bit 3 1 -> IE
imm8 bit 2 1 -> ZE
imm8 bit 1 zero -> IE
imm8 bit 0 zero -> ZE

x86/x64 SIMD Instruction List  Feedback