clang  10.0.0svn
Macros | Functions | Variables
ia32intrin.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _bit_scan_forward(A)   __bsfd((A))
 
#define _bit_scan_reverse(A)   __bsrd((A))
 
#define _popcnt32(A)   __popcntd((A))
 
#define _rdtsc()   __rdtsc()
 
#define _rdpmc(A)   __rdpmc(A)
 
#define _lrotl(a, b)   __rold((a), (b))
 
#define _lrotr(a, b)   __rord((a), (b))
 
#define _rotl(a, b)   __rold((a), (b))
 
#define _rotr(a, b)   __rord((a), (b))
 
#define _rotwl(a, b)   __rolw((a), (b))
 
#define _rotwr(a, b)   __rorw((a), (b))
 

Functions

static __inline__ int __attribute__ ((__always_inline__, __nodebug__)) __bsfd(int __A)
 Find the first set bit starting from the lsb. More...
 
static __inline__ unsigned int __attribute__ ((__always_inline__)) _castf32_u32(float __A)
 Cast a 32-bit float value to a 32-bit unsigned integer value. More...
 
static __inline__ unsigned int __attribute__ ((__always_inline__, __nodebug__, __target__("sse4.2"))) __crc32b(unsigned int __C
 Adds the unsigned integer operand to the CRC-32C checksum of the unsigned char operand. More...
 

Variables

static __inline__ unsigned int unsigned char __D
 
static __inline__ unsigned char int __C
 

Macro Definition Documentation

◆ _bit_scan_forward

#define _bit_scan_forward (   A)    __bsfd((A))

Definition at line 72 of file ia32intrin.h.

◆ _bit_scan_reverse

#define _bit_scan_reverse (   A)    __bsrd((A))

Definition at line 73 of file ia32intrin.h.

◆ _lrotl

#define _lrotl (   a,
 
)    __rold((a), (b))

Definition at line 421 of file ia32intrin.h.

◆ _lrotr

#define _lrotr (   a,
 
)    __rord((a), (b))

Definition at line 422 of file ia32intrin.h.

◆ _popcnt32

#define _popcnt32 (   A)    __popcntd((A))

Definition at line 147 of file ia32intrin.h.

◆ _rdpmc

#define _rdpmc (   A)    __rdpmc(A)

Definition at line 365 of file ia32intrin.h.

◆ _rdtsc

#define _rdtsc ( )    __rdtsc()

Definition at line 363 of file ia32intrin.h.

◆ _rotl

#define _rotl (   a,
 
)    __rold((a), (b))

Definition at line 424 of file ia32intrin.h.

◆ _rotr

#define _rotr (   a,
 
)    __rord((a), (b))

Definition at line 425 of file ia32intrin.h.

◆ _rotwl

#define _rotwl (   a,
 
)    __rolw((a), (b))

Definition at line 429 of file ia32intrin.h.

◆ _rotwr

#define _rotwr (   a,
 
)    __rorw((a), (b))

Definition at line 430 of file ia32intrin.h.

Function Documentation

◆ __attribute__() [1/3]

static __inline__ int __attribute__ ( (__always_inline__, __nodebug__)  )
static

Find the first set bit starting from the lsb.

Counts the number of bits in the source operand having a value of 1.

Swaps the bytes in the input.

Find the first set bit starting from the msb.

Result is undefined if input is 0.

This intrinsic corresponds to the BSF instruction or the TZCNT instruction.

Parameters
__AA 32-bit integer operand.
Returns
A 32-bit integer containing the bit number.

Result is undefined if input is 0.

This intrinsic corresponds to the BSR instruction or the LZCNT instruction and an XOR .

Parameters
__AA 32-bit integer operand.
Returns
A 32-bit integer containing the bit number.

Converting little endian to big endian or vice versa.

This intrinsic corresponds to the BSWAP instruction.

Parameters
__AA 32-bit integer operand.
Returns
A 32-bit integer containing the swapped bytes.

This intrinsic corresponds to the POPCNT instruction or a a sequence of arithmetic and logic ops to calculate it.

Parameters
__AAn unsigned 32-bit integer operand.
Returns
A 32-bit integer containing the number of bits with value 1 in the source operand.

