Developer Guide and Reference

Contents

_bzhi_u32/64

Copies the bits of the first source operand into the destination and clears the higher bits in the destination according to the index value specified by the second source operand. The corresponding Intel® AVX2 instruction is
BZHI
.

Syntax

extern unsigned int _bzhi_u32(unsigned int source, unsigned int index);
extern unsigned __int64 _bzhi_u64(unsigned __int64 source, unsigned int index);
Arguments
source
the source operand from where the bits are copied
index
index value according to which the bits are copied
Description
Copies the bits of the first source operand into the destination and clears the higher bits in the destination according to the index value. The index value is specified by bits
7:0
of the second source operand.
Returns
Result of the operation.