Intel® C++ Compiler Classic Developer Guide and Reference

ID 767249
Date 3/31/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of 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.