_pdep_u32
Classification
Other, Bit Manipulation, CPUID Test: BMI2
Header File
Instruction
PDEP r32, r32, r32
Synopsis
_pdep_u32(unsigned int a, unsigned int mask);
Description
Deposit contiguous low bits from unsigned 32-bit integer "a" to "dst" at the corresponding bit locations specified by "mask"; all other bits in "dst" are set to zero.
Operation
tmp := a
dst := 0
m := 0
k := 0
DO WHILE m < 32
IF mask[m] == 1
dst[m] := tmp[k]
k := k + 1
FI
m := m + 1
OD