@cpp-linter/clang-tidy-win32-x64 13.0.0 → 14.0.0

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 (175) hide show
  1. package/README.md +2 -2
  2. package/bin/clang-tidy.exe +2 -2
  3. package/lib/clang/{13.0.0 → 14.0.0}/include/__clang_cuda_complex_builtins.h +3 -3
  4. package/lib/clang/{13.0.0 → 14.0.0}/include/__clang_cuda_intrinsics.h +32 -0
  5. package/lib/clang/{13.0.0 → 14.0.0}/include/__clang_cuda_libdevice_declares.h +6 -0
  6. package/lib/clang/{13.0.0 → 14.0.0}/include/__clang_cuda_math.h +1 -1
  7. package/lib/clang/{13.0.0 → 14.0.0}/include/__clang_cuda_runtime_wrapper.h +62 -7
  8. package/lib/clang/14.0.0/include/__clang_cuda_texture_intrinsics.h +740 -0
  9. package/lib/clang/{13.0.0 → 14.0.0}/include/__clang_hip_runtime_wrapper.h +17 -4
  10. package/lib/clang/{13.0.0 → 14.0.0}/include/__wmmintrin_aes.h +1 -1
  11. package/lib/clang/{13.0.0 → 14.0.0}/include/altivec.h +202 -92
  12. package/lib/clang/{13.0.0 → 14.0.0}/include/ammintrin.h +4 -0
  13. package/lib/clang/{13.0.0 → 14.0.0}/include/amxintrin.h +17 -16
  14. package/lib/clang/{13.0.0 → 14.0.0}/include/arm_acle.h +6 -0
  15. package/lib/clang/{13.0.0 → 14.0.0}/include/arm_neon.h +4467 -4469
  16. package/lib/clang/14.0.0/include/arm_neon_sve_bridge.h +184 -0
  17. package/lib/clang/{13.0.0 → 14.0.0}/include/avx2intrin.h +181 -181
  18. package/lib/clang/{13.0.0 → 14.0.0}/include/avx512bf16intrin.h +3 -3
  19. package/lib/clang/{13.0.0 → 14.0.0}/include/avx512bwintrin.h +71 -71
  20. package/lib/clang/{13.0.0 → 14.0.0}/include/avx512dqintrin.h +365 -365
  21. package/lib/clang/{13.0.0 → 14.0.0}/include/avx512erintrin.h +102 -102
  22. package/lib/clang/{13.0.0 → 14.0.0}/include/avx512fintrin.h +1573 -1569
  23. package/lib/clang/14.0.0/include/avx512fp16intrin.h +3349 -0
  24. package/lib/clang/{13.0.0 → 14.0.0}/include/avx512vbmi2intrin.h +48 -48
  25. package/lib/clang/{13.0.0 → 14.0.0}/include/avx512vlbf16intrin.h +51 -3
  26. package/lib/clang/{13.0.0 → 14.0.0}/include/avx512vlbwintrin.h +94 -94
  27. package/lib/clang/{13.0.0 → 14.0.0}/include/avx512vldqintrin.h +134 -134
  28. package/lib/clang/14.0.0/include/avx512vlfp16intrin.h +2068 -0
  29. package/lib/clang/{13.0.0 → 14.0.0}/include/avx512vlintrin.h +563 -563
  30. package/lib/clang/{13.0.0 → 14.0.0}/include/avx512vlvbmi2intrin.h +96 -96
  31. package/lib/clang/{13.0.0 → 14.0.0}/include/avx512vlvnniintrin.h +8 -8
  32. package/lib/clang/{13.0.0 → 14.0.0}/include/avxintrin.h +189 -192
  33. package/lib/clang/{13.0.0 → 14.0.0}/include/cetintrin.h +10 -0
  34. package/lib/clang/{13.0.0 → 14.0.0}/include/cpuid.h +2 -1
  35. package/lib/clang/14.0.0/include/crc32intrin.h +100 -0
  36. package/lib/clang/{13.0.0 → 14.0.0}/include/emmintrin.h +21 -17
  37. package/lib/clang/{13.0.0 → 14.0.0}/include/f16cintrin.h +4 -4
  38. package/lib/clang/{13.0.0 → 14.0.0}/include/float.h +15 -6
  39. package/lib/clang/{13.0.0 → 14.0.0}/include/gfniintrin.h +47 -48
  40. package/lib/clang/{13.0.0 → 14.0.0}/include/hexagon_protos.h +0 -11
  41. package/lib/clang/{13.0.0 → 14.0.0}/include/hexagon_types.h +0 -32
  42. package/lib/clang/{13.0.0 → 14.0.0}/include/hvx_hexagon_protos.h +1200 -409
  43. package/lib/clang/{13.0.0 → 14.0.0}/include/ia32intrin.h +6 -6
  44. package/lib/clang/{13.0.0 → 14.0.0}/include/immintrin.h +26 -8
  45. package/lib/clang/{13.0.0 → 14.0.0}/include/intrin.h +24 -16
  46. package/lib/clang/{13.0.0 → 14.0.0}/include/keylockerintrin.h +2 -8
  47. package/lib/clang/{13.0.0 → 14.0.0}/include/limits.h +20 -0
  48. package/lib/clang/{13.0.0 → 14.0.0}/include/mmintrin.h +4 -0
  49. package/lib/clang/{13.0.0 → 14.0.0}/include/nmmintrin.h +4 -0
  50. package/lib/clang/{13.0.0 → 14.0.0}/include/opencl-c-base.h +69 -11
  51. package/lib/clang/{13.0.0 → 14.0.0}/include/opencl-c.h +1699 -459
  52. package/lib/clang/{13.0.0 → 14.0.0}/include/openmp_wrappers/complex +10 -1
  53. package/lib/clang/{13.0.0 → 14.0.0}/include/openmp_wrappers/complex.h +9 -0
  54. package/lib/clang/{13.0.0 → 14.0.0}/include/pmmintrin.h +4 -0
  55. package/lib/clang/{13.0.0 → 14.0.0}/include/ppc_wrappers/emmintrin.h +3 -2
  56. package/lib/clang/{13.0.0 → 14.0.0}/include/ppc_wrappers/mm_malloc.h +2 -2
  57. package/lib/clang/{13.0.0 → 14.0.0}/include/ppc_wrappers/mmintrin.h +3 -2
  58. package/lib/clang/{13.0.0 → 14.0.0}/include/ppc_wrappers/pmmintrin.h +3 -2
  59. package/lib/clang/{13.0.0 → 14.0.0}/include/ppc_wrappers/smmintrin.h +4 -3
  60. package/lib/clang/{13.0.0 → 14.0.0}/include/ppc_wrappers/tmmintrin.h +3 -2
  61. package/lib/clang/{13.0.0 → 14.0.0}/include/ppc_wrappers/xmmintrin.h +3 -2
  62. package/lib/clang/{13.0.0 → 14.0.0}/include/prfchwintrin.h +5 -2
  63. package/lib/clang/14.0.0/include/riscv_vector.h +95423 -0
  64. package/lib/clang/{13.0.0 → 14.0.0}/include/smmintrin.h +80 -159
  65. package/lib/clang/{13.0.0 → 14.0.0}/include/stdatomic.h +14 -1
  66. package/lib/clang/{13.0.0 → 14.0.0}/include/stdint.h +168 -0
  67. package/lib/clang/{13.0.0 → 14.0.0}/include/tmmintrin.h +10 -6
  68. package/lib/clang/{13.0.0 → 14.0.0}/include/unwind.h +2 -1
  69. package/lib/clang/{13.0.0 → 14.0.0}/include/vaesintrin.h +1 -1
  70. package/lib/clang/{13.0.0 → 14.0.0}/include/vpclmulqdqintrin.h +6 -6
  71. package/lib/clang/{13.0.0 → 14.0.0}/include/wasm_simd128.h +167 -24
  72. package/lib/clang/{13.0.0 → 14.0.0}/include/wmmintrin.h +4 -0
  73. package/lib/clang/{13.0.0 → 14.0.0}/include/x86gprintrin.h +12 -0
  74. package/lib/clang/{13.0.0 → 14.0.0}/include/xmmintrin.h +9 -5
  75. package/lib/clang/{13.0.0 → 14.0.0}/include/xopintrin.h +31 -31
  76. package/package.json +6 -6
  77. package/lib/clang/13.0.0/include/riscv_vector.h +0 -123865
  78. /package/lib/clang/{13.0.0 → 14.0.0}/include/__clang_cuda_builtin_vars.h +0 -0
  79. /package/lib/clang/{13.0.0 → 14.0.0}/include/__clang_cuda_cmath.h +0 -0
  80. /package/lib/clang/{13.0.0 → 14.0.0}/include/__clang_cuda_device_functions.h +0 -0
  81. /package/lib/clang/{13.0.0 → 14.0.0}/include/__clang_cuda_math_forward_declares.h +0 -0
  82. /package/lib/clang/{13.0.0 → 14.0.0}/include/__clang_hip_cmath.h +0 -0
  83. /package/lib/clang/{13.0.0 → 14.0.0}/include/__clang_hip_libdevice_declares.h +0 -0
  84. /package/lib/clang/{13.0.0 → 14.0.0}/include/__clang_hip_math.h +0 -0
  85. /package/lib/clang/{13.0.0 → 14.0.0}/include/__stddef_max_align_t.h +0 -0
  86. /package/lib/clang/{13.0.0 → 14.0.0}/include/__wmmintrin_pclmul.h +0 -0
  87. /package/lib/clang/{13.0.0 → 14.0.0}/include/adxintrin.h +0 -0
  88. /package/lib/clang/{13.0.0 → 14.0.0}/include/arm64intr.h +0 -0
  89. /package/lib/clang/{13.0.0 → 14.0.0}/include/arm_bf16.h +0 -0
  90. /package/lib/clang/{13.0.0 → 14.0.0}/include/arm_cde.h +0 -0
  91. /package/lib/clang/{13.0.0 → 14.0.0}/include/arm_cmse.h +0 -0
  92. /package/lib/clang/{13.0.0 → 14.0.0}/include/arm_fp16.h +0 -0
  93. /package/lib/clang/{13.0.0 → 14.0.0}/include/arm_mve.h +0 -0
  94. /package/lib/clang/{13.0.0 → 14.0.0}/include/arm_sve.h +0 -0
  95. /package/lib/clang/{13.0.0 → 14.0.0}/include/armintr.h +0 -0
  96. /package/lib/clang/{13.0.0 → 14.0.0}/include/avx512bitalgintrin.h +0 -0
  97. /package/lib/clang/{13.0.0 → 14.0.0}/include/avx512cdintrin.h +0 -0
  98. /package/lib/clang/{13.0.0 → 14.0.0}/include/avx512ifmaintrin.h +0 -0
  99. /package/lib/clang/{13.0.0 → 14.0.0}/include/avx512ifmavlintrin.h +0 -0
  100. /package/lib/clang/{13.0.0 → 14.0.0}/include/avx512pfintrin.h +0 -0
  101. /package/lib/clang/{13.0.0 → 14.0.0}/include/avx512vbmiintrin.h +0 -0
  102. /package/lib/clang/{13.0.0 → 14.0.0}/include/avx512vbmivlintrin.h +0 -0
  103. /package/lib/clang/{13.0.0 → 14.0.0}/include/avx512vlbitalgintrin.h +0 -0
  104. /package/lib/clang/{13.0.0 → 14.0.0}/include/avx512vlcdintrin.h +0 -0
  105. /package/lib/clang/{13.0.0 → 14.0.0}/include/avx512vlvp2intersectintrin.h +0 -0
  106. /package/lib/clang/{13.0.0 → 14.0.0}/include/avx512vnniintrin.h +0 -0
  107. /package/lib/clang/{13.0.0 → 14.0.0}/include/avx512vp2intersectintrin.h +0 -0
  108. /package/lib/clang/{13.0.0 → 14.0.0}/include/avx512vpopcntdqintrin.h +0 -0
  109. /package/lib/clang/{13.0.0 → 14.0.0}/include/avx512vpopcntdqvlintrin.h +0 -0
  110. /package/lib/clang/{13.0.0 → 14.0.0}/include/avxvnniintrin.h +0 -0
  111. /package/lib/clang/{13.0.0 → 14.0.0}/include/bmi2intrin.h +0 -0
  112. /package/lib/clang/{13.0.0 → 14.0.0}/include/bmiintrin.h +0 -0
  113. /package/lib/clang/{13.0.0 → 14.0.0}/include/builtins.h +0 -0
  114. /package/lib/clang/{13.0.0 → 14.0.0}/include/cet.h +0 -0
  115. /package/lib/clang/{13.0.0 → 14.0.0}/include/cldemoteintrin.h +0 -0
  116. /package/lib/clang/{13.0.0 → 14.0.0}/include/clflushoptintrin.h +0 -0
  117. /package/lib/clang/{13.0.0 → 14.0.0}/include/clwbintrin.h +0 -0
  118. /package/lib/clang/{13.0.0 → 14.0.0}/include/clzerointrin.h +0 -0
  119. /package/lib/clang/{13.0.0 → 14.0.0}/include/cuda_wrappers/algorithm +0 -0
  120. /package/lib/clang/{13.0.0 → 14.0.0}/include/cuda_wrappers/complex +0 -0
  121. /package/lib/clang/{13.0.0 → 14.0.0}/include/cuda_wrappers/new +0 -0
  122. /package/lib/clang/{13.0.0 → 14.0.0}/include/enqcmdintrin.h +0 -0
  123. /package/lib/clang/{13.0.0 → 14.0.0}/include/fma4intrin.h +0 -0
  124. /package/lib/clang/{13.0.0 → 14.0.0}/include/fmaintrin.h +0 -0
  125. /package/lib/clang/{13.0.0 → 14.0.0}/include/fxsrintrin.h +0 -0
  126. /package/lib/clang/{13.0.0 → 14.0.0}/include/hexagon_circ_brev_intrinsics.h +0 -0
  127. /package/lib/clang/{13.0.0 → 14.0.0}/include/hresetintrin.h +0 -0
  128. /package/lib/clang/{13.0.0 → 14.0.0}/include/htmintrin.h +0 -0
  129. /package/lib/clang/{13.0.0 → 14.0.0}/include/htmxlintrin.h +0 -0
  130. /package/lib/clang/{13.0.0 → 14.0.0}/include/inttypes.h +0 -0
  131. /package/lib/clang/{13.0.0 → 14.0.0}/include/invpcidintrin.h +0 -0
  132. /package/lib/clang/{13.0.0 → 14.0.0}/include/iso646.h +0 -0
  133. /package/lib/clang/{13.0.0 → 14.0.0}/include/lwpintrin.h +0 -0
  134. /package/lib/clang/{13.0.0 → 14.0.0}/include/lzcntintrin.h +0 -0
  135. /package/lib/clang/{13.0.0 → 14.0.0}/include/mm3dnow.h +0 -0
  136. /package/lib/clang/{13.0.0 → 14.0.0}/include/mm_malloc.h +0 -0
  137. /package/lib/clang/{13.0.0 → 14.0.0}/include/module.modulemap +0 -0
  138. /package/lib/clang/{13.0.0 → 14.0.0}/include/movdirintrin.h +0 -0
  139. /package/lib/clang/{13.0.0 → 14.0.0}/include/msa.h +0 -0
  140. /package/lib/clang/{13.0.0 → 14.0.0}/include/mwaitxintrin.h +0 -0
  141. /package/lib/clang/{13.0.0 → 14.0.0}/include/openmp_wrappers/__clang_openmp_device_functions.h +0 -0
  142. /package/lib/clang/{13.0.0 → 14.0.0}/include/openmp_wrappers/cmath +0 -0
  143. /package/lib/clang/{13.0.0 → 14.0.0}/include/openmp_wrappers/complex_cmath.h +0 -0
  144. /package/lib/clang/{13.0.0 → 14.0.0}/include/openmp_wrappers/math.h +0 -0
  145. /package/lib/clang/{13.0.0 → 14.0.0}/include/openmp_wrappers/new +0 -0
  146. /package/lib/clang/{13.0.0 → 14.0.0}/include/pconfigintrin.h +0 -0
  147. /package/lib/clang/{13.0.0 → 14.0.0}/include/pkuintrin.h +0 -0
  148. /package/lib/clang/{13.0.0 → 14.0.0}/include/popcntintrin.h +0 -0
  149. /package/lib/clang/{13.0.0 → 14.0.0}/include/ptwriteintrin.h +0 -0
  150. /package/lib/clang/{13.0.0 → 14.0.0}/include/rdseedintrin.h +0 -0
  151. /package/lib/clang/{13.0.0 → 14.0.0}/include/rtmintrin.h +0 -0
  152. /package/lib/clang/{13.0.0 → 14.0.0}/include/s390intrin.h +0 -0
  153. /package/lib/clang/{13.0.0 → 14.0.0}/include/serializeintrin.h +0 -0
  154. /package/lib/clang/{13.0.0 → 14.0.0}/include/sgxintrin.h +0 -0
  155. /package/lib/clang/{13.0.0 → 14.0.0}/include/shaintrin.h +0 -0
  156. /package/lib/clang/{13.0.0 → 14.0.0}/include/stdalign.h +0 -0
  157. /package/lib/clang/{13.0.0 → 14.0.0}/include/stdarg.h +0 -0
  158. /package/lib/clang/{13.0.0 → 14.0.0}/include/stdbool.h +0 -0
  159. /package/lib/clang/{13.0.0 → 14.0.0}/include/stddef.h +0 -0
  160. /package/lib/clang/{13.0.0 → 14.0.0}/include/stdnoreturn.h +0 -0
  161. /package/lib/clang/{13.0.0 → 14.0.0}/include/tbmintrin.h +0 -0
  162. /package/lib/clang/{13.0.0 → 14.0.0}/include/tgmath.h +0 -0
  163. /package/lib/clang/{13.0.0 → 14.0.0}/include/tsxldtrkintrin.h +0 -0
  164. /package/lib/clang/{13.0.0 → 14.0.0}/include/uintrintrin.h +0 -0
  165. /package/lib/clang/{13.0.0 → 14.0.0}/include/vadefs.h +0 -0
  166. /package/lib/clang/{13.0.0 → 14.0.0}/include/varargs.h +0 -0
  167. /package/lib/clang/{13.0.0 → 14.0.0}/include/vecintrin.h +0 -0
  168. /package/lib/clang/{13.0.0 → 14.0.0}/include/waitpkgintrin.h +0 -0
  169. /package/lib/clang/{13.0.0 → 14.0.0}/include/wbnoinvdintrin.h +0 -0
  170. /package/lib/clang/{13.0.0 → 14.0.0}/include/x86intrin.h +0 -0
  171. /package/lib/clang/{13.0.0 → 14.0.0}/include/xsavecintrin.h +0 -0
  172. /package/lib/clang/{13.0.0 → 14.0.0}/include/xsaveintrin.h +0 -0
  173. /package/lib/clang/{13.0.0 → 14.0.0}/include/xsaveoptintrin.h +0 -0
  174. /package/lib/clang/{13.0.0 → 14.0.0}/include/xsavesintrin.h +0 -0
  175. /package/lib/clang/{13.0.0 → 14.0.0}/include/xtestintrin.h +0 -0