Definition at line 29 of file ia32intrin.h.

Referenced by __attribute__().

◆ __attribute__() [2/3]

static __inline__ unsigned int __attribute__ ( (__always_inline__)  )
static

Cast a 32-bit float value to a 32-bit unsigned integer value.

Cast a 64-bit unsigned integer value to a 64-bit float value.

Cast a 32-bit unsigned integer value to a 32-bit float value.

Cast a 64-bit float value to a 64-bit unsigned integer value.

This intrinsic corresponds to the VMOVD / MOVD instruction in x86_64, and corresponds to the VMOVL / MOVL instruction in ia32.

Parameters
__AA 32-bit float value.
Returns
a 32-bit unsigned integer containing the converted value.

This intrinsic corresponds to the VMOVQ / MOVQ instruction in x86_64, and corresponds to the VMOVL / MOVL instruction in ia32.

Parameters
__AA 64-bit float value.
Returns
a 64-bit unsigned integer containing the converted value.

This intrinsic corresponds to the VMOVQ / MOVQ instruction in x86_64, and corresponds to the FLDS instruction in ia32.

Parameters
__AA 32-bit unsigned integer value.
Returns
a 32-bit float value containing the converted value.

This intrinsic corresponds to the VMOVQ / MOVQ instruction in x86_64, and corresponds to the FLDL instruction in ia32.

Parameters
__AA 64-bit unsigned integer value.
Returns
a 64-bit float value containing the converted value.

Definition at line 208 of file ia32intrin.h.

References __attribute__(), __C, and __D.

◆ __attribute__() [3/3]

static __inline__ unsigned int __attribute__ ( (__always_inline__, __nodebug__, __target__("sse4.2"))  )
static

Adds the unsigned integer operand to the CRC-32C checksum of the unsigned char operand.

Adds the unsigned integer operand to the CRC-32C checksum of the second unsigned integer operand.

Adds the unsigned integer operand to the CRC-32C checksum of the unsigned short operand.

This intrinsic corresponds to the CRC32B instruction.

Parameters
__CAn unsigned integer operand to add to the CRC-32C checksum of operand __D.
__DAn unsigned 8-bit integer operand used to compute the CRC-32C checksum.
Returns
The result of adding operand __C to the CRC-32C checksum of operand __D.

This intrinsic corresponds to the CRC32W instruction.

Parameters
__CAn unsigned integer operand to add to the CRC-32C checksum of operand __D.
__DAn unsigned 16-bit integer operand used to compute the CRC-32C checksum.
Returns
The result of adding operand __C to the CRC-32C checksum of operand __D.

This intrinsic corresponds to the CRC32D instruction.

Parameters
__CAn unsigned integer operand to add to the CRC-32C checksum of operand __D.
__DAn unsigned 32-bit integer operand used to compute the CRC-32C checksum.
Returns
The result of adding operand __C to the CRC-32C checksum of operand __D.

Variable Documentation

◆ __C

static __inline__ unsigned int int __C
Initial value:
{
return __builtin_rotateleft8(__X, __C)
static __inline__ unsigned char int __C
Definition: ia32intrin.h:373

Definition at line 373 of file ia32intrin.h.

Referenced by __attribute__(), _mm256_cmov_si256(), _mm512_set4_epi32(), _mm512_set4_epi64(), _mm512_set4_pd(), _mm512_set4_ps(), _mm512_set_epi32(), _mm512_set_epi64(), _mm512_set_pd(), _mm512_set_ps(), _mm_cmov_si128(), and _mm_crc32_u32().

◆ __D

static __inline__ void int __D
Initial value:
{
return __builtin_ia32_crc32qi(__C, __D)
static __inline__ unsigned char int __C
Definition: ia32intrin.h:373
static __inline__ unsigned int unsigned char __D
Definition: ia32intrin.h:283

Definition at line 283 of file ia32intrin.h.

Referenced by __attribute__(), _mm512_set4_epi32(), _mm512_set4_epi64(), _mm512_set4_pd(), _mm512_set4_ps(), _mm512_set_epi32(), _mm512_set_epi64(), _mm512_set_pd(), _mm512_set_ps(), and _mm_crc32_u32().