11#error "Never use <ia32intrin.h> directly; include <x86intrin.h> instead."
18#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__))
19#define __DEFAULT_FN_ATTRS_CRC32 __attribute__((__always_inline__, __nodebug__, __target__("crc32")))
21#if defined(__cplusplus) && (__cplusplus >= 201103L)
22#define __DEFAULT_FN_ATTRS_CAST __attribute__((__always_inline__)) constexpr
23#define __DEFAULT_FN_ATTRS_CONSTEXPR __DEFAULT_FN_ATTRS constexpr
25#define __DEFAULT_FN_ATTRS_CAST __attribute__((__always_inline__))
26#define __DEFAULT_FN_ATTRS_CONSTEXPR __DEFAULT_FN_ATTRS
43 return __builtin_ctz((
unsigned int)__A);
60 return 31 - __builtin_clz((
unsigned int)__A);
75 return (
int)__builtin_bswap32((
unsigned int)__A);
90 return (
int)__builtin_bswap32((
unsigned int)__A);
109#define _bit_scan_forward(A) __bsfd((A))
127#define _bit_scan_reverse(A) __bsrd((A))
142__bsfq(
long long __A) {
143 return (
long long)__builtin_ctzll((
unsigned long long)__A);
158__bsrq(
long long __A) {
159 return 63 - __builtin_clzll((
unsigned long long)__A);
174__bswapq(
long long __A) {
175 return (
long long)__builtin_bswap64((
unsigned long long)__A);
193#define _bswap64(A) __bswapq((A))
211 return __builtin_popcount(__A);
230#define _popcnt32(A) __popcntd((A))
246__popcntq(
unsigned long long __A)
248 return __builtin_popcountll(__A);
267#define _popcnt64(A) __popcntq((A))
282 return __builtin_ia32_readeflags_u64();
297 __builtin_ia32_writeeflags_u64(__f);
312 return __builtin_ia32_readeflags_u32();
327 __builtin_ia32_writeeflags_u32(__f);
343 return __builtin_bit_cast(
unsigned int, __A);
358 return __builtin_bit_cast(
unsigned long long, __A);
373 return __builtin_bit_cast(
float, __A);
388 return __builtin_bit_cast(
double, __A);
408 return __builtin_ia32_crc32qi(__C,
__D);
428 return __builtin_ia32_crc32hi(__C,
__D);
448 return __builtin_ia32_crc32si(__C,
__D);
467__crc32q(
unsigned long long __C,
unsigned long long __D)
469 return __builtin_ia32_crc32di(__C,
__D);
487 return __builtin_ia32_rdpmc(__A);
502 return __builtin_ia32_rdtscp(__A);
516#define _rdtsc() __rdtsc()
534#define _rdpmc(A) __rdpmc(A)
538 __builtin_ia32_wbinvd();
556 return __builtin_rotateleft8(__X, __C);
574 return __builtin_rotateright8(__X, __C);
593 return __builtin_rotateleft16(__X, __C);
612 return __builtin_rotateright16(__X, __C);
631 return __builtin_rotateleft32(__X, (
unsigned int)__C);
650 return __builtin_rotateright32(__X, (
unsigned int)__C);
668__rolq(
unsigned long long __X,
int __C) {
669 return __builtin_rotateleft64(__X, (
unsigned long long)__C);
686__rorq(
unsigned long long __X,
int __C) {
687 return __builtin_rotateright64(__X, (
unsigned long long)__C);
713#define _lrotl(a,b) __rolq((a), (b))
733#define _lrotr(a,b) __rorq((a), (b))
753#define _lrotl(a,b) __rold((a), (b))
773#define _lrotr(a,b) __rord((a), (b))
794#define _rotl(a,b) __rold((a), (b))
814#define _rotr(a,b) __rord((a), (b))
836#define _rotwl(a,b) __rolw((a), (b))
856#define _rotwr(a,b) __rorw((a), (b))
858#undef __DEFAULT_FN_ATTRS
859#undef __DEFAULT_FN_ATTRS_CAST
860#undef __DEFAULT_FN_ATTRS_CRC32
861#undef __DEFAULT_FN_ATTRS_CONSTEXPR
static __inline__ unsigned long long __DEFAULT_FN_ATTRS __rdpmc(int __A)
Reads the specified performance-monitoring counter.
static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR __bswapd(int __A)
Swaps the bytes in the input, converting little endian to big endian or vice versa.
static __inline__ unsigned int __DEFAULT_FN_ATTRS_CRC32 __crc32d(unsigned int __C, unsigned int __D)
Adds the unsigned integer operand to the CRC-32C checksum of the second unsigned integer operand.
static __inline__ float __DEFAULT_FN_ATTRS_CAST _castu32_f32(unsigned int __A)
Casts a 32-bit unsigned integer value to a 32-bit float value.
static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR __bsrd(int __A)
Finds the first set bit starting from the most significant bit.
static __inline__ unsigned int __DEFAULT_FN_ATTRS_CONSTEXPR __rold(unsigned int __X, int __C)
Rotates a 32-bit value to the left by the specified number of bits.
static __inline__ unsigned int __DEFAULT_FN_ATTRS_CRC32 __crc32b(unsigned int __C, unsigned char __D)
Adds the unsigned integer operand to the CRC-32C checksum of the unsigned char operand.
static __inline__ unsigned int __DEFAULT_FN_ATTRS_CRC32 __crc32w(unsigned int __C, unsigned short __D)
Adds the unsigned integer operand to the CRC-32C checksum of the unsigned short operand.
static __inline__ unsigned int __DEFAULT_FN_ATTRS_CONSTEXPR __rord(unsigned int __X, int __C)
Rotates a 32-bit value to the right by the specified number of bits.
#define __DEFAULT_FN_ATTRS_CAST
#define __DEFAULT_FN_ATTRS
static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR _bswap(int __A)
Swaps the bytes in the input, converting little endian to big endian or vice versa.
static __inline__ unsigned char __DEFAULT_FN_ATTRS_CONSTEXPR __rolb(unsigned char __X, int __C)
Rotates an 8-bit value to the left by the specified number of bits.
static __inline__ unsigned long long __DEFAULT_FN_ATTRS_CAST _castf64_u64(double __A)
Casts a 64-bit float value to a 64-bit unsigned integer value.
static __inline__ unsigned short __DEFAULT_FN_ATTRS_CONSTEXPR __rorw(unsigned short __X, int __C)
Rotates a 16-bit value to the right by the specified number of bits.
static __inline__ unsigned int __DEFAULT_FN_ATTRS_CAST _castf32_u32(float __A)
Casts a 32-bit float value to a 32-bit unsigned integer value.
static __inline__ double __DEFAULT_FN_ATTRS_CAST _castu64_f64(unsigned long long __A)
Casts a 64-bit unsigned integer value to a 64-bit float value.
static __inline__ unsigned char __DEFAULT_FN_ATTRS_CONSTEXPR __rorb(unsigned char __X, int __C)
Rotates an 8-bit value to the right by the specified number of bits.
static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR __bsfd(int __A)
Finds the first set bit starting from the least significant bit.
static __inline__ void __DEFAULT_FN_ATTRS __writeeflags(unsigned int __f)
Writes the specified value to the program status-and-control EFLAGS register.
static __inline__ unsigned int __DEFAULT_FN_ATTRS __readeflags(void)
Returns the program status-and-control EFLAGS register with the VM and RF flags cleared.
#define __DEFAULT_FN_ATTRS_CONSTEXPR
static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR __popcntd(unsigned int __A)
Counts the number of bits in the source operand having a value of 1.
#define __DEFAULT_FN_ATTRS_CRC32
static __inline__ unsigned long long __DEFAULT_FN_ATTRS __rdtscp(unsigned int *__A)
Reads the processor's time-stamp counter and the IA32_TSC_AUX MSR (0xc0000103).
static __inline__ unsigned short __DEFAULT_FN_ATTRS_CONSTEXPR __rolw(unsigned short __X, int __C)
Rotates a 16-bit value to the left by the specified number of bits.
static __inline__ void __DEFAULT_FN_ATTRS _wbinvd(void)
static __inline__ void short __D