@@ -16,7 +16,7 @@
16
16
 
17
17
  /* Define the default attributes for the functions in this file. */
18
18
  #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__))
19
- #define __DEFAULT_FN_ATTRS_SSE42 __attribute__((__always_inline__, __nodebug__, __target__("sse4.2")))
19
+ #define __DEFAULT_FN_ATTRS_CRC32 __attribute__((__always_inline__, __nodebug__, __target__("crc32")))
20
20
 
21
21
  #if defined(__cplusplus) && (__cplusplus >= 201103L)
22
22
  #define __DEFAULT_FN_ATTRS_CAST __attribute__((__always_inline__)) constexpr
@@ -282,7 +282,7 @@ _castu64_f64(unsigned long long __A) {
282
282
  * \returns The result of adding operand \a __C to the CRC-32C checksum of
283
283
  * operand \a __D.
284
284
  */
285
- static __inline__ unsigned int __DEFAULT_FN_ATTRS_SSE42
285
+ static __inline__ unsigned int __DEFAULT_FN_ATTRS_CRC32
286
286
  __crc32b(unsigned int __C, unsigned char __D)
287
287
  {
288
288
  return __builtin_ia32_crc32qi(__C, __D);
@@ -303,7 +303,7 @@ __crc32b(unsigned int __C, unsigned char __D)
303
303
  * \returns The result of adding operand \a __C to the CRC-32C checksum of
304
304
  * operand \a __D.
305
305
  */
306
- static __inline__ unsigned int __DEFAULT_FN_ATTRS_SSE42
306
+ static __inline__ unsigned int __DEFAULT_FN_ATTRS_CRC32
307
307
  __crc32w(unsigned int __C, unsigned short __D)
308
308
  {
309
309
  return __builtin_ia32_crc32hi(__C, __D);
@@ -324,7 +324,7 @@ __crc32w(unsigned int __C, unsigned short __D)
324
324
  * \returns The result of adding operand \a __C to the CRC-32C checksum of
325
325
  * operand \a __D.
326
326
  */
327
- static __inline__ unsigned int __DEFAULT_FN_ATTRS_SSE42
327
+ static __inline__ unsigned int __DEFAULT_FN_ATTRS_CRC32
328
328
  __crc32d(unsigned int __C, unsigned int __D)
329
329
  {
330
330
  return __builtin_ia32_crc32si(__C, __D);
@@ -346,7 +346,7 @@ __crc32d(unsigned int __C, unsigned int __D)
346
346
  * \returns The result of adding operand \a __C to the CRC-32C checksum of
347
347
  * operand \a __D.
348
348
  */
349
- static __inline__ unsigned long long __DEFAULT_FN_ATTRS_SSE42
349
+ static __inline__ unsigned long long __DEFAULT_FN_ATTRS_CRC32
350
350
  __crc32q(unsigned long long __C, unsigned long long __D)
351
351
  {
352
352
  return __builtin_ia32_crc32di(__C, __D);
@@ -435,7 +435,7 @@ __rorq(unsigned long long __X, int __C) {
435
435
 
436
436
  #undef __DEFAULT_FN_ATTRS
437
437
  #undef __DEFAULT_FN_ATTRS_CAST
438
- #undef __DEFAULT_FN_ATTRS_SSE42
438
+ #undef __DEFAULT_FN_ATTRS_CRC32
439
439
  #undef __DEFAULT_FN_ATTRS_CONSTEXPR
440
440
 
441
441
  #endif /* __IA32INTRIN_H */
@@ -10,6 +10,10 @@
10
10
  #ifndef __IMMINTRIN_H
11
11
  #define __IMMINTRIN_H
12
12
 
13
+ #if !defined(__i386__) && !defined(__x86_64__)
14
+ #error "This header is only meant to be used on x86 and x64 architecture"
15
+ #endif
16
+
13
17
  #include <x86gprintrin.h>
14
18
 
15
19
  #if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \
@@ -210,6 +214,20 @@
210
214
  #include <avx512pfintrin.h>
211
215
  #endif
212
216
 
217
+ /*
218
+ * FIXME: _Float16 type is legal only when HW support float16 operation.
219
+ * We use __AVX512FP16__ to identify if float16 is supported or not, so
220
+ * when float16 is not supported, the related header is not included.
221
+ *
222
+ */
223
+ #if defined(__AVX512FP16__)
224
+ #include <avx512fp16intrin.h>
225
+ #endif
226
+
227
+ #if defined(__AVX512FP16__) && defined(__AVX512VL__)
228
+ #include <avx512vlfp16intrin.h>
229
+ #endif
230
+
213
231
  #if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \
214
232
  defined(__AVX512BF16__)
215
233
  #include <avx512bf16intrin.h>
@@ -525,13 +543,13 @@ extern "C" {
525
543
  #if defined(__i386__) || defined(__x86_64__)
526
544
  static __inline__ long __DEFAULT_FN_ATTRS
527
545
  _InterlockedExchange_HLEAcquire(long volatile *_Target, long _Value) {
528
- __asm__ __volatile__(".byte 0xf2 ; lock ; xchg %0, %1"
546
+ __asm__ __volatile__(".byte 0xf2 ; lock ; xchg {%0, %1|%1, %0}"
529
547
  : "+r" (_Value), "+m" (*_Target) :: "memory");
530
548
  return _Value;
531
549
  }
532
550
  static __inline__ long __DEFAULT_FN_ATTRS
533
551
  _InterlockedExchange_HLERelease(long volatile *_Target, long _Value) {
534
- __asm__ __volatile__(".byte 0xf3 ; lock ; xchg %0, %1"
552
+ __asm__ __volatile__(".byte 0xf3 ; lock ; xchg {%0, %1|%1, %0}"
535
553
  : "+r" (_Value), "+m" (*_Target) :: "memory");
536
554
  return _Value;
537
555
  }
@@ -539,13 +557,13 @@ _InterlockedExchange_HLERelease(long volatile *_Target, long _Value) {
539
557
  #if defined(__x86_64__)
540
558
  static __inline__ __int64 __DEFAULT_FN_ATTRS
541
559
  _InterlockedExchange64_HLEAcquire(__int64 volatile *_Target, __int64 _Value) {
542
- __asm__ __volatile__(".byte 0xf2 ; lock ; xchg %0, %1"
560
+ __asm__ __volatile__(".byte 0xf2 ; lock ; xchg {%0, %1|%1, %0}"
543
561
  : "+r" (_Value), "+m" (*_Target) :: "memory");
544
562
  return _Value;
545
563
  }
546
564
  static __inline__ __int64 __DEFAULT_FN_ATTRS
547
565
  _InterlockedExchange64_HLERelease(__int64 volatile *_Target, __int64 _Value) {
548
- __asm__ __volatile__(".byte 0xf3 ; lock ; xchg %0, %1"
566
+ __asm__ __volatile__(".byte 0xf3 ; lock ; xchg {%0, %1|%1, %0}"
549
567
  : "+r" (_Value), "+m" (*_Target) :: "memory");
550
568
  return _Value;
551
569
  }
@@ -557,7 +575,7 @@ _InterlockedExchange64_HLERelease(__int64 volatile *_Target, __int64 _Value) {
557
575
  static __inline__ long __DEFAULT_FN_ATTRS
558
576
  _InterlockedCompareExchange_HLEAcquire(long volatile *_Destination,
559
577
  long _Exchange, long _Comparand) {
560
- __asm__ __volatile__(".byte 0xf2 ; lock ; cmpxchg %2, %1"
578
+ __asm__ __volatile__(".byte 0xf2 ; lock ; cmpxchg {%2, %1|%1, %2}"
561
579
  : "+a" (_Comparand), "+m" (*_Destination)
562
580
  : "r" (_Exchange) : "memory");
563
581
  return _Comparand;
@@ -565,7 +583,7 @@ _InterlockedCompareExchange_HLEAcquire(long volatile *_Destination,
565
583
  static __inline__ long __DEFAULT_FN_ATTRS
566
584
  _InterlockedCompareExchange_HLERelease(long volatile *_Destination,
567
585
  long _Exchange, long _Comparand) {
568
- __asm__ __volatile__(".byte 0xf3 ; lock ; cmpxchg %2, %1"
586
+ __asm__ __volatile__(".byte 0xf3 ; lock ; cmpxchg {%2, %1|%1, %2}"
569
587
  : "+a" (_Comparand), "+m" (*_Destination)
570
588
  : "r" (_Exchange) : "memory");
571
589
  return _Comparand;
@@ -575,7 +593,7 @@ _InterlockedCompareExchange_HLERelease(long volatile *_Destination,
575
593
  static __inline__ __int64 __DEFAULT_FN_ATTRS
576
594
  _InterlockedCompareExchange64_HLEAcquire(__int64 volatile *_Destination,
577
595
  __int64 _Exchange, __int64 _Comparand) {
578
- __asm__ __volatile__(".byte 0xf2 ; lock ; cmpxchg %2, %1"
596
+ __asm__ __volatile__(".byte 0xf2 ; lock ; cmpxchg {%2, %1|%1, %2}"
579
597
  : "+a" (_Comparand), "+m" (*_Destination)
580
598
  : "r" (_Exchange) : "memory");
581
599
  return _Comparand;
@@ -583,7 +601,7 @@ _InterlockedCompareExchange64_HLEAcquire(__int64 volatile *_Destination,
583
601
  static __inline__ __int64 __DEFAULT_FN_ATTRS
584
602
  _InterlockedCompareExchange64_HLERelease(__int64 volatile *_Destination,
585
603
  __int64 _Exchange, __int64 _Comparand) {
586
- __asm__ __volatile__(".byte 0xf3 ; lock ; cmpxchg %2, %1"
604
+ __asm__ __volatile__(".byte 0xf3 ; lock ; cmpxchg {%2, %1|%1, %2}"
587
605
  : "+a" (_Comparand), "+m" (*_Destination)
588
606
  : "r" (_Exchange) : "memory");
589
607
  return _Comparand;
@@ -97,8 +97,9 @@ unsigned long __readcr8(void);
97
97
  unsigned int __readdr(unsigned int);
98
98
  #ifdef __i386__
99
99
  unsigned char __readfsbyte(unsigned long);
100
- unsigned __int64 __readfsqword(unsigned long);
101
100
  unsigned short __readfsword(unsigned long);
101
+ unsigned long __readfsdword(unsigned long);
102
+ unsigned __int64 __readfsqword(unsigned long);
102
103
  #endif
103
104
  unsigned __int64 __readmsr(unsigned long);
104
105
  unsigned __int64 __readpmc(unsigned long);
@@ -149,10 +150,8 @@ long _InterlockedExchangeAdd_HLEAcquire(long volatile *, long);
149
150
  long _InterlockedExchangeAdd_HLERelease(long volatile *, long);
150
151
  __int64 _InterlockedExchangeAdd64_HLEAcquire(__int64 volatile *, __int64);
151
152
  __int64 _InterlockedExchangeAdd64_HLERelease(__int64 volatile *, __int64);
152
- void __attribute__((__deprecated__(
153
- "use other intrinsics or C++11 atomics instead"))) _ReadBarrier(void);
154
- void __attribute__((__deprecated__(
155
- "use other intrinsics or C++11 atomics instead"))) _ReadWriteBarrier(void);
153
+ void _ReadBarrier(void);
154
+ void _ReadWriteBarrier(void);
156
155
  unsigned int _rorx_u32(unsigned int, const unsigned int);
157
156
  int _sarx_i32(int, unsigned int);
158
157
  #if __STDC_HOSTED__
@@ -163,8 +162,7 @@ unsigned int _shrx_u32(unsigned int, unsigned int);
163
162
  void _Store_HLERelease(long volatile *, long);
164
163
  void _Store64_HLERelease(__int64 volatile *, __int64);
165
164
  void _StorePointer_HLERelease(void *volatile *, void *);
166
- void __attribute__((__deprecated__(
167
- "use other intrinsics or C++11 atomics instead"))) _WriteBarrier(void);
165
+ void _WriteBarrier(void);
168
166
  unsigned __int32 xbegin(void);
169
167
  void _xend(void);
170
168
 
@@ -457,7 +455,9 @@ static __inline__ void __DEFAULT_FN_ATTRS __movsb(unsigned char *__dst,
457
455
  :
458
456
  : "memory");
459
457
  #else
460
- __asm__ __volatile__("xchg %%esi, %1\nrep movsb\nxchg %%esi, %1"
458
+ __asm__ __volatile__("xchg {%%esi, %1|%1, esi}\n"
459
+ "rep movsb\n"
460
+ "xchg {%%esi, %1|%1, esi}"
461
461
  : "+D"(__dst), "+r"(__src), "+c"(__n)
462
462
  :
463
463
  : "memory");
@@ -467,12 +467,14 @@ static __inline__ void __DEFAULT_FN_ATTRS __movsd(unsigned long *__dst,
467
467
  unsigned long const *__src,
468
468
  size_t __n) {
469
469
  #if defined(__x86_64__)
470
- __asm__ __volatile__("rep movsl"
470
+ __asm__ __volatile__("rep movs{l|d}"
471
471
  : "+D"(__dst), "+S"(__src), "+c"(__n)
472
472
  :
473
473
  : "memory");
474
474
  #else
475
- __asm__ __volatile__("xchg %%esi, %1\nrep movsl\nxchg %%esi, %1"
475
+ __asm__ __volatile__("xchg {%%esi, %1|%1, esi}\n"
476
+ "rep movs{l|d}\n"
477
+ "xchg {%%esi, %1|%1, esi}"
476
478
  : "+D"(__dst), "+r"(__src), "+c"(__n)
477
479
  :
478
480
  : "memory");
@@ -487,7 +489,9 @@ static __inline__ void __DEFAULT_FN_ATTRS __movsw(unsigned short *__dst,
487
489
  :
488
490
  : "memory");
489
491
  #else
490
- __asm__ __volatile__("xchg %%esi, %1\nrep movsw\nxchg %%esi, %1"
492
+ __asm__ __volatile__("xchg {%%esi, %1|%1, esi}\n"
493
+ "rep movsw\n"
494
+ "xchg {%%esi, %1|%1, esi}"
491
495
  : "+D"(__dst), "+r"(__src), "+c"(__n)
492
496
  :
493
497
  : "memory");
@@ -496,7 +500,7 @@ static __inline__ void __DEFAULT_FN_ATTRS __movsw(unsigned short *__dst,
496
500
  static __inline__ void __DEFAULT_FN_ATTRS __stosd(unsigned long *__dst,
497
501
  unsigned long __x,
498
502
  size_t __n) {
499
- __asm__ __volatile__("rep stosl"
503
+ __asm__ __volatile__("rep stos{l|d}"
500
504
  : "+D"(__dst), "+c"(__n)
501
505
  : "a"(__x)
502
506
  : "memory");
@@ -538,9 +542,9 @@ static __inline__ void __DEFAULT_FN_ATTRS __stosq(unsigned __int64 *__dst,
538
542
  #else
539
543
  /* x86-64 uses %rbx as the base register, so preserve it. */
540
544
  #define __cpuid_count(__leaf, __count, __eax, __ebx, __ecx, __edx) \
541
- __asm("xchgq %%rbx,%q1\n" \
545
+ __asm("xchg{q} {%%rbx, %q1|%q1, rbx}\n" \
542
546
  "cpuid\n" \
543
- "xchgq %%rbx,%q1" \
547
+ "xchg{q} {%%rbx, %q1|%q1, rbx}" \
544
548
  : "=a"(__eax), "=r"(__ebx), "=c"(__ecx), "=d"(__edx) \
545
549
  : "0"(__leaf), "2"(__count))
546
550
  #endif
@@ -600,13 +604,17 @@ __readmsr(unsigned long __register) {
600
604
 
601
605
  static __inline__ unsigned __LPTRINT_TYPE__ __DEFAULT_FN_ATTRS __readcr3(void) {
602
606
  unsigned __LPTRINT_TYPE__ __cr3_val;
603
- __asm__ __volatile__ ("mov %%cr3, %0" : "=r"(__cr3_val) : : "memory");
607
+ __asm__ __volatile__(
608
+ "mov {%%cr3, %0|%0, cr3}"
609
+ : "=r"(__cr3_val)
610
+ :
611
+ : "memory");
604
612
  return __cr3_val;
605
613
  }
606
614
 
607
615
  static __inline__ void __DEFAULT_FN_ATTRS
608
616
  __writecr3(unsigned __INTPTR_TYPE__ __cr3_val) {
609
- __asm__ ("mov %0, %%cr3" : : "r"(__cr3_val) : "memory");
617
+ __asm__ ("mov {%0, %%cr3|cr3, %0}" : : "r"(__cr3_val) : "memory");
610
618
  }
611
619
 
612
620
  #ifdef __cplusplus
@@ -99,7 +99,7 @@ _mm_loadiwkey (unsigned int __ctl, __m128i __intkey,
99
99
  }
100
100
 
101
101
  /// Wrap a 128-bit AES key from __key into a key handle and output in
102
- /// ((__m128i*)__h) to ((__m128i*)__h) + 5 and a 32-bit value as return.
102
+ /// ((__m128i*)__h) to ((__m128i*)__h) + 2 and a 32-bit value as return.
103
103
  /// The explicit source operand __htype specifies handle restrictions.
104
104
  ///
105
105
  /// \headerfile <x86intrin.h>
@@ -120,9 +120,6 @@ _mm_loadiwkey (unsigned int __ctl, __m128i __intkey,
120
120
  /// MEM[__h+127:__h] := Handle[127:0] // AAD
121
121
  /// MEM[__h+255:__h+128] := Handle[255:128] // Integrity Tag
122
122
  /// MEM[__h+383:__h+256] := Handle[383:256] // CipherText
123
- /// MEM[__h+511:__h+384] := 0 // Reserved for future usage
124
- /// MEM[__h+639:__h+512] := 0 // Reserved for future usage
125
- /// MEM[__h+767:__h+640] := 0 // Reserved for future usage
126
123
  /// OF := 0
127
124
  /// SF := 0
128
125
  /// ZF := 0
@@ -136,7 +133,7 @@ _mm_encodekey128_u32(unsigned int __htype, __m128i __key, void *__h) {
136
133
  }
137
134
 
138
135
  /// Wrap a 256-bit AES key from __key_hi:__key_lo into a key handle, then
139
- /// output handle in ((__m128i*)__h) to ((__m128i*)__h) + 6 and
136
+ /// output handle in ((__m128i*)__h) to ((__m128i*)__h) + 3 and
140
137
  /// a 32-bit value as return.
141
138
  /// The explicit source operand __htype specifies handle restrictions.
142
139
  ///
@@ -160,9 +157,6 @@ _mm_encodekey128_u32(unsigned int __htype, __m128i __key, void *__h) {
160
157
  /// MEM[__h+255:__h+128] := Handle[255:128] // Tag
161
158
  /// MEM[__h+383:__h+256] := Handle[383:256] // CipherText[127:0]
162
159
  /// MEM[__h+511:__h+384] := Handle[511:384] // CipherText[255:128]
163
- /// MEM[__h+639:__h+512] := 0 // Reserved for future usage
164
- /// MEM[__h+767:__h+640] := 0 // Reserved for future usage
165
- /// MEM[__h+895:__h+768] := 0 Integrity// Reserved for future usage
166
160
  /// OF := 0
167
161
  /// SF := 0
168
162
  /// ZF := 0
@@ -62,6 +62,26 @@
62
62
 
63
63
  #define CHAR_BIT __CHAR_BIT__
64
64
 
65
+ /* C2x 5.2.4.2.1 */
66
+ /* FIXME: This is using the placeholder dates Clang produces for these macros
67
+ in C2x mode; switch to the correct values once they've been published. */
68
+ #if __STDC_VERSION__ >= 202000L
69
+ #define BOOL_WIDTH __BOOL_WIDTH__
70
+ #define CHAR_WIDTH CHAR_BIT
71
+ #define SCHAR_WIDTH CHAR_BIT
72
+ #define UCHAR_WIDTH CHAR_BIT
73
+ #define USHRT_WIDTH __SHRT_WIDTH__
74
+ #define SHRT_WIDTH __SHRT_WIDTH__
75
+ #define UINT_WIDTH __INT_WIDTH__
76
+ #define INT_WIDTH __INT_WIDTH__
77
+ #define ULONG_WIDTH __LONG_WIDTH__
78
+ #define LONG_WIDTH __LONG_WIDTH__
79
+ #define ULLONG_WIDTH __LLONG_WIDTH__
80
+ #define LLONG_WIDTH __LLONG_WIDTH__
81
+
82
+ #define BITINT_MAXWIDTH __BITINT_MAXWIDTH__
83
+ #endif
84
+
65
85
  #ifdef __CHAR_UNSIGNED__ /* -funsigned-char */
66
86
  #define CHAR_MIN 0
67
87
  #define CHAR_MAX UCHAR_MAX
@@ -10,6 +10,10 @@
10
10
  #ifndef __MMINTRIN_H
11
11
  #define __MMINTRIN_H
12
12
 
13
+ #if !defined(__i386__) && !defined(__x86_64__)
14
+ #error "This header is only meant to be used on x86 and x64 architecture"
15
+ #endif
16
+
13
17
  typedef long long __m64 __attribute__((__vector_size__(8), __aligned__(8)));
14
18
 
15
19
  typedef long long __v1di __attribute__((__vector_size__(8)));
@@ -10,6 +10,10 @@
10
10
  #ifndef __NMMINTRIN_H
11
11
  #define __NMMINTRIN_H
12
12
 
13
+ #if !defined(__i386__) && !defined(__x86_64__)
14
+ #error "This header is only meant to be used on x86 and x64 architecture"
15
+ #endif
16
+
13
17
  /* To match expectations of gcc we put the sse4.2 definitions into smmintrin.h,
14
18
  just include it now then. */
15
19
  #include <smmintrin.h>
@@ -12,8 +12,8 @@
12
12
  // Define extension macros
13
13
 
14
14
  #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200)
15
- // For SPIR all extensions are supported.
16
- #if defined(__SPIR__)
15
+ // For SPIR and SPIR-V all extensions are supported.
16
+ #if defined(__SPIR__) || defined(__SPIRV__)
17
17
  #define cl_khr_subgroup_extended_types 1
18
18
  #define cl_khr_subgroup_non_uniform_vote 1
19
19
  #define cl_khr_subgroup_ballot 1
@@ -25,12 +25,31 @@
25
25
  #define cl_khr_integer_dot_product 1
26
26
  #define __opencl_c_integer_dot_product_input_4x8bit 1
27
27
  #define __opencl_c_integer_dot_product_input_4x8bit_packed 1
28
+ #define cl_ext_float_atomics 1
29
+ #ifdef cl_khr_fp16
30
+ #define __opencl_c_ext_fp16_global_atomic_load_store 1
31
+ #define __opencl_c_ext_fp16_local_atomic_load_store 1
32
+ #define __opencl_c_ext_fp16_global_atomic_add 1
33
+ #define __opencl_c_ext_fp16_local_atomic_add 1
34
+ #define __opencl_c_ext_fp16_global_atomic_min_max 1
35
+ #define __opencl_c_ext_fp16_local_atomic_min_max 1
36
+ #endif
37
+ #ifdef cl_khr_fp64
38
+ #define __opencl_c_ext_fp64_global_atomic_add 1
39
+ #define __opencl_c_ext_fp64_local_atomic_add 1
40
+ #define __opencl_c_ext_fp64_global_atomic_min_max 1
41
+ #define __opencl_c_ext_fp64_local_atomic_min_max 1
42
+ #endif
43
+ #define __opencl_c_ext_fp32_global_atomic_add 1
44
+ #define __opencl_c_ext_fp32_local_atomic_add 1
45
+ #define __opencl_c_ext_fp32_global_atomic_min_max 1
46
+ #define __opencl_c_ext_fp32_local_atomic_min_max 1
28
47
 
29
- #endif // defined(__SPIR__)
48
+ #endif // defined(__SPIR__) || defined(__SPIRV__)
30
49
  #endif // (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200)
31
50
 
32
51
  // Define feature macros for OpenCL C 2.0
33
- #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ == 200)
52
+ #if (__OPENCL_CPP_VERSION__ == 100 || __OPENCL_C_VERSION__ == 200)
34
53
  #define __opencl_c_pipes 1
35
54
  #define __opencl_c_generic_address_space 1
36
55
  #define __opencl_c_work_group_collective_functions 1
@@ -45,12 +64,21 @@
45
64
  #endif
46
65
 
47
66
  // Define header-only feature macros for OpenCL C 3.0.
48
- #if (__OPENCL_C_VERSION__ == 300)
49
- // For the SPIR target all features are supported.
50
- #if defined(__SPIR__)
67
+ #if (__OPENCL_CPP_VERSION__ == 202100 || __OPENCL_C_VERSION__ == 300)
68
+ // For the SPIR and SPIR-V target all features are supported.
69
+ #if defined(__SPIR__) || defined(__SPIRV__)
70
+ #define __opencl_c_atomic_order_seq_cst 1
71
+ #define __opencl_c_atomic_scope_device 1
51
72
  #define __opencl_c_atomic_scope_all_devices 1
73
+ #define __opencl_c_read_write_images 1
52
74
  #endif // defined(__SPIR__)
53
- #endif // (__OPENCL_C_VERSION__ == 300)
75
+ #endif // (__OPENCL_CPP_VERSION__ == 202100 || __OPENCL_C_VERSION__ == 300)
76
+
77
+ #if !defined(__opencl_c_generic_address_space)
78
+ // Internal feature macro to provide named (global, local, private) address
79
+ // space overloads for builtin functions that take a pointer argument.
80
+ #define __opencl_c_named_address_space_builtins 1
81
+ #endif // !defined(__opencl_c_generic_address_space)
54
82
 
55
83
  // built-in scalar data types:
56
84
 
@@ -329,11 +357,17 @@ typedef enum memory_scope {
329
357
  memory_scope_device = __OPENCL_MEMORY_SCOPE_DEVICE,
330
358
  #if defined(__opencl_c_atomic_scope_all_devices)
331
359
  memory_scope_all_svm_devices = __OPENCL_MEMORY_SCOPE_ALL_SVM_DEVICES,
332
- #if (__OPENCL_C_VERSION__ >= CL_VERSION_3_0)
360
+ #if (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
333
361
  memory_scope_all_devices = memory_scope_all_svm_devices,
334
- #endif // __OPENCL_C_VERSION__ >= CL_VERSION_3_0
362
+ #endif // (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
335
363
  #endif // defined(__opencl_c_atomic_scope_all_devices)
336
- #if defined(cl_intel_subgroups) || defined(cl_khr_subgroups)
364
+ /**
365
+ * Subgroups have different requirements on forward progress, so just test
366
+ * all the relevant macros.
367
+ * CL 3.0 sub-groups "they are not guaranteed to make independent forward progress"
368
+ * KHR subgroups "Subgroups within a workgroup are independent, make forward progress with respect to each other"
369
+ */
370
+ #if defined(cl_intel_subgroups) || defined(cl_khr_subgroups) || defined(__opencl_c_subgroups)
337
371
  memory_scope_sub_group = __OPENCL_MEMORY_SCOPE_SUB_GROUP
338
372
  #endif
339
373
  } memory_scope;
@@ -473,12 +507,14 @@ typedef int clk_profiling_info;
473
507
 
474
508
  #define MAX_WORK_DIM 3
475
509
 
510
+ #ifdef __opencl_c_device_enqueue
476
511
  typedef struct {
477
512
  unsigned int workDimension;
478
513
  size_t globalWorkOffset[MAX_WORK_DIM];
479
514
  size_t globalWorkSize[MAX_WORK_DIM];
480
515
  size_t localWorkSize[MAX_WORK_DIM];
481
516
  } ndrange_t;
517
+ #endif // __opencl_c_device_enqueue
482
518
 
483
519
  #endif // defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
484
520
 
@@ -572,6 +608,28 @@ typedef struct {
572
608
  #define as_intptr_t(x) __builtin_astype((x), intptr_t)
573
609
  #define as_uintptr_t(x) __builtin_astype((x), uintptr_t)
574
610
 
611
+ // C++ for OpenCL - __remove_address_space
612
+ #if defined(__OPENCL_CPP_VERSION__)
613
+ template <typename _Tp> struct __remove_address_space { using type = _Tp; };
614
+ #if defined(__opencl_c_generic_address_space)
615
+ template <typename _Tp> struct __remove_address_space<__generic _Tp> {
616
+ using type = _Tp;
617
+ };
618
+ #endif
619
+ template <typename _Tp> struct __remove_address_space<__global _Tp> {
620
+ using type = _Tp;
621
+ };
622
+ template <typename _Tp> struct __remove_address_space<__private _Tp> {
623
+ using type = _Tp;
624
+ };
625
+ template <typename _Tp> struct __remove_address_space<__local _Tp> {
626
+ using type = _Tp;
627
+ };
628
+ template <typename _Tp> struct __remove_address_space<__constant _Tp> {
629
+ using type = _Tp;
630
+ };
631
+ #endif
632
+
575
633
  // OpenCL v1.1 s6.9, v1.2/2.0 s6.10 - Function qualifiers
576
634
 
577
635
  #define __kernel_exec(X, typen) __kernel \