1 /*===---- tbmintrin.h - TBM intrinsics -------------------------------------===
3 * Permission is hereby granted, free of charge, to any person obtaining a copy
4 * of this software and associated documentation files (the "Software"), to deal
5 * in the Software without restriction, including without limitation the rights
6 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 * copies of the Software, and to permit persons to whom the Software is
8 * furnished to do so, subject to the following conditions:
10 * The above copyright notice and this permission notice shall be included in
11 * all copies or substantial portions of the Software.
13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 *===-----------------------------------------------------------------------===
25 #error "TBM instruction set is not enabled"
29 #error "Never use <tbmintrin.h> directly; include <x86intrin.h> instead."
35 #define __bextri_u32(a, b) (__builtin_ia32_bextri_u32((a), (b)))
37 static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
38 __blcfill_u32(unsigned int a)
43 static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
44 __blci_u32(unsigned int a)
49 static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
50 __blcic_u32(unsigned int a)
55 static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
56 __blcmsk_u32(unsigned int a)
61 static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
62 __blcs_u32(unsigned int a)
67 static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
68 __blsfill_u32(unsigned int a)
73 static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
74 __blsic_u32(unsigned int a)
79 static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
80 __t1mskc_u32(unsigned int a)
85 static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
86 __tzmsk_u32(unsigned int a)
92 #define __bextri_u64(a, b) (__builtin_ia32_bextri_u64((a), (int)(b)))
94 static __inline__ unsigned long long __attribute__((__always_inline__,
96 __blcfill_u64(unsigned long long a)
101 static __inline__ unsigned long long __attribute__((__always_inline__,
103 __blci_u64(unsigned long long a)
108 static __inline__ unsigned long long __attribute__((__always_inline__,
110 __blcic_u64(unsigned long long a)
115 static __inline__ unsigned long long __attribute__((__always_inline__,
117 __blcmsk_u64(unsigned long long a)
122 static __inline__ unsigned long long __attribute__((__always_inline__,
124 __blcs_u64(unsigned long long a)
129 static __inline__ unsigned long long __attribute__((__always_inline__,
131 __blsfill_u64(unsigned long long a)
136 static __inline__ unsigned long long __attribute__((__always_inline__,
138 __blsic_u64(unsigned long long a)
143 static __inline__ unsigned long long __attribute__((__always_inline__,
145 __t1mskc_u64(unsigned long long a)
150 static __inline__ unsigned long long __attribute__((__always_inline__,
152 __tzmsk_u64(unsigned long long a)
158 #endif /* __TBMINTRIN_H */