@cpp-linter/clang-tidy-win32-x64 12.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/LICENSE.TXT +279 -0
  2. package/README.md +7 -0
  3. package/bin/clang-tidy.exe +4 -0
  4. package/lib/clang/12.0.1/include/__clang_cuda_builtin_vars.h +121 -0
  5. package/lib/clang/12.0.1/include/__clang_cuda_cmath.h +512 -0
  6. package/lib/clang/12.0.1/include/__clang_cuda_complex_builtins.h +285 -0
  7. package/lib/clang/12.0.1/include/__clang_cuda_device_functions.h +1486 -0
  8. package/lib/clang/12.0.1/include/__clang_cuda_intrinsics.h +486 -0
  9. package/lib/clang/12.0.1/include/__clang_cuda_libdevice_declares.h +462 -0
  10. package/lib/clang/12.0.1/include/__clang_cuda_math.h +348 -0
  11. package/lib/clang/12.0.1/include/__clang_cuda_math_forward_declares.h +284 -0
  12. package/lib/clang/12.0.1/include/__clang_cuda_runtime_wrapper.h +443 -0
  13. package/lib/clang/12.0.1/include/__clang_hip_cmath.h +664 -0
  14. package/lib/clang/12.0.1/include/__clang_hip_libdevice_declares.h +334 -0
  15. package/lib/clang/12.0.1/include/__clang_hip_math.h +1275 -0
  16. package/lib/clang/12.0.1/include/__clang_hip_runtime_wrapper.h +69 -0
  17. package/lib/clang/12.0.1/include/__stddef_max_align_t.h +27 -0
  18. package/lib/clang/12.0.1/include/__wmmintrin_aes.h +140 -0
  19. package/lib/clang/12.0.1/include/__wmmintrin_pclmul.h +48 -0
  20. package/lib/clang/12.0.1/include/adxintrin.h +72 -0
  21. package/lib/clang/12.0.1/include/altivec.h +18239 -0
  22. package/lib/clang/12.0.1/include/ammintrin.h +179 -0
  23. package/lib/clang/12.0.1/include/amxintrin.h +278 -0
  24. package/lib/clang/12.0.1/include/arm64intr.h +35 -0
  25. package/lib/clang/12.0.1/include/arm_acle.h +716 -0
  26. package/lib/clang/12.0.1/include/arm_bf16.h +20 -0
  27. package/lib/clang/12.0.1/include/arm_cde.h +410 -0
  28. package/lib/clang/12.0.1/include/arm_cmse.h +217 -0
  29. package/lib/clang/12.0.1/include/arm_fp16.h +596 -0
  30. package/lib/clang/12.0.1/include/arm_mve.h +19187 -0
  31. package/lib/clang/12.0.1/include/arm_neon.h +68982 -0
  32. package/lib/clang/12.0.1/include/arm_sve.h +18148 -0
  33. package/lib/clang/12.0.1/include/armintr.h +31 -0
  34. package/lib/clang/12.0.1/include/avx2intrin.h +1148 -0
  35. package/lib/clang/12.0.1/include/avx512bf16intrin.h +279 -0
  36. package/lib/clang/12.0.1/include/avx512bitalgintrin.h +83 -0
  37. package/lib/clang/12.0.1/include/avx512bwintrin.h +2024 -0
  38. package/lib/clang/12.0.1/include/avx512cdintrin.h +123 -0
  39. package/lib/clang/12.0.1/include/avx512dqintrin.h +1377 -0
  40. package/lib/clang/12.0.1/include/avx512erintrin.h +271 -0
  41. package/lib/clang/12.0.1/include/avx512fintrin.h +9618 -0
  42. package/lib/clang/12.0.1/include/avx512ifmaintrin.h +68 -0
  43. package/lib/clang/12.0.1/include/avx512ifmavlintrin.h +119 -0
  44. package/lib/clang/12.0.1/include/avx512pfintrin.h +97 -0
  45. package/lib/clang/12.0.1/include/avx512vbmi2intrin.h +357 -0
  46. package/lib/clang/12.0.1/include/avx512vbmiintrin.h +105 -0
  47. package/lib/clang/12.0.1/include/avx512vbmivlintrin.h +188 -0
  48. package/lib/clang/12.0.1/include/avx512vlbf16intrin.h +474 -0
  49. package/lib/clang/12.0.1/include/avx512vlbitalgintrin.h +145 -0
  50. package/lib/clang/12.0.1/include/avx512vlbwintrin.h +2809 -0
  51. package/lib/clang/12.0.1/include/avx512vlcdintrin.h +225 -0
  52. package/lib/clang/12.0.1/include/avx512vldqintrin.h +1167 -0
  53. package/lib/clang/12.0.1/include/avx512vlintrin.h +8445 -0
  54. package/lib/clang/12.0.1/include/avx512vlvbmi2intrin.h +689 -0
  55. package/lib/clang/12.0.1/include/avx512vlvnniintrin.h +304 -0
  56. package/lib/clang/12.0.1/include/avx512vlvp2intersectintrin.h +121 -0
  57. package/lib/clang/12.0.1/include/avx512vnniintrin.h +115 -0
  58. package/lib/clang/12.0.1/include/avx512vp2intersectintrin.h +77 -0
  59. package/lib/clang/12.0.1/include/avx512vpopcntdqintrin.h +54 -0
  60. package/lib/clang/12.0.1/include/avx512vpopcntdqvlintrin.h +91 -0
  61. package/lib/clang/12.0.1/include/avxintrin.h +5053 -0
  62. package/lib/clang/12.0.1/include/avxvnniintrin.h +225 -0
  63. package/lib/clang/12.0.1/include/bmi2intrin.h +81 -0
  64. package/lib/clang/12.0.1/include/bmiintrin.h +427 -0
  65. package/lib/clang/12.0.1/include/cet.h +66 -0
  66. package/lib/clang/12.0.1/include/cetintrin.h +99 -0
  67. package/lib/clang/12.0.1/include/cldemoteintrin.h +36 -0
  68. package/lib/clang/12.0.1/include/clflushoptintrin.h +27 -0
  69. package/lib/clang/12.0.1/include/clwbintrin.h +38 -0
  70. package/lib/clang/12.0.1/include/clzerointrin.h +36 -0
  71. package/lib/clang/12.0.1/include/cpuid.h +319 -0
  72. package/lib/clang/12.0.1/include/cuda_wrappers/algorithm +116 -0
  73. package/lib/clang/12.0.1/include/cuda_wrappers/complex +82 -0
  74. package/lib/clang/12.0.1/include/cuda_wrappers/new +106 -0
  75. package/lib/clang/12.0.1/include/emmintrin.h +4981 -0
  76. package/lib/clang/12.0.1/include/enqcmdintrin.h +63 -0
  77. package/lib/clang/12.0.1/include/f16cintrin.h +162 -0
  78. package/lib/clang/12.0.1/include/float.h +152 -0
  79. package/lib/clang/12.0.1/include/fma4intrin.h +218 -0
  80. package/lib/clang/12.0.1/include/fmaintrin.h +216 -0
  81. package/lib/clang/12.0.1/include/fxsrintrin.h +91 -0
  82. package/lib/clang/12.0.1/include/gfniintrin.h +193 -0
  83. package/lib/clang/12.0.1/include/hresetintrin.h +49 -0
  84. package/lib/clang/12.0.1/include/htmintrin.h +212 -0
  85. package/lib/clang/12.0.1/include/htmxlintrin.h +345 -0
  86. package/lib/clang/12.0.1/include/ia32intrin.h +441 -0
  87. package/lib/clang/12.0.1/include/immintrin.h +600 -0
  88. package/lib/clang/12.0.1/include/intrin.h +585 -0
  89. package/lib/clang/12.0.1/include/inttypes.h +97 -0
  90. package/lib/clang/12.0.1/include/invpcidintrin.h +23 -0
  91. package/lib/clang/12.0.1/include/iso646.h +27 -0
  92. package/lib/clang/12.0.1/include/keylockerintrin.h +506 -0
  93. package/lib/clang/12.0.1/include/limits.h +102 -0
  94. package/lib/clang/12.0.1/include/lwpintrin.h +136 -0
  95. package/lib/clang/12.0.1/include/lzcntintrin.h +104 -0
  96. package/lib/clang/12.0.1/include/mm3dnow.h +157 -0
  97. package/lib/clang/12.0.1/include/mm_malloc.h +67 -0
  98. package/lib/clang/12.0.1/include/mmintrin.h +1558 -0
  99. package/lib/clang/12.0.1/include/module.modulemap +164 -0
  100. package/lib/clang/12.0.1/include/movdirintrin.h +49 -0
  101. package/lib/clang/12.0.1/include/msa.h +573 -0
  102. package/lib/clang/12.0.1/include/mwaitxintrin.h +33 -0
  103. package/lib/clang/12.0.1/include/nmmintrin.h +16 -0
  104. package/lib/clang/12.0.1/include/opencl-c-base.h +589 -0
  105. package/lib/clang/12.0.1/include/opencl-c.h +17162 -0
  106. package/lib/clang/12.0.1/include/openmp_wrappers/__clang_openmp_device_functions.h +42 -0
  107. package/lib/clang/12.0.1/include/openmp_wrappers/cmath +78 -0
  108. package/lib/clang/12.0.1/include/openmp_wrappers/complex +52 -0
  109. package/lib/clang/12.0.1/include/openmp_wrappers/complex.h +27 -0
  110. package/lib/clang/12.0.1/include/openmp_wrappers/complex_cmath.h +388 -0
  111. package/lib/clang/12.0.1/include/openmp_wrappers/math.h +51 -0
  112. package/lib/clang/12.0.1/include/openmp_wrappers/new +70 -0
  113. package/lib/clang/12.0.1/include/pconfigintrin.h +40 -0
  114. package/lib/clang/12.0.1/include/pkuintrin.h +34 -0
  115. package/lib/clang/12.0.1/include/pmmintrin.h +290 -0
  116. package/lib/clang/12.0.1/include/popcntintrin.h +59 -0
  117. package/lib/clang/12.0.1/include/ppc_wrappers/emmintrin.h +2324 -0
  118. package/lib/clang/12.0.1/include/ppc_wrappers/mm_malloc.h +50 -0
  119. package/lib/clang/12.0.1/include/ppc_wrappers/mmintrin.h +1450 -0
  120. package/lib/clang/12.0.1/include/ppc_wrappers/pmmintrin.h +150 -0
  121. package/lib/clang/12.0.1/include/ppc_wrappers/smmintrin.h +109 -0
  122. package/lib/clang/12.0.1/include/ppc_wrappers/tmmintrin.h +495 -0
  123. package/lib/clang/12.0.1/include/ppc_wrappers/xmmintrin.h +1843 -0
  124. package/lib/clang/12.0.1/include/prfchwintrin.h +55 -0
  125. package/lib/clang/12.0.1/include/ptwriteintrin.h +37 -0
  126. package/lib/clang/12.0.1/include/rdseedintrin.h +42 -0
  127. package/lib/clang/12.0.1/include/rtmintrin.h +45 -0
  128. package/lib/clang/12.0.1/include/s390intrin.h +25 -0
  129. package/lib/clang/12.0.1/include/serializeintrin.h +30 -0
  130. package/lib/clang/12.0.1/include/sgxintrin.h +60 -0
  131. package/lib/clang/12.0.1/include/shaintrin.h +61 -0
  132. package/lib/clang/12.0.1/include/smmintrin.h +2430 -0
  133. package/lib/clang/12.0.1/include/stdalign.h +21 -0
  134. package/lib/clang/12.0.1/include/stdarg.h +35 -0
  135. package/lib/clang/12.0.1/include/stdatomic.h +176 -0
  136. package/lib/clang/12.0.1/include/stdbool.h +31 -0
  137. package/lib/clang/12.0.1/include/stddef.h +121 -0
  138. package/lib/clang/12.0.1/include/stdint.h +693 -0
  139. package/lib/clang/12.0.1/include/stdnoreturn.h +16 -0
  140. package/lib/clang/12.0.1/include/tbmintrin.h +140 -0
  141. package/lib/clang/12.0.1/include/tgmath.h +1368 -0
  142. package/lib/clang/12.0.1/include/tmmintrin.h +771 -0
  143. package/lib/clang/12.0.1/include/tsxldtrkintrin.h +56 -0
  144. package/lib/clang/12.0.1/include/uintrintrin.h +150 -0
  145. package/lib/clang/12.0.1/include/unwind.h +327 -0
  146. package/lib/clang/12.0.1/include/vadefs.h +51 -0
  147. package/lib/clang/12.0.1/include/vaesintrin.h +84 -0
  148. package/lib/clang/12.0.1/include/varargs.h +12 -0
  149. package/lib/clang/12.0.1/include/vecintrin.h +10998 -0
  150. package/lib/clang/12.0.1/include/vpclmulqdqintrin.h +28 -0
  151. package/lib/clang/12.0.1/include/waitpkgintrin.h +42 -0
  152. package/lib/clang/12.0.1/include/wasm_simd128.h +1167 -0
  153. package/lib/clang/12.0.1/include/wbnoinvdintrin.h +24 -0
  154. package/lib/clang/12.0.1/include/wmmintrin.h +19 -0
  155. package/lib/clang/12.0.1/include/x86gprintrin.h +23 -0
  156. package/lib/clang/12.0.1/include/x86intrin.h +63 -0
  157. package/lib/clang/12.0.1/include/xmmintrin.h +3008 -0
  158. package/lib/clang/12.0.1/include/xopintrin.h +770 -0
  159. package/lib/clang/12.0.1/include/xsavecintrin.h +34 -0
  160. package/lib/clang/12.0.1/include/xsaveintrin.h +63 -0
  161. package/lib/clang/12.0.1/include/xsaveoptintrin.h +34 -0
  162. package/lib/clang/12.0.1/include/xsavesintrin.h +44 -0
  163. package/lib/clang/12.0.1/include/xtestintrin.h +27 -0
  164. package/package.json +32 -0
