_pext_u32
Classification
Other, Bit Manipulation, CPUID Test: BMI2
Header File
Instruction
PEXT r32, r32, r32
Synopsis
_pext_u32(unsigned int a, unsigned int mask);
Description
Extract bits from unsigned 32-bit integer "a" at the corresponding bit locations specified by "mask" to contiguous low bits in "dst"; the remaining upper 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[k] := tmp[m]
k := k + 1
FI
m := m + 1
OD