clang 20.0.0git
Macros | Functions
bmiintrin.h File Reference

Go to the source code of this file.

Macros

#define __RELAXED_FN_ATTRS   __attribute__((__always_inline__, __nodebug__))
 
#define _tzcnt_u16   __tzcnt_u16
 Counts the number of trailing zero bits in the operand.
 
#define _tzcnt_u32   __tzcnt_u32
 Counts the number of trailing zero bits in the operand.
 
#define __DEFAULT_FN_ATTRS   __attribute__((__always_inline__, __nodebug__, __target__("bmi")))
 
#define _andn_u32   __andn_u32
 Performs a bitwise AND of the second operand with the one's complement of the first operand.
 
#define _blsi_u32   __blsi_u32
 Clears all bits in the source except for the least significant bit containing a value of 1 and returns the result.
 
#define _blsmsk_u32   __blsmsk_u32
 Creates a mask whose bits are set to 1, using bit 0 up to and including the least significant bit that is set to 1 in the source operand and returns the result.
 
#define _blsr_u32   __blsr_u32
 Clears the least significant bit that is set to 1 in the source operand and returns the result.
 

Functions

static __inline__ unsigned short __RELAXED_FN_ATTRS __tzcnt_u16 (unsigned short __X)
 Counts the number of trailing zero bits in the operand.
 
static __inline__ unsigned int __RELAXED_FN_ATTRS __tzcnt_u32 (unsigned int __X)
 Counts the number of trailing zero bits in the operand.
 
static __inline__ int __RELAXED_FN_ATTRS _mm_tzcnt_32 (unsigned int __X)
 Counts the number of trailing zero bits in the operand.
 
static __inline__ unsigned int __DEFAULT_FN_ATTRS __andn_u32 (unsigned int __X, unsigned int __Y)
 Performs a bitwise AND of the second operand with the one's complement of the first operand.
 
static __inline__ unsigned int __DEFAULT_FN_ATTRS __bextr_u32 (unsigned int __X, unsigned int __Y)
 Extracts the specified bits from the first operand and returns them in the least significant bits of the result.
 
static __inline__ unsigned int __DEFAULT_FN_ATTRS _bextr_u32 (unsigned int __X, unsigned int __Y, unsigned int __Z)
 Extracts the specified bits from the first operand and returns them in the least significant bits of the result.
 
static __inline__ unsigned int __DEFAULT_FN_ATTRS _bextr2_u32 (unsigned int __X, unsigned int __Y)
 Extracts the specified bits from the first operand and returns them in the least significant bits of the result.
 
static __inline__ unsigned int __DEFAULT_FN_ATTRS __blsi_u32 (unsigned int __X)
 Clears all bits in the source except for the least significant bit containing a value of 1 and returns the result.
 
static __inline__ unsigned int __DEFAULT_FN_ATTRS __blsmsk_u32 (unsigned int __X)
 Creates a mask whose bits are set to 1, using bit 0 up to and including the least significant bit that is set to 1 in the source operand and returns the result.
 
static __inline__ unsigned int __DEFAULT_FN_ATTRS __blsr_u32 (unsigned int __X)
 Clears the least significant bit that is set to 1 in the source operand and returns the result.
 

Macro Definition Documentation

◆ __DEFAULT_FN_ATTRS

#define __DEFAULT_FN_ATTRS   __attribute__((__always_inline__, __nodebug__, __target__("bmi")))

Definition at line 167 of file bmiintrin.h.

◆ __RELAXED_FN_ATTRS

#define __RELAXED_FN_ATTRS   __attribute__((__always_inline__, __nodebug__))

Definition at line 20 of file bmiintrin.h.

◆ _andn_u32

#define _andn_u32   __andn_u32

Performs a bitwise AND of the second operand with the one's complement of the first operand.

unsigned int _andn_u32(unsigned int __X, unsigned int __Y);
#define _andn_u32
Performs a bitwise AND of the second operand with the one's complement of the first operand.
Definition: bmiintrin.h:207
__inline unsigned int unsigned int __Y
Definition: bmi2intrin.h:19

This intrinsic corresponds to the ANDN instruction.

Parameters
__XAn unsigned integer containing one of the operands.
__YAn unsigned integer containing one of the operands.
Returns
An unsigned integer containing the bitwise AND of the second operand with the one's complement of the first operand.
See also
__andn_u32

Definition at line 207 of file bmiintrin.h.

◆ _blsi_u32

#define _blsi_u32   __blsi_u32