@@ -0,0 +1,427 @@
1
+ /*===---- bmiintrin.h - BMI intrinsics -------------------------------------===
2
+ *
3
+ * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ * See https://llvm.org/LICENSE.txt for license information.
5
+ * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ *
7
+ *===-----------------------------------------------------------------------===
8
+ */
9
+
10
+ #if !defined __X86INTRIN_H && !defined __IMMINTRIN_H
11
+ #error "Never use <bmiintrin.h> directly; include <x86intrin.h> instead."
12
+ #endif
13
+
14
+ #ifndef __BMIINTRIN_H
15
+ #define __BMIINTRIN_H
16
+
17
+ /* Allow using the tzcnt intrinsics even for non-BMI targets. Since the TZCNT
18
+ instruction behaves as BSF on non-BMI targets, there is code that expects
19
+ to use it as a potentially faster version of BSF. */
20
+ #define __RELAXED_FN_ATTRS __attribute__((__always_inline__, __nodebug__))
21
+
22
+ #define _tzcnt_u16(a) (__tzcnt_u16((a)))
23
+
24
+ /// Counts the number of trailing zero bits in the operand.
25
+ ///
26
+ /// \headerfile <x86intrin.h>
27
+ ///
28
+ /// This intrinsic corresponds to the <c> TZCNT </c> instruction.
29
+ ///
30
+ /// \param __X
31
+ /// An unsigned 16-bit integer whose trailing zeros are to be counted.
32
+ /// \returns An unsigned 16-bit integer containing the number of trailing zero
33
+ /// bits in the operand.
34
+ static __inline__ unsigned short __RELAXED_FN_ATTRS
35
+ __tzcnt_u16(unsigned short __X)
36
+ {
37
+ return __builtin_ia32_tzcnt_u16(__X);
38
+ }
39
+
40
+ /// Counts the number of trailing zero bits in the operand.
41
+ ///
42
+ /// \headerfile <x86intrin.h>
43
+ ///
44
+ /// This intrinsic corresponds to the <c> TZCNT </c> instruction.
45
+ ///
46
+ /// \param __X
47
+ /// An unsigned 32-bit integer whose trailing zeros are to be counted.
48
+ /// \returns An unsigned 32-bit integer containing the number of trailing zero
49
+ /// bits in the operand.
50
+ static __inline__ unsigned int __RELAXED_FN_ATTRS
51
+ __tzcnt_u32(unsigned int __X)
52
+ {
53
+ return __builtin_ia32_tzcnt_u32(__X);
54
+ }
55
+
56
+ /// Counts the number of trailing zero bits in the operand.
57
+ ///
58
+ /// \headerfile <x86intrin.h>
59
+ ///
60
+ /// This intrinsic corresponds to the <c> TZCNT </c> instruction.
61
+ ///
62
+ /// \param __X
63
+ /// An unsigned 32-bit integer whose trailing zeros are to be counted.
64
+ /// \returns An 32-bit integer containing the number of trailing zero bits in
65
+ /// the operand.
66
+ static __inline__ int __RELAXED_FN_ATTRS
67
+ _mm_tzcnt_32(unsigned int __X)
68
+ {
69
+ return __builtin_ia32_tzcnt_u32(__X);
70
+ }
71
+
72
+ #define _tzcnt_u32(a) (__tzcnt_u32((a)))
73
+
74
+ #ifdef __x86_64__
75
+
76
+ /// Counts the number of trailing zero bits in the operand.
77
+ ///
78
+ /// \headerfile <x86intrin.h>
79
+ ///
80
+ /// This intrinsic corresponds to the <c> TZCNT </c> instruction.
81
+ ///
82
+ /// \param __X
83
+ /// An unsigned 64-bit integer whose trailing zeros are to be counted.
84
+ /// \returns An unsigned 64-bit integer containing the number of trailing zero
85
+ /// bits in the operand.
86
+ static __inline__ unsigned long long __RELAXED_FN_ATTRS
87
+ __tzcnt_u64(unsigned long long __X)
88
+ {
89
+ return __builtin_ia32_tzcnt_u64(__X);
90
+ }
91
+
92
+ /// Counts the number of trailing zero bits in the operand.
93
+ ///
94
+ /// \headerfile <x86intrin.h>
95
+ ///
96
+ /// This intrinsic corresponds to the <c> TZCNT </c> instruction.
97
+ ///
98
+ /// \param __X
99
+ /// An unsigned 64-bit integer whose trailing zeros are to be counted.
100
+ /// \returns An 64-bit integer containing the number of trailing zero bits in
101
+ /// the operand.
102
+ static __inline__ long long __RELAXED_FN_ATTRS
103
+ _mm_tzcnt_64(unsigned long long __X)
104
+ {
105
+ return __builtin_ia32_tzcnt_u64(__X);
106
+ }
107
+
108
+ #define _tzcnt_u64(a) (__tzcnt_u64((a)))
109
+
110
+ #endif /* __x86_64__ */
111
+
112
+ #undef __RELAXED_FN_ATTRS
113
+
114
+ #if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \
115
+ defined(__BMI__)
116
+
117
+ /* Define the default attributes for the functions in this file. */
118
+ #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("bmi")))
119
+
120
+ #define _andn_u32(a, b) (__andn_u32((a), (b)))
121
+
122
+ /* _bextr_u32 != __bextr_u32 */
123
+ #define _blsi_u32(a) (__blsi_u32((a)))
124
+
125
+ #define _blsmsk_u32(a) (__blsmsk_u32((a)))
126
+
127
+ #define _blsr_u32(a) (__blsr_u32((a)))
128
+
129
+ /// Performs a bitwise AND of the second operand with the one's
130
+ /// complement of the first operand.
131
+ ///
132
+ /// \headerfile <x86intrin.h>
133
+ ///
134
+ /// This intrinsic corresponds to the <c> ANDN </c> instruction.
135
+ ///
136
+ /// \param __X
137
+ /// An unsigned integer containing one of the operands.
138
+ /// \param __Y
139
+ /// An unsigned integer containing one of the operands.
140
+ /// \returns An unsigned integer containing the bitwise AND of the second
141
+ /// operand with the one's complement of the first operand.
142
+ static __inline__ unsigned int __DEFAULT_FN_ATTRS
143
+ __andn_u32(unsigned int __X, unsigned int __Y)
144
+ {
145
+ return ~__X & __Y;
146
+ }
147
+
148
+ /* AMD-specified, double-leading-underscore version of BEXTR */
149
+ /// Extracts the specified bits from the first operand and returns them
150
+ /// in the least significant bits of the result.
151
+ ///
152
+ /// \headerfile <x86intrin.h>
153
+ ///
154
+ /// This intrinsic corresponds to the <c> BEXTR </c> instruction.
155
+ ///
156
+ /// \param __X
157
+ /// An unsigned integer whose bits are to be extracted.
158
+ /// \param __Y
159
+ /// An unsigned integer used to specify which bits are extracted. Bits [7:0]
160
+ /// specify the index of the least significant bit. Bits [15:8] specify the
161
+ /// number of bits to be extracted.
162
+ /// \returns An unsigned integer whose least significant bits contain the
163
+ /// extracted bits.
164
+ /// \see _bextr_u32
165
+ static __inline__ unsigned int __DEFAULT_FN_ATTRS
166
+ __bextr_u32(unsigned int __X, unsigned int __Y)
167
+ {
168
+ return __builtin_ia32_bextr_u32(__X, __Y);
169
+ }
170
+
171
+ /* Intel-specified, single-leading-underscore version of BEXTR */
172
+ /// Extracts the specified bits from the first operand and returns them
173
+ /// in the least significant bits of the result.
174
+ ///
175
+ /// \headerfile <x86intrin.h>
176
+ ///
177
+ /// This intrinsic corresponds to the <c> BEXTR </c> instruction.
178
+ ///
179
+ /// \param __X
180
+ /// An unsigned integer whose bits are to be extracted.
181
+ /// \param __Y
182
+ /// An unsigned integer used to specify the index of the least significant
183
+ /// bit for the bits to be extracted. Bits [7:0] specify the index.
184
+ /// \param __Z
185
+ /// An unsigned integer used to specify the number of bits to be extracted.
186
+ /// Bits [7:0] specify the number of bits.
187
+ /// \returns An unsigned integer whose least significant bits contain the
188
+ /// extracted bits.
189
+ /// \see __bextr_u32
190
+ static __inline__ unsigned int __DEFAULT_FN_ATTRS
191
+ _bextr_u32(unsigned int __X, unsigned int __Y, unsigned int __Z)
192
+ {
193
+ return __builtin_ia32_bextr_u32 (__X, ((__Y & 0xff) | ((__Z & 0xff) << 8)));
194
+ }
195
+
196
+ /* Intel-specified, single-leading-underscore version of BEXTR2 */
197
+ /// Extracts the specified bits from the first operand and returns them
198
+ /// in the least significant bits of the result.
199
+ ///
200
+ /// \headerfile <x86intrin.h>
201
+ ///
202
+ /// This intrinsic corresponds to the <c> BEXTR </c> instruction.
203
+ ///
204
+ /// \param __X
205
+ /// An unsigned integer whose bits are to be extracted.
206
+ /// \param __Y
207
+ /// An unsigned integer used to specify which bits are extracted. Bits [7:0]
208
+ /// specify the index of the least significant bit. Bits [15:8] specify the
209
+ /// number of bits to be extracted.
210
+ /// \returns An unsigned integer whose least significant bits contain the
211
+ /// extracted bits.
212
+ /// \see __bextr_u32
213
+ static __inline__ unsigned int __DEFAULT_FN_ATTRS
214
+ _bextr2_u32(unsigned int __X, unsigned int __Y) {
215
+ return __builtin_ia32_bextr_u32(__X, __Y);
216
+ }
217
+
218
+ /// Clears all bits in the source except for the least significant bit
219
+ /// containing a value of 1 and returns the result.
220
+ ///
221
+ /// \headerfile <x86intrin.h>
222
+ ///
223
+ /// This intrinsic corresponds to the <c> BLSI </c> instruction.
224
+ ///
225
+ /// \param __X
226
+ /// An unsigned integer whose bits are to be cleared.
227
+ /// \returns An unsigned integer containing the result of clearing the bits from
228
+ /// the source operand.
229
+ static __inline__ unsigned int __DEFAULT_FN_ATTRS
230
+ __blsi_u32(unsigned int __X)
231
+ {
232
+ return __X & -__X;
233
+ }
234
+
235
+ /// Creates a mask whose bits are set to 1, using bit 0 up to and
236
+ /// including the least significant bit that is set to 1 in the source
237
+ /// operand and returns the result.
238
+ ///
239
+ /// \headerfile <x86intrin.h>
240
+ ///
241
+ /// This intrinsic corresponds to the <c> BLSMSK </c> instruction.
242
+ ///
243
+ /// \param __X
244
+ /// An unsigned integer used to create the mask.
245
+ /// \returns An unsigned integer containing the newly created mask.
246
+ static __inline__ unsigned int __DEFAULT_FN_ATTRS
247
+ __blsmsk_u32(unsigned int __X)
248
+ {
249
+ return __X ^ (__X - 1);
250
+ }
251
+
252
+ /// Clears the least significant bit that is set to 1 in the source
253
+ /// operand and returns the result.
254
+ ///
255
+ /// \headerfile <x86intrin.h>
256
+ ///
257
+ /// This intrinsic corresponds to the <c> BLSR </c> instruction.
258
+ ///
259
+ /// \param __X
260
+ /// An unsigned integer containing the operand to be cleared.
261
+ /// \returns An unsigned integer containing the result of clearing the source
262
+ /// operand.
263
+ static __inline__ unsigned int __DEFAULT_FN_ATTRS
264
+ __blsr_u32(unsigned int __X)
265
+ {
266
+ return __X & (__X - 1);
267
+ }
268
+
269
+ #ifdef __x86_64__
270
+
271
+ #define _andn_u64(a, b) (__andn_u64((a), (b)))
272
+
273
+ /* _bextr_u64 != __bextr_u64 */
274
+ #define _blsi_u64(a) (__blsi_u64((a)))
275
+
276
+ #define _blsmsk_u64(a) (__blsmsk_u64((a)))
277
+
278
+ #define _blsr_u64(a) (__blsr_u64((a)))
279
+
280
+ /// Performs a bitwise AND of the second operand with the one's
281
+ /// complement of the first operand.
282
+ ///
283
+ /// \headerfile <x86intrin.h>
284
+ ///
285
+ /// This intrinsic corresponds to the <c> ANDN </c> instruction.
286
+ ///
287
+ /// \param __X
288
+ /// An unsigned 64-bit integer containing one of the operands.
289
+ /// \param __Y
290
+ /// An unsigned 64-bit integer containing one of the operands.
291
+ /// \returns An unsigned 64-bit integer containing the bitwise AND of the second
292
+ /// operand with the one's complement of the first operand.
293
+ static __inline__ unsigned long long __DEFAULT_FN_ATTRS
294
+ __andn_u64 (unsigned long long __X, unsigned long long __Y)
295
+ {
296
+ return ~__X & __Y;
297
+ }
298
+
299
+ /* AMD-specified, double-leading-underscore version of BEXTR */
300
+ /// Extracts the specified bits from the first operand and returns them
301
+ /// in the least significant bits of the result.
302
+ ///
303
+ /// \headerfile <x86intrin.h>
304
+ ///
305
+ /// This intrinsic corresponds to the <c> BEXTR </c> instruction.
306
+ ///
307
+ /// \param __X
308
+ /// An unsigned 64-bit integer whose bits are to be extracted.
309
+ /// \param __Y
310
+ /// An unsigned 64-bit integer used to specify which bits are extracted. Bits
311
+ /// [7:0] specify the index of the least significant bit. Bits [15:8] specify
312
+ /// the number of bits to be extracted.
313
+ /// \returns An unsigned 64-bit integer whose least significant bits contain the
314
+ /// extracted bits.
315
+ /// \see _bextr_u64
316
+ static __inline__ unsigned long long __DEFAULT_FN_ATTRS
317
+ __bextr_u64(unsigned long long __X, unsigned long long __Y)
318
+ {
319
+ return __builtin_ia32_bextr_u64(__X, __Y);
320
+ }
321
+
322
+ /* Intel-specified, single-leading-underscore version of BEXTR */
323
+ /// Extracts the specified bits from the first operand and returns them
324
+ /// in the least significant bits of the result.
325
+ ///
326
+ /// \headerfile <x86intrin.h>
327
+ ///
328
+ /// This intrinsic corresponds to the <c> BEXTR </c> instruction.
329
+ ///
330
+ /// \param __X
331
+ /// An unsigned 64-bit integer whose bits are to be extracted.
332
+ /// \param __Y
333
+ /// An unsigned integer used to specify the index of the least significant
334
+ /// bit for the bits to be extracted. Bits [7:0] specify the index.
335
+ /// \param __Z
336
+ /// An unsigned integer used to specify the number of bits to be extracted.
337
+ /// Bits [7:0] specify the number of bits.
338
+ /// \returns An unsigned 64-bit integer whose least significant bits contain the
339
+ /// extracted bits.
340
+ /// \see __bextr_u64
341
+ static __inline__ unsigned long long __DEFAULT_FN_ATTRS
342
+ _bextr_u64(unsigned long long __X, unsigned int __Y, unsigned int __Z)
343
+ {
344
+ return __builtin_ia32_bextr_u64 (__X, ((__Y & 0xff) | ((__Z & 0xff) << 8)));
345
+ }
346
+
347
+ /* Intel-specified, single-leading-underscore version of BEXTR2 */
348
+ /// Extracts the specified bits from the first operand and returns them
349
+ /// in the least significant bits of the result.
350
+ ///
351
+ /// \headerfile <x86intrin.h>
352
+ ///
353
+ /// This intrinsic corresponds to the <c> BEXTR </c> instruction.
354
+ ///
355
+ /// \param __X
356
+ /// An unsigned 64-bit integer whose bits are to be extracted.
357
+ /// \param __Y
358
+ /// An unsigned 64-bit integer used to specify which bits are extracted. Bits
359
+ /// [7:0] specify the index of the least significant bit. Bits [15:8] specify
360
+ /// the number of bits to be extracted.
361
+ /// \returns An unsigned 64-bit integer whose least significant bits contain the
362
+ /// extracted bits.
363
+ /// \see __bextr_u64
364
+ static __inline__ unsigned long long __DEFAULT_FN_ATTRS
365
+ _bextr2_u64(unsigned long long __X, unsigned long long __Y) {
366
+ return __builtin_ia32_bextr_u64(__X, __Y);
367
+ }
368
+
369
+ /// Clears all bits in the source except for the least significant bit
370
+ /// containing a value of 1 and returns the result.
371
+ ///
372
+ /// \headerfile <x86intrin.h>
373
+ ///
374
+ /// This intrinsic corresponds to the <c> BLSI </c> instruction.
375
+ ///
376
+ /// \param __X
377
+ /// An unsigned 64-bit integer whose bits are to be cleared.
378
+ /// \returns An unsigned 64-bit integer containing the result of clearing the
379
+ /// bits from the source operand.
380
+ static __inline__ unsigned long long __DEFAULT_FN_ATTRS
381
+ __blsi_u64(unsigned long long __X)
382
+ {
383
+ return __X & -__X;
384
+ }
385
+
386
+ /// Creates a mask whose bits are set to 1, using bit 0 up to and
387
+ /// including the least significant bit that is set to 1 in the source
388
+ /// operand and returns the result.
389
+ ///
390
+ /// \headerfile <x86intrin.h>
391
+ ///
392
+ /// This intrinsic corresponds to the <c> BLSMSK </c> instruction.
393
+ ///
394
+ /// \param __X
395
+ /// An unsigned 64-bit integer used to create the mask.
396
+ /// \returns An unsigned 64-bit integer containing the newly created mask.
397
+ static __inline__ unsigned long long __DEFAULT_FN_ATTRS
398
+ __blsmsk_u64(unsigned long long __X)
399
+ {
400
+ return __X ^ (__X - 1);
401
+ }
402
+
403
+ /// Clears the least significant bit that is set to 1 in the source
404
+ /// operand and returns the result.
405
+ ///
406
+ /// \headerfile <x86intrin.h>
407
+ ///
408
+ /// This intrinsic corresponds to the <c> BLSR </c> instruction.
409
+ ///
410
+ /// \param __X
411
+ /// An unsigned 64-bit integer containing the operand to be cleared.
412
+ /// \returns An unsigned 64-bit integer containing the result of clearing the
413
+ /// source operand.
414
+ static __inline__ unsigned long long __DEFAULT_FN_ATTRS
415
+ __blsr_u64(unsigned long long __X)
416
+ {
417
+ return __X & (__X - 1);
418
+ }
419
+
420
+ #endif /* __x86_64__ */
421
+
422
+ #undef __DEFAULT_FN_ATTRS
423
+
424
+ #endif /* !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) \
425
+ || defined(__BMI__) */
426
+
427
+ #endif /* __BMIINTRIN_H */
@@ -0,0 +1,66 @@
1
+ /*===------ cet.h -Control-flow Enforcement Technology feature ------------===
2
+ * Add x86 feature with IBT and/or SHSTK bits to ELF program property if they
3
+ * are enabled. Otherwise, contents in this header file are unused. This file
4
+ * is mainly design for assembly source code which want to enable CET.
5
+ *
6
+ * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
7
+ * See https://llvm.org/LICENSE.txt for license information.
8
+ * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
9
+ *
10
+ *===-----------------------------------------------------------------------===
11
+ */
12
+ #ifndef __CET_H
13
+ #define __CET_H
14
+
15
+ #ifdef __ASSEMBLER__
16
+
17
+ #ifndef __CET__
18
+ # define _CET_ENDBR
19
+ #endif
20
+
21
+ #ifdef __CET__
22
+
23
+ # ifdef __LP64__
24
+ # if __CET__ & 0x1
25
+ # define _CET_ENDBR endbr64
26
+ # else
27
+ # define _CET_ENDBR
28
+ # endif
29
+ # else
30
+ # if __CET__ & 0x1
31
+ # define _CET_ENDBR endbr32
32
+ # else
33
+ # define _CET_ENDBR
34
+ # endif
35
+ # endif
36
+
37
+
38
+ # ifdef __LP64__
39
+ # define __PROPERTY_ALIGN 3
40
+ # else
41
+ # define __PROPERTY_ALIGN 2
42
+ # endif
43
+
44
+ .pushsection ".note.gnu.property", "a"
45
+ .p2align __PROPERTY_ALIGN
46
+ .long 1f - 0f /* name length. */
47
+ .long 4f - 1f /* data length. */
48
+ /* NT_GNU_PROPERTY_TYPE_0. */
49
+ .long 5 /* note type. */
50
+ 0:
51
+ .asciz "GNU" /* vendor name. */
52
+ 1:
53
+ .p2align __PROPERTY_ALIGN
54
+ /* GNU_PROPERTY_X86_FEATURE_1_AND. */
55
+ .long 0xc0000002 /* pr_type. */
56
+ .long 3f - 2f /* pr_datasz. */
57
+ 2:
58
+ /* GNU_PROPERTY_X86_FEATURE_1_XXX. */
59
+ .long __CET__
60
+ 3:
61
+ .p2align __PROPERTY_ALIGN
62
+ 4:
63
+ .popsection
64
+ #endif
65
+ #endif
66
+ #endif
@@ -0,0 +1,99 @@
1
+ /*===---- cetintrin.h - CET intrinsic --------------------------------------===
2
+ *
3
+ * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ * See https://llvm.org/LICENSE.txt for license information.
5
+ * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ *
7
+ *===-----------------------------------------------------------------------===
8
+ */
9
+
10
+ #ifndef __IMMINTRIN_H
11
+ #error "Never use <cetintrin.h> directly; include <immintrin.h> instead."
12
+ #endif
13
+
14
+ #ifndef __CETINTRIN_H
15
+ #define __CETINTRIN_H
16
+
17
+ /* Define the default attributes for the functions in this file. */
18
+ #define __DEFAULT_FN_ATTRS \
19
+ __attribute__((__always_inline__, __nodebug__, __target__("shstk")))
20
+
21
+ static __inline__ void __DEFAULT_FN_ATTRS _incsspd(int __a) {
22
+ __builtin_ia32_incsspd(__a);
23
+ }
24
+
25
+ #ifdef __x86_64__
26
+ static __inline__ void __DEFAULT_FN_ATTRS _incsspq(unsigned long long __a) {
27
+ __builtin_ia32_incsspq(__a);
28
+ }
29
+ #endif /* __x86_64__ */
30
+
31
+ #ifdef __x86_64__
32
+ static __inline__ void __DEFAULT_FN_ATTRS _inc_ssp(unsigned int __a) {
33
+ __builtin_ia32_incsspq(__a);
34
+ }
35
+ #else /* __x86_64__ */
36
+ static __inline__ void __DEFAULT_FN_ATTRS _inc_ssp(unsigned int __a) {
37
+ __builtin_ia32_incsspd((int)__a);
38
+ }
39
+ #endif /* __x86_64__ */
40
+
41
+ static __inline__ unsigned int __DEFAULT_FN_ATTRS _rdsspd(unsigned int __a) {
42
+ return __builtin_ia32_rdsspd(__a);
43
+ }
44
+
45
+ #ifdef __x86_64__
46
+ static __inline__ unsigned long long __DEFAULT_FN_ATTRS _rdsspq(unsigned long long __a) {
47
+ return __builtin_ia32_rdsspq(__a);
48
+ }
49
+ #endif /* __x86_64__ */
50
+
51
+ #ifdef __x86_64__
52
+ static __inline__ unsigned long long __DEFAULT_FN_ATTRS _get_ssp(void) {
53
+ return __builtin_ia32_rdsspq(0);
54
+ }
55
+ #else /* __x86_64__ */
56
+ static __inline__ unsigned int __DEFAULT_FN_ATTRS _get_ssp(void) {
57
+ return __builtin_ia32_rdsspd(0);
58
+ }
59
+ #endif /* __x86_64__ */
60
+
61
+ static __inline__ void __DEFAULT_FN_ATTRS _saveprevssp() {
62
+ __builtin_ia32_saveprevssp();
63
+ }
64
+
65
+ static __inline__ void __DEFAULT_FN_ATTRS _rstorssp(void * __p) {
66
+ __builtin_ia32_rstorssp(__p);
67
+ }
68
+
69
+ static __inline__ void __DEFAULT_FN_ATTRS _wrssd(unsigned int __a, void * __p) {
70
+ __builtin_ia32_wrssd(__a, __p);
71
+ }
72
+
73
+ #ifdef __x86_64__
74
+ static __inline__ void __DEFAULT_FN_ATTRS _wrssq(unsigned long long __a, void * __p) {
75
+ __builtin_ia32_wrssq(__a, __p);
76
+ }
77
+ #endif /* __x86_64__ */
78
+
79
+ static __inline__ void __DEFAULT_FN_ATTRS _wrussd(unsigned int __a, void * __p) {
80
+ __builtin_ia32_wrussd(__a, __p);
81
+ }
82
+
83
+ #ifdef __x86_64__
84
+ static __inline__ void __DEFAULT_FN_ATTRS _wrussq(unsigned long long __a, void * __p) {
85
+ __builtin_ia32_wrussq(__a, __p);
86
+ }
87
+ #endif /* __x86_64__ */
88
+
89
+ static __inline__ void __DEFAULT_FN_ATTRS _setssbsy() {
90
+ __builtin_ia32_setssbsy();
91
+ }
92
+
93
+ static __inline__ void __DEFAULT_FN_ATTRS _clrssbsy(void * __p) {
94
+ __builtin_ia32_clrssbsy(__p);
95
+ }
96
+
97
+ #undef __DEFAULT_FN_ATTRS
98
+
99
+ #endif /* __CETINTRIN_H */
@@ -0,0 +1,36 @@
1
+ /*===---- cldemoteintrin.h - CLDEMOTE intrinsic ----------------------------===
2
+ *
3
+ * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ * See https://llvm.org/LICENSE.txt for license information.
5
+ * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ *
7
+ *===-----------------------------------------------------------------------===
8
+ */
9
+
10
+ #if !defined __X86INTRIN_H && !defined __IMMINTRIN_H
11
+ #error "Never use <cldemoteintrin.h> directly; include <x86intrin.h> instead."
12
+ #endif
13
+
14
+ #ifndef __CLDEMOTEINTRIN_H
15
+ #define __CLDEMOTEINTRIN_H
16
+
17
+ /* Define the default attributes for the functions in this file. */
18
+ #define __DEFAULT_FN_ATTRS \
19
+ __attribute__((__always_inline__, __nodebug__, __target__("cldemote")))
20
+
21
+ /// Hint to hardware that the cache line that contains \p __P should be demoted
22
+ /// from the cache closest to the processor core to a level more distant from
23
+ /// the processor core.
24
+ ///
25
+ /// \headerfile <x86intrin.h>
26
+ ///
27
+ /// This intrinsic corresponds to the <c> CLDEMOTE </c> instruction.
28
+ static __inline__ void __DEFAULT_FN_ATTRS
29
+ _cldemote(const void * __P) {
30
+ __builtin_ia32_cldemote(__P);
31
+ }
32
+
33
+ #define _mm_cldemote(p) _cldemote(p)
34
+ #undef __DEFAULT_FN_ATTRS
35
+
36
+ #endif
@@ -0,0 +1,27 @@
1
+ /*===---- clflushoptintrin.h - CLFLUSHOPT intrinsic ------------------------===
2
+ *
3
+ * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ * See https://llvm.org/LICENSE.txt for license information.
5
+ * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ *
7
+ *===-----------------------------------------------------------------------===
8
+ */
9
+
10
+ #ifndef __IMMINTRIN_H
11
+ #error "Never use <clflushoptintrin.h> directly; include <immintrin.h> instead."
12
+ #endif
13
+
14
+ #ifndef __CLFLUSHOPTINTRIN_H
15
+ #define __CLFLUSHOPTINTRIN_H
16
+
17
+ /* Define the default attributes for the functions in this file. */
18
+ #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("clflushopt")))
19
+
20
+ static __inline__ void __DEFAULT_FN_ATTRS
21
+ _mm_clflushopt(void const * __m) {
22
+ __builtin_ia32_clflushopt(__m);
23
+ }
24
+
25
+ #undef __DEFAULT_FN_ATTRS
26
+
27
+ #endif
@@ -0,0 +1,38 @@
1
+ /*===---- clwbintrin.h - CLWB intrinsic ------------------------------------===
2
+ *
3
+ * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ * See https://llvm.org/LICENSE.txt for license information.
5
+ * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ *
7
+ *===-----------------------------------------------------------------------===
8
+ */
9
+
10
+ #ifndef __IMMINTRIN_H
11
+ #error "Never use <clwbintrin.h> directly; include <immintrin.h> instead."
12
+ #endif
13
+
14
+ #ifndef __CLWBINTRIN_H
15
+ #define __CLWBINTRIN_H
16
+
17
+ /* Define the default attributes for the functions in this file. */
18
+ #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("clwb")))
19
+
20
+ /// Writes back to memory the cache line (if modified) that contains the
21
+ /// linear address specified in \a __p from any level of the cache hierarchy in
22
+ /// the cache coherence domain
23
+ ///
24
+ /// \headerfile <immintrin.h>
25
+ ///
26
+ /// This intrinsic corresponds to the <c> CLWB </c> instruction.
27
+ ///
28
+ /// \param __p
29
+ /// A pointer to the memory location used to identify the cache line to be
30
+ /// written back.
31
+ static __inline__ void __DEFAULT_FN_ATTRS
32
+ _mm_clwb(void const *__p) {
33
+ __builtin_ia32_clwb(__p);
34
+ }
35
+
36
+ #undef __DEFAULT_FN_ATTRS
37
+
38
+ #endif