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);
76 return (
int)__builtin_bswap32((
unsigned int)__A);
81 return (
int)__builtin_bswap32((
unsigned int)__A);
84#define _bit_scan_forward(A) __bsfd((A))
85#define _bit_scan_reverse(A) __bsrd((A))
101__bsfq(
long long __A) {
102 return (
long long)__builtin_ctzll((
unsigned long long)__A);
118__bsrq(
long long __A) {
119 return 63 - __builtin_clzll((
unsigned long long)__A);
134__bswapq(
long long __A) {
135 return (
long long)__builtin_bswap64((
unsigned long long)__A);
138#define _bswap64(A) __bswapq((A))
156 return __builtin_popcount(__A);
159#define _popcnt32(A) __popcntd((A))
175__popcntq(
unsigned long long __A)
177 return __builtin_popcountll(__A);
180#define _popcnt64(A) __popcntq((A))
187 return __builtin_ia32_readeflags_u64();
193 __builtin_ia32_writeeflags_u64(__f);
200 return __builtin_ia32_readeflags_u32();
206 __builtin_ia32_writeeflags_u32(__f);
222 return __builtin_bit_cast(
unsigned int, __A);
237 return __builtin_bit_cast(
unsigned long long, __A);
252 return __builtin_bit_cast(
float, __A);
267 return __builtin_bit_cast(
double, __A);
288 return __builtin_ia32_crc32qi(__C,
__D);
309 return __builtin_ia32_crc32hi(__C,
__D);
330 return __builtin_ia32_crc32si(__C,
__D);
350__crc32q(
unsigned long long __C,
unsigned long long __D)
352 return __builtin_ia32_crc32di(__C,
__D);
358 return __builtin_ia32_rdpmc(__A);
364 return __builtin_ia32_rdtscp(__A);
367#define _rdtsc() __rdtsc()
369#define _rdpmc(A) __rdpmc(A)
373 __builtin_ia32_wbinvd();
378 return __builtin_rotateleft8(__X, __C);
383 return __builtin_rotateright8(__X, __C);
388 return __builtin_rotateleft16(__X, __C);
393 return __builtin_rotateright16(__X, __C);
398 return __builtin_rotateleft32(__X, (
unsigned int)__C);
403 return __builtin_rotateright32(__X, (
unsigned int)__C);
408__rolq(
unsigned long long __X,
int __C) {
409 return __builtin_rotateleft64(__X, (
unsigned long long)__C);
413__rorq(
unsigned long long __X,
int __C) {
414 return __builtin_rotateright64(__X, (
unsigned long long)__C);
422#define _lrotl(a,b) __rolq((a), (b))
423#define _lrotr(a,b) __rorq((a), (b))
425#define _lrotl(a,b) __rold((a), (b))
426#define _lrotr(a,b) __rord((a), (b))
428#define _rotl(a,b) __rold((a), (b))
429#define _rotr(a,b) __rord((a), (b))
433#define _rotwl(a,b) __rolw((a), (b))
434#define _rotwr(a,b) __rorw((a), (b))
436#undef __DEFAULT_FN_ATTRS
437#undef __DEFAULT_FN_ATTRS_CAST
438#undef __DEFAULT_FN_ATTRS_CRC32
439#undef __DEFAULT_FN_ATTRS_CONSTEXPR
static __inline__ unsigned long long __DEFAULT_FN_ATTRS __rdpmc(int __A)
static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR __bswapd(int __A)
Swaps the bytes in the input.
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)
Cast a 32-bit unsigned integer value to a 32-bit float value.
static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR __bsrd(int __A)
Find the first set bit starting from the msb.
static __inline__ unsigned int __DEFAULT_FN_ATTRS_CONSTEXPR __rold(unsigned int __X, int __C)
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)
#define __DEFAULT_FN_ATTRS_CAST
#define __DEFAULT_FN_ATTRS
static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR _bswap(int __A)
static __inline__ unsigned char __DEFAULT_FN_ATTRS_CONSTEXPR __rolb(unsigned char __X, int __C)
static __inline__ unsigned long long __DEFAULT_FN_ATTRS_CAST _castf64_u64(double __A)
Cast 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)
static __inline__ unsigned int __DEFAULT_FN_ATTRS_CAST _castf32_u32(float __A)
Cast 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)
Cast 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)
static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR __bsfd(int __A)
Find the first set bit starting from the lsb.
static __inline__ void __DEFAULT_FN_ATTRS __writeeflags(unsigned int __f)
static __inline__ unsigned int __DEFAULT_FN_ATTRS __readeflags(void)
#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)
static __inline__ unsigned short __DEFAULT_FN_ATTRS_CONSTEXPR __rolw(unsigned short __X, int __C)
static __inline__ void __DEFAULT_FN_ATTRS _wbinvd(void)
static __inline__ void short __D