10 #if !defined __X86INTRIN_H && !defined __IMMINTRIN_H
11 #error "Never use <bmi2intrin.h> directly; include <x86intrin.h> instead."
14 #ifndef __BMI2INTRIN_H
15 #define __BMI2INTRIN_H
18 #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("bmi2")))
23 return __builtin_ia32_bzhi_si(__X, __Y);
29 return __builtin_ia32_pdep_si(__X, __Y);
35 return __builtin_ia32_pext_si(__X, __Y);
41 _bzhi_u64(
unsigned long long __X,
unsigned long long __Y)
43 return __builtin_ia32_bzhi_di(__X, __Y);
47 _pdep_u64(
unsigned long long __X,
unsigned long long __Y)
49 return __builtin_ia32_pdep_di(__X, __Y);
53 _pext_u64(
unsigned long long __X,
unsigned long long __Y)
55 return __builtin_ia32_pext_di(__X, __Y);
59 _mulx_u64 (
unsigned long long __X,
unsigned long long __Y,
60 unsigned long long *__P)
62 unsigned __int128 __res = (
unsigned __int128) __X * __Y;
63 *__P = (
unsigned long long) (__res >> 64);
64 return (
unsigned long long) __res;
70 _mulx_u32 (
unsigned int __X,
unsigned int __Y,
unsigned int *__P)
72 unsigned long long __res = (
unsigned long long) __X * __Y;
73 *__P = (
unsigned int) (__res >> 32);
74 return (
unsigned int) __res;
79 #undef __DEFAULT_FN_ATTRS
static __inline__ unsigned int __DEFAULT_FN_ATTRS _pext_u32(unsigned int __X, unsigned int __Y)
static __inline__ unsigned int __DEFAULT_FN_ATTRS _bzhi_u32(unsigned int __X, unsigned int __Y)
static __inline__ unsigned int __DEFAULT_FN_ATTRS _mulx_u32(unsigned int __X, unsigned int __Y, unsigned int *__P)
#define __DEFAULT_FN_ATTRS
static __inline__ unsigned int __DEFAULT_FN_ATTRS _pdep_u32(unsigned int __X, unsigned int __Y)