Clears all bits in the source except for the least significant bit containing a value of 1 and returns the result.

unsigned int _blsi_u32(unsigned int __X);
#define _blsi_u32
Clears all bits in the source except for the least significant bit containing a value of 1 and return...
Definition: bmiintrin.h:313

This intrinsic corresponds to the BLSI instruction.

Parameters
__XAn unsigned integer whose bits are to be cleared.
Returns
An unsigned integer containing the result of clearing the bits from the source operand.
See also
__blsi_u32

Definition at line 313 of file bmiintrin.h.

◆ _blsmsk_u32

#define _blsmsk_u32   __blsmsk_u32

Creates a mask whose bits are set to 1, using bit 0 up to and including the least significant bit that is set to 1 in the source operand and returns the result.

unsigned int _blsmsk_u32(unsigned int __X);
#define _blsmsk_u32
Creates a mask whose bits are set to 1, using bit 0 up to and including the least significant bit tha...
Definition: bmiintrin.h:349

This intrinsic corresponds to the BLSMSK instruction.

Parameters
__XAn unsigned integer used to create the mask.
Returns
An unsigned integer containing the newly created mask.
See also
__blsmsk_u32

Definition at line 349 of file bmiintrin.h.

◆ _blsr_u32

#define _blsr_u32   __blsr_u32

Clears the least significant bit that is set to 1 in the source operand and returns the result.

unsigned int _bls4_u32(unsigned int __X);

This intrinsic corresponds to the BLSR instruction.

Parameters
__XAn unsigned integer containing the operand to be cleared.
Returns
An unsigned integer containing the result of clearing the source operand.
See also
__blsr_u32

Definition at line 385 of file bmiintrin.h.

◆ _tzcnt_u16

#define _tzcnt_u16   __tzcnt_u16

Counts the number of trailing zero bits in the operand.

unsigned short _tzcnt_u16(unsigned short __X);
#define _tzcnt_u16
Counts the number of trailing zero bits in the operand.
Definition: bmiintrin.h:54

This intrinsic corresponds to the TZCNT instruction.

Parameters
__XAn unsigned 16-bit integer whose trailing zeros are to be counted.
Returns
An unsigned 16-bit integer containing the number of trailing zero bits in the operand.
See also
__tzcnt_u16

Definition at line 54 of file bmiintrin.h.

◆ _tzcnt_u32

#define _tzcnt_u32   __tzcnt_u32

Counts the number of trailing zero bits in the operand.

unsigned int _tzcnt_u32(unsigned int __X);
#define _tzcnt_u32
Counts the number of trailing zero bits in the operand.
Definition: bmiintrin.h:105

This intrinsic corresponds to the TZCNT instruction.

Parameters
__XAn unsigned 32-bit integer whose trailing zeros are to be counted.
Returns
An unsigned 32-bit integer containing the number of trailing zero bits in the operand.
See also
{ _mm_tzcnt_32 __tzcnt_u32 }

Definition at line 105 of file bmiintrin.h.

Function Documentation

◆ __andn_u32()

static __inline__ unsigned int __DEFAULT_FN_ATTRS __andn_u32 ( unsigned int  __X,
unsigned int  __Y 
)
static

Performs a bitwise AND of the second operand with the one's complement of the first operand.

This intrinsic corresponds to the ANDN instruction.

Parameters
__XAn unsigned integer containing one of the operands.
__YAn unsigned integer containing one of the operands.
Returns
An unsigned integer containing the bitwise AND of the second operand with the one's complement of the first operand.
See also
_andn_u32

Definition at line 184 of file bmiintrin.h.

References __Y.

◆ __bextr_u32()

static __inline__ unsigned int __DEFAULT_FN_ATTRS __bextr_u32 ( unsigned int  __X,
unsigned int  __Y 
)
static

Extracts the specified bits from the first operand and returns them in the least significant bits of the result.

This intrinsic corresponds to the BEXTR instruction.

Parameters
__XAn unsigned integer whose bits are to be extracted.
__YAn unsigned integer used to specify which bits are extracted. Bits [7:0] specify the index of the least significant bit. Bits [15:8] specify the number of bits to be extracted.
Returns
An unsigned integer whose least significant bits contain the extracted bits.
See also
_bextr_u32

Definition at line 227 of file bmiintrin.h.

References __Y.

◆ __blsi_u32()

static __inline__ unsigned int __DEFAULT_FN_ATTRS __blsi_u32 ( unsigned int  __X)
static

