10 #if !defined X86GPRINTRIN_H_
11 #error "Never use <bmiintrin.h> directly; include <x86gprintrin.h> instead."
17 extern __inline
unsigned short
20 return __builtin_ctz(__X);
23 extern __inline
unsigned int
24 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
29 extern __inline
unsigned int
30 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
32 return ((__X << (32 - (
__L +
__P))) >> (32 -
__L));
35 extern __inline
unsigned int
36 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
44 extern __inline
unsigned int
45 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
50 extern __inline
unsigned int
51 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
56 extern __inline
unsigned int
57 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
59 return (__X ^ (__X - 1));
62 extern __inline
unsigned int
63 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
68 extern __inline
unsigned int
69 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
71 return (__X & (__X - 1));
74 extern __inline
unsigned int
75 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
80 extern __inline
unsigned int
81 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
83 return __builtin_ctz(__X);
86 extern __inline
unsigned int
87 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
89 return __builtin_ctz(__X);
95 extern __inline
unsigned long long
96 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
97 __andn_u64(
unsigned long long __X,
unsigned long long __Y) {
101 extern __inline
unsigned long long
102 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
103 _bextr_u64(
unsigned long long __X,
unsigned int __P,
unsigned int __L) {
104 return ((__X << (64 - (
__L +
__P))) >> (64 -
__L));
107 extern __inline
unsigned long long
108 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
109 __bextr_u64(
unsigned long long __X,
unsigned long long __Y) {
112 __L = (
__Y & 0xFF00) >> 8;
113 return (_bextr_u64(__X,
__P,
__L));
116 extern __inline
unsigned long long
117 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
118 __blsi_u64(
unsigned long long __X) {
122 extern __inline
unsigned long long
123 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
124 _blsi_u64(
unsigned long long __X) {
125 return __blsi_u64(__X);
128 extern __inline
unsigned long long
129 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
130 __blsmsk_u64(
unsigned long long __X) {
131 return (__X ^ (__X - 1));
134 extern __inline
unsigned long long
135 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
136 _blsmsk_u64(
unsigned long long __X) {
137 return __blsmsk_u64(__X);
140 extern __inline
unsigned long long
141 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
142 __blsr_u64(
unsigned long long __X) {
143 return (__X & (__X - 1));
146 extern __inline
unsigned long long
147 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
148 _blsr_u64(
unsigned long long __X) {
149 return __blsr_u64(__X);
152 extern __inline
unsigned long long
153 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
154 __tzcnt_u64(
unsigned long long __X) {
155 return __builtin_ctzll(__X);
158 extern __inline
unsigned long long
159 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
160 _tzcnt_u64(
unsigned long long __X) {
161 return __builtin_ctzll(__X);
static __inline__ unsigned int __RELAXED_FN_ATTRS __tzcnt_u32(unsigned int __X)
Counts the number of trailing zero bits in the operand.
#define _tzcnt_u32
Counts the number of trailing zero bits in the operand.
#define _blsr_u32
Clears the least significant bit that is set to 1 in the source operand and returns the result.
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 ...
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 tha...
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 return...
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 ...
#define _blsi_u32
Clears all bits in the source except for the least significant bit containing a value of 1 and return...
#define _blsmsk_u32
Creates a mask whose bits are set to 1, using bit 0 up to and including the least significant bit tha...
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 short __RELAXED_FN_ATTRS __tzcnt_u16(unsigned short __X)
Counts the number of trailing zero bits in the operand.
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.
__inline unsigned int unsigned int unsigned int __L
__inline unsigned short __attribute__((__gnu_inline__, __always_inline__, __artificial__)) __tzcnt_u16(unsigned short __X)
__inline unsigned int unsigned int __P
__inline unsigned int unsigned int __Y