_mm_maskz_reduce_sd
Classification
AVX-512, Miscellaneous, CPUID Test: AVX512DQ
Header File
Instruction
VREDUCESD xmm {z}, xmm, xmm, imm8
Synopsis
_mm_maskz_reduce_sd(__mmask8 k, __m128d a, __m128d b, int imm8);
Description
Extract the reduced argument of the lower double-precision (64-bit) floating-point element in "b" by the number of bits specified by "imm8", store the result in the lower element of "dst" using zeromask "k" (the element is zeroed out when mask bit 0 is not set), and copy the upper element from "a" to the upper element of "dst". [round_imm_note]
Operation
DEFINE ReduceArgumentPD(src1[63:0], imm8[7:0]) {
m[63:0] := FP64(imm8[7:4]) // number of fraction bits after the binary point to be preserved
tmp[63:0] := POW(2.0, -m) * ROUND(POW(2.0, m) * src1[63:0], imm8[3:0])
tmp[63:0] := src1[63:0] - tmp[63:0]
IF IsInf(tmp[63:0])
tmp[63:0] := FP64(0.0)
FI
RETURN tmp[63:0]
}
IF k[0]
dst[63:0] := ReduceArgumentPD(b[63:0], imm8[7:0])
ELSE
dst[63:0] := 0
FI
dst[127:64] := a[127:64]
dst[MAX:128] := 0