Clears all bits in the source except for the least significant bit containing a value of 1 and returns the result.

This intrinsic corresponds to the BLSI instruction.

Parameters
__XAn unsigned integer whose bits are to be cleared.
Returns
An unsigned integer containing the result of clearing the bits from the source operand.
See also
_blsi_u32

Definition at line 292 of file bmiintrin.h.

◆ __blsmsk_u32()

static __inline__ unsigned int __DEFAULT_FN_ATTRS __blsmsk_u32 ( unsigned int  __X)
static

Creates a mask whose bits are set to 1, using bit 0 up to and including the least significant bit that is set to 1 in the source operand and returns the result.

This intrinsic corresponds to the BLSMSK instruction.

Parameters
__XAn unsigned integer used to create the mask.
Returns
An unsigned integer containing the newly created mask.
See also
_blsmsk_u32

Definition at line 328 of file bmiintrin.h.

◆ __blsr_u32()

static __inline__ unsigned int __DEFAULT_FN_ATTRS __blsr_u32 ( unsigned int  __X)
static

Clears the least significant bit that is set to 1 in the source operand and returns the result.

This intrinsic corresponds to the BLSR instruction.

Parameters
__XAn unsigned integer containing the operand to be cleared.
Returns
An unsigned integer containing the result of clearing the source operand.
See also
_blsr_u32

Definition at line 364 of file bmiintrin.h.

◆ __tzcnt_u16()

static __inline__ unsigned short __RELAXED_FN_ATTRS __tzcnt_u16 ( unsigned short  __X)
static

Counts the number of trailing zero bits in the operand.

This intrinsic corresponds to the TZCNT instruction.

Parameters
__XAn unsigned 16-bit integer whose trailing zeros are to be counted.
Returns
An unsigned 16-bit integer containing the number of trailing zero bits in the operand.
See also
_tzcnt_u16

Definition at line 34 of file bmiintrin.h.

◆ __tzcnt_u32()

static __inline__ unsigned int __RELAXED_FN_ATTRS __tzcnt_u32 ( unsigned int  __X)
static

Counts the number of trailing zero bits in the operand.

This intrinsic corresponds to the TZCNT instruction.

Parameters
__XAn unsigned 32-bit integer whose trailing zeros are to be counted.
Returns
An unsigned 32-bit integer containing the number of trailing zero bits in the operand.
See also
{ _mm_tzcnt_32 _tzcnt_u32 }

Definition at line 68 of file bmiintrin.h.

◆ _bextr2_u32()

static __inline__ unsigned int __DEFAULT_FN_ATTRS _bextr2_u32 ( unsigned int  __X,
unsigned int  __Y 
)
static

Extracts the specified bits from the first operand and returns them in the least significant bits of the result.

This intrinsic corresponds to the BEXTR instruction.

Parameters
__XAn unsigned integer whose bits are to be extracted.
__YAn unsigned integer used to specify which bits are extracted. Bits [7:0] specify the index of the least significant bit. Bits [15:8] specify the number of bits to be extracted.
Returns
An unsigned integer whose least significant bits contain the extracted bits.
See also
__bextr_u32

Definition at line 275 of file bmiintrin.h.

References __Y.

◆ _bextr_u32()

static __inline__ unsigned int __DEFAULT_FN_ATTRS _bextr_u32 ( unsigned int  __X,
unsigned int  __Y,
unsigned int  __Z 
)
static

Extracts the specified bits from the first operand and returns them in the least significant bits of the result.

This intrinsic corresponds to the BEXTR instruction.

Parameters
__XAn unsigned integer whose bits are to be extracted.
__YAn unsigned integer used to specify the index of the least significant bit for the bits to be extracted. Bits [7:0] specify the index.
__ZAn unsigned integer used to specify the number of bits to be extracted. Bits [7:0] specify the number of bits.
Returns
An unsigned integer whose least significant bits contain the extracted bits.
See also
__bextr_u32

Definition at line 252 of file bmiintrin.h.

References __Y.

◆ _mm_tzcnt_32()

static __inline__ int __RELAXED_FN_ATTRS _mm_tzcnt_32 ( unsigned int  __X)
static

Counts the number of trailing zero bits in the operand.

This intrinsic corresponds to the TZCNT instruction.

Parameters
__XAn unsigned 32-bit integer whose trailing zeros are to be counted.
Returns
A 32-bit integer containing the number of trailing zero bits in the operand.
See also
{ __tzcnt_u32 _tzcnt_u32 }

Definition at line 85 of file bmiintrin.h.