@cpp-linter/clang-tidy-darwin-arm64 16.0.3 → 18.1.5

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 (250) hide show
  1. package/README.md +2 -2
  2. package/bin/clang-tidy +2 -2
  3. package/lib/clang/{16 → 18}/include/__clang_cuda_device_functions.h +2 -2
  4. package/lib/clang/{16 → 18}/include/__clang_cuda_intrinsics.h +191 -0
  5. package/lib/clang/{16 → 18}/include/__clang_cuda_libdevice_declares.h +2 -2
  6. package/lib/clang/{16 → 18}/include/__clang_cuda_math.h +3 -3
  7. package/lib/clang/{16 → 18}/include/__clang_cuda_runtime_wrapper.h +2 -2
  8. package/lib/clang/{16 → 18}/include/__clang_hip_cmath.h +1 -1
  9. package/lib/clang/{16 → 18}/include/__clang_hip_libdevice_declares.h +32 -30
  10. package/lib/clang/{16 → 18}/include/__clang_hip_math.h +244 -238
  11. package/lib/clang/{16 → 18}/include/__clang_hip_runtime_wrapper.h +44 -23
  12. package/lib/clang/18/include/__stdarg___gnuc_va_list.h +13 -0
  13. package/lib/clang/18/include/__stdarg___va_copy.h +12 -0
  14. package/lib/clang/18/include/__stdarg_va_arg.h +22 -0
  15. package/lib/clang/18/include/__stdarg_va_copy.h +12 -0
  16. package/lib/clang/18/include/__stdarg_va_list.h +13 -0
  17. package/lib/clang/{16 → 18}/include/__stddef_max_align_t.h +1 -1
  18. package/lib/clang/18/include/__stddef_null.h +29 -0
  19. package/lib/clang/18/include/__stddef_nullptr_t.h +29 -0
  20. package/lib/clang/18/include/__stddef_offsetof.h +17 -0
  21. package/lib/clang/18/include/__stddef_ptrdiff_t.h +20 -0
  22. package/lib/clang/18/include/__stddef_rsize_t.h +20 -0
  23. package/lib/clang/18/include/__stddef_size_t.h +20 -0
  24. package/lib/clang/18/include/__stddef_unreachable.h +21 -0
  25. package/lib/clang/18/include/__stddef_wchar_t.h +28 -0
  26. package/lib/clang/18/include/__stddef_wint_t.h +15 -0
  27. package/lib/clang/18/include/adcintrin.h +160 -0
  28. package/lib/clang/18/include/adxintrin.h +102 -0
  29. package/lib/clang/{16 → 18}/include/altivec.h +167 -136
  30. package/lib/clang/{16 → 18}/include/ammintrin.h +4 -4
  31. package/lib/clang/18/include/amxcomplexintrin.h +169 -0
  32. package/lib/clang/{16 → 18}/include/arm_acle.h +124 -40
  33. package/lib/clang/{16 → 18}/include/arm_neon.h +249 -328
  34. package/lib/clang/18/include/arm_sme.h +2412 -0
  35. package/lib/clang/{16 → 18}/include/arm_sve.h +7454 -364
  36. package/lib/clang/18/include/arm_vector_types.h +345 -0
  37. package/lib/clang/18/include/avx2intrin.h +5284 -0
  38. package/lib/clang/{16 → 18}/include/avx512bf16intrin.h +3 -2
  39. package/lib/clang/{16 → 18}/include/avx512bitalgintrin.h +4 -1
  40. package/lib/clang/{16 → 18}/include/avx512bwintrin.h +28 -38
  41. package/lib/clang/{16 → 18}/include/avx512cdintrin.h +3 -1
  42. package/lib/clang/{16 → 18}/include/avx512dqintrin.h +4 -2
  43. package/lib/clang/{16 → 18}/include/avx512fintrin.h +24 -10
  44. package/lib/clang/{16 → 18}/include/avx512fp16intrin.h +18 -12
  45. package/lib/clang/{16 → 18}/include/avx512ifmaintrin.h +3 -1
  46. package/lib/clang/{16 → 18}/include/avx512ifmavlintrin.h +8 -2
  47. package/lib/clang/{16 → 18}/include/avx512pfintrin.h +0 -5
  48. package/lib/clang/{16 → 18}/include/avx512vbmi2intrin.h +1 -1
  49. package/lib/clang/{16 → 18}/include/avx512vbmiintrin.h +3 -2
  50. package/lib/clang/{16 → 18}/include/avx512vbmivlintrin.h +8 -3
  51. package/lib/clang/{16 → 18}/include/avx512vlbf16intrin.h +8 -6
  52. package/lib/clang/{16 → 18}/include/avx512vlbitalgintrin.h +8 -2
  53. package/lib/clang/{16 → 18}/include/avx512vlbwintrin.h +8 -2
  54. package/lib/clang/{16 → 18}/include/avx512vlcdintrin.h +8 -3
  55. package/lib/clang/{16 → 18}/include/avx512vldqintrin.h +8 -2
  56. package/lib/clang/{16 → 18}/include/avx512vlfp16intrin.h +2 -2
  57. package/lib/clang/{16 → 18}/include/avx512vlintrin.h +8 -2
  58. package/lib/clang/{16 → 18}/include/avx512vlvbmi2intrin.h +8 -2
  59. package/lib/clang/{16 → 18}/include/avx512vlvnniintrin.h +8 -2
  60. package/lib/clang/{16 → 18}/include/avx512vlvp2intersectintrin.h +6 -4
  61. package/lib/clang/{16 → 18}/include/avx512vnniintrin.h +3 -2
  62. package/lib/clang/{16 → 18}/include/avx512vp2intersectintrin.h +3 -2
  63. package/lib/clang/{16 → 18}/include/avx512vpopcntdqintrin.h +3 -1
  64. package/lib/clang/{16 → 18}/include/avx512vpopcntdqvlintrin.h +6 -2
  65. package/lib/clang/{16 → 18}/include/avxintrin.h +29 -12
  66. package/lib/clang/18/include/avxvnniint16intrin.h +473 -0
  67. package/lib/clang/18/include/bmi2intrin.h +255 -0
  68. package/lib/clang/{16 → 18}/include/bmiintrin.h +231 -46
  69. package/lib/clang/{16 → 18}/include/clflushoptintrin.h +9 -0
  70. package/lib/clang/{16 → 18}/include/clzerointrin.h +7 -5
  71. package/lib/clang/18/include/cuda_wrappers/bits/basic_string.h +9 -0
  72. package/lib/clang/18/include/cuda_wrappers/bits/basic_string.tcc +9 -0
  73. package/lib/clang/18/include/cuda_wrappers/bits/shared_ptr_base.h +9 -0
  74. package/lib/clang/{16 → 18}/include/emmintrin.h +10 -10
  75. package/lib/clang/18/include/fmaintrin.h +780 -0
  76. package/lib/clang/{16 → 18}/include/gfniintrin.h +23 -6
  77. package/lib/clang/18/include/hlsl/hlsl_intrinsics.h +624 -0
  78. package/lib/clang/18/include/ia32intrin.h +863 -0
  79. package/lib/clang/{16 → 18}/include/immintrin.h +182 -11
  80. package/lib/clang/{16 → 18}/include/intrin.h +16 -0
  81. package/lib/clang/{16 → 18}/include/larchintrin.h +13 -1
  82. package/lib/clang/18/include/lasxintrin.h +3884 -0
  83. package/lib/clang/{16 → 18}/include/limits.h +7 -5
  84. package/lib/clang/18/include/llvm_libc_wrappers/assert.h +34 -0
  85. package/lib/clang/18/include/llvm_libc_wrappers/ctype.h +102 -0
  86. package/lib/clang/18/include/llvm_libc_wrappers/inttypes.h +34 -0
  87. package/lib/clang/18/include/llvm_libc_wrappers/stdio.h +80 -0
  88. package/lib/clang/18/include/llvm_libc_wrappers/stdlib.h +45 -0
  89. package/lib/clang/18/include/llvm_libc_wrappers/string.h +96 -0
  90. package/lib/clang/18/include/llvm_libc_wrappers/time.h +34 -0
  91. package/lib/clang/18/include/lsxintrin.h +3750 -0
  92. package/lib/clang/{16 → 18}/include/mmintrin.h +7 -5
  93. package/lib/clang/{16 → 18}/include/module.modulemap +155 -2
  94. package/lib/clang/18/include/mwaitxintrin.h +62 -0
  95. package/lib/clang/{16 → 18}/include/opencl-c-base.h +8 -0
  96. package/lib/clang/{16 → 18}/include/openmp_wrappers/__clang_openmp_device_functions.h +0 -1
  97. package/lib/clang/{16 → 18}/include/openmp_wrappers/cmath +1 -1
  98. package/lib/clang/{16 → 18}/include/openmp_wrappers/new +1 -1
  99. package/lib/clang/{16 → 18}/include/pmmintrin.h +15 -8
  100. package/lib/clang/{16 → 18}/include/ppc_wrappers/emmintrin.h +2 -1
  101. package/lib/clang/18/include/ppc_wrappers/nmmintrin.h +26 -0
  102. package/lib/clang/{16 → 18}/include/ppc_wrappers/smmintrin.h +37 -17
  103. package/lib/clang/18/include/rdseedintrin.h +105 -0
  104. package/lib/clang/18/include/riscv_bitmanip.h +195 -0
  105. package/lib/clang/18/include/riscv_crypto.h +170 -0
  106. package/lib/clang/18/include/riscv_ntlh.h +26 -0
  107. package/lib/clang/18/include/riscv_vector.h +431 -0
  108. package/lib/clang/18/include/sha512intrin.h +200 -0
  109. package/lib/clang/18/include/shaintrin.h +189 -0
  110. package/lib/clang/18/include/sifive_vector.h +16 -0
  111. package/lib/clang/18/include/sm3intrin.h +238 -0
  112. package/lib/clang/18/include/sm4intrin.h +269 -0
  113. package/lib/clang/{16 → 18}/include/smmintrin.h +3 -3
  114. package/lib/clang/{16 → 18}/include/stdalign.h +3 -0
  115. package/lib/clang/18/include/stdarg.h +79 -0
  116. package/lib/clang/{16 → 18}/include/stdatomic.h +7 -2
  117. package/lib/clang/18/include/stdckdint.h +42 -0
  118. package/lib/clang/18/include/stddef.h +123 -0
  119. package/lib/clang/{16 → 18}/include/stdint.h +19 -48
  120. package/lib/clang/{16 → 18}/include/stdnoreturn.h +2 -2
  121. package/lib/clang/{16 → 18}/include/tmmintrin.h +7 -2
  122. package/lib/clang/18/include/usermsrintrin.h +51 -0
  123. package/lib/clang/{16 → 18}/include/vaesintrin.h +4 -2
  124. package/lib/clang/{16 → 18}/include/vecintrin.h +217 -199
  125. package/lib/clang/{16 → 18}/include/wasm_simd128.h +132 -12
  126. package/lib/clang/{16 → 18}/include/x86gprintrin.h +5 -0
  127. package/lib/clang/{16 → 18}/include/xmmintrin.h +9 -5
  128. package/lib/clang/18/include/xsavecintrin.h +84 -0
  129. package/package.json +6 -6
  130. package/lib/clang/16/include/adxintrin.h +0 -72
  131. package/lib/clang/16/include/avx2intrin.h +0 -1148
  132. package/lib/clang/16/include/bmi2intrin.h +0 -81
  133. package/lib/clang/16/include/fmaintrin.h +0 -216
  134. package/lib/clang/16/include/hlsl/hlsl_intrinsics.h +0 -223
  135. package/lib/clang/16/include/ia32intrin.h +0 -441
  136. package/lib/clang/16/include/mwaitxintrin.h +0 -33
  137. package/lib/clang/16/include/rdseedintrin.h +0 -42
  138. package/lib/clang/16/include/riscv_vector.h +0 -211
  139. package/lib/clang/16/include/shaintrin.h +0 -61
  140. package/lib/clang/16/include/stdarg.h +0 -51
  141. package/lib/clang/16/include/stddef.h +0 -128
  142. package/lib/clang/16/include/xsavecintrin.h +0 -34
  143. /package/lib/clang/{16 → 18}/include/__clang_cuda_builtin_vars.h +0 -0
  144. /package/lib/clang/{16 → 18}/include/__clang_cuda_cmath.h +0 -0
  145. /package/lib/clang/{16 → 18}/include/__clang_cuda_complex_builtins.h +0 -0
  146. /package/lib/clang/{16 → 18}/include/__clang_cuda_math_forward_declares.h +0 -0
  147. /package/lib/clang/{16 → 18}/include/__clang_cuda_texture_intrinsics.h +0 -0
  148. /package/lib/clang/{16 → 18}/include/__clang_hip_stdlib.h +0 -0
  149. /package/lib/clang/{16 → 18}/include/__wmmintrin_aes.h +0 -0
  150. /package/lib/clang/{16 → 18}/include/__wmmintrin_pclmul.h +0 -0
  151. /package/lib/clang/{16 → 18}/include/amxfp16intrin.h +0 -0
  152. /package/lib/clang/{16 → 18}/include/amxintrin.h +0 -0
  153. /package/lib/clang/{16 → 18}/include/arm64intr.h +0 -0
  154. /package/lib/clang/{16 → 18}/include/arm_bf16.h +0 -0
  155. /package/lib/clang/{16 → 18}/include/arm_cde.h +0 -0
  156. /package/lib/clang/{16 → 18}/include/arm_cmse.h +0 -0
  157. /package/lib/clang/{16 → 18}/include/arm_fp16.h +0 -0
  158. /package/lib/clang/{16 → 18}/include/arm_mve.h +0 -0
  159. /package/lib/clang/{16 → 18}/include/arm_neon_sve_bridge.h +0 -0
  160. /package/lib/clang/{16 → 18}/include/armintr.h +0 -0
  161. /package/lib/clang/{16 → 18}/include/avx512erintrin.h +0 -0
  162. /package/lib/clang/{16 → 18}/include/avxifmaintrin.h +0 -0
  163. /package/lib/clang/{16 → 18}/include/avxneconvertintrin.h +0 -0
  164. /package/lib/clang/{16 → 18}/include/avxvnniint8intrin.h +0 -0
  165. /package/lib/clang/{16 → 18}/include/avxvnniintrin.h +0 -0
  166. /package/lib/clang/{16 → 18}/include/builtins.h +0 -0
  167. /package/lib/clang/{16 → 18}/include/cet.h +0 -0
  168. /package/lib/clang/{16 → 18}/include/cetintrin.h +0 -0
  169. /package/lib/clang/{16 → 18}/include/cldemoteintrin.h +0 -0
  170. /package/lib/clang/{16 → 18}/include/clwbintrin.h +0 -0
  171. /package/lib/clang/{16 → 18}/include/cmpccxaddintrin.h +0 -0
  172. /package/lib/clang/{16 → 18}/include/cpuid.h +0 -0
  173. /package/lib/clang/{16 → 18}/include/crc32intrin.h +0 -0
  174. /package/lib/clang/{16 → 18}/include/cuda_wrappers/algorithm +0 -0
  175. /package/lib/clang/{16 → 18}/include/cuda_wrappers/cmath +0 -0
  176. /package/lib/clang/{16 → 18}/include/cuda_wrappers/complex +0 -0
  177. /package/lib/clang/{16 → 18}/include/cuda_wrappers/new +0 -0
  178. /package/lib/clang/{16 → 18}/include/enqcmdintrin.h +0 -0
  179. /package/lib/clang/{16 → 18}/include/f16cintrin.h +0 -0
  180. /package/lib/clang/{16 → 18}/include/float.h +0 -0
  181. /package/lib/clang/{16 → 18}/include/fma4intrin.h +0 -0
  182. /package/lib/clang/{16 → 18}/include/fxsrintrin.h +0 -0
  183. /package/lib/clang/{16 → 18}/include/hexagon_circ_brev_intrinsics.h +0 -0
  184. /package/lib/clang/{16 → 18}/include/hexagon_protos.h +0 -0
  185. /package/lib/clang/{16 → 18}/include/hexagon_types.h +0 -0
  186. /package/lib/clang/{16 → 18}/include/hlsl/hlsl_basic_types.h +0 -0
  187. /package/lib/clang/{16 → 18}/include/hlsl.h +0 -0
  188. /package/lib/clang/{16 → 18}/include/hresetintrin.h +0 -0
  189. /package/lib/clang/{16 → 18}/include/htmintrin.h +0 -0
  190. /package/lib/clang/{16 → 18}/include/htmxlintrin.h +0 -0
  191. /package/lib/clang/{16 → 18}/include/hvx_hexagon_protos.h +0 -0
  192. /package/lib/clang/{16 → 18}/include/inttypes.h +0 -0
  193. /package/lib/clang/{16 → 18}/include/invpcidintrin.h +0 -0
  194. /package/lib/clang/{16 → 18}/include/iso646.h +0 -0
  195. /package/lib/clang/{16 → 18}/include/keylockerintrin.h +0 -0
  196. /package/lib/clang/{16 → 18}/include/lwpintrin.h +0 -0
  197. /package/lib/clang/{16 → 18}/include/lzcntintrin.h +0 -0
  198. /package/lib/clang/{16 → 18}/include/mm3dnow.h +0 -0
  199. /package/lib/clang/{16 → 18}/include/mm_malloc.h +0 -0
  200. /package/lib/clang/{16 → 18}/include/movdirintrin.h +0 -0
  201. /package/lib/clang/{16 → 18}/include/msa.h +0 -0
  202. /package/lib/clang/{16 → 18}/include/nmmintrin.h +0 -0
  203. /package/lib/clang/{16 → 18}/include/opencl-c.h +0 -0
  204. /package/lib/clang/{16 → 18}/include/openmp_wrappers/complex +0 -0
  205. /package/lib/clang/{16 → 18}/include/openmp_wrappers/complex.h +0 -0
  206. /package/lib/clang/{16 → 18}/include/openmp_wrappers/complex_cmath.h +0 -0
  207. /package/lib/clang/{16 → 18}/include/openmp_wrappers/math.h +0 -0
  208. /package/lib/clang/{16 → 18}/include/pconfigintrin.h +0 -0
  209. /package/lib/clang/{16 → 18}/include/pkuintrin.h +0 -0
  210. /package/lib/clang/{16 → 18}/include/popcntintrin.h +0 -0
  211. /package/lib/clang/{16 → 18}/include/ppc_wrappers/bmi2intrin.h +0 -0
  212. /package/lib/clang/{16 → 18}/include/ppc_wrappers/bmiintrin.h +0 -0
  213. /package/lib/clang/{16 → 18}/include/ppc_wrappers/immintrin.h +0 -0
  214. /package/lib/clang/{16 → 18}/include/ppc_wrappers/mm_malloc.h +0 -0
  215. /package/lib/clang/{16 → 18}/include/ppc_wrappers/mmintrin.h +0 -0
  216. /package/lib/clang/{16 → 18}/include/ppc_wrappers/pmmintrin.h +0 -0
  217. /package/lib/clang/{16 → 18}/include/ppc_wrappers/tmmintrin.h +0 -0
  218. /package/lib/clang/{16 → 18}/include/ppc_wrappers/x86gprintrin.h +0 -0
  219. /package/lib/clang/{16 → 18}/include/ppc_wrappers/x86intrin.h +0 -0
  220. /package/lib/clang/{16 → 18}/include/ppc_wrappers/xmmintrin.h +0 -0
  221. /package/lib/clang/{16 → 18}/include/prfchiintrin.h +0 -0
  222. /package/lib/clang/{16 → 18}/include/prfchwintrin.h +0 -0
  223. /package/lib/clang/{16 → 18}/include/ptwriteintrin.h +0 -0
  224. /package/lib/clang/{16 → 18}/include/raointintrin.h +0 -0
  225. /package/lib/clang/{16 → 18}/include/rdpruintrin.h +0 -0
  226. /package/lib/clang/{16 → 18}/include/rtmintrin.h +0 -0
  227. /package/lib/clang/{16 → 18}/include/s390intrin.h +0 -0
  228. /package/lib/clang/{16 → 18}/include/serializeintrin.h +0 -0
  229. /package/lib/clang/{16 → 18}/include/sgxintrin.h +0 -0
  230. /package/lib/clang/{16 → 18}/include/stdbool.h +0 -0
  231. /package/lib/clang/{16 → 18}/include/tbmintrin.h +0 -0
  232. /package/lib/clang/{16 → 18}/include/tgmath.h +0 -0
  233. /package/lib/clang/{16 → 18}/include/tsxldtrkintrin.h +0 -0
  234. /package/lib/clang/{16 → 18}/include/uintrintrin.h +0 -0
  235. /package/lib/clang/{16 → 18}/include/unwind.h +0 -0
  236. /package/lib/clang/{16 → 18}/include/vadefs.h +0 -0
  237. /package/lib/clang/{16 → 18}/include/varargs.h +0 -0
  238. /package/lib/clang/{16 → 18}/include/velintrin.h +0 -0
  239. /package/lib/clang/{16 → 18}/include/velintrin_approx.h +0 -0
  240. /package/lib/clang/{16 → 18}/include/velintrin_gen.h +0 -0
  241. /package/lib/clang/{16 → 18}/include/vpclmulqdqintrin.h +0 -0
  242. /package/lib/clang/{16 → 18}/include/waitpkgintrin.h +0 -0
  243. /package/lib/clang/{16 → 18}/include/wbnoinvdintrin.h +0 -0
  244. /package/lib/clang/{16 → 18}/include/wmmintrin.h +0 -0
  245. /package/lib/clang/{16 → 18}/include/x86intrin.h +0 -0
  246. /package/lib/clang/{16 → 18}/include/xopintrin.h +0 -0
  247. /package/lib/clang/{16 → 18}/include/xsaveintrin.h +0 -0
  248. /package/lib/clang/{16 → 18}/include/xsaveoptintrin.h +0 -0
  249. /package/lib/clang/{16 → 18}/include/xsavesintrin.h +0 -0
  250. /package/lib/clang/{16 → 18}/include/xtestintrin.h +0 -0
@@ -22,7 +22,9 @@ typedef short __v4hi __attribute__((__vector_size__(8)));
22
22
  typedef char __v8qi __attribute__((__vector_size__(8)));
23
23
 
24
24
  /* Define the default attributes for the functions in this file. */
25
- #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64)))
25
+ #define __DEFAULT_FN_ATTRS \
26
+ __attribute__((__always_inline__, __nodebug__, __target__("mmx,no-evex512"), \
27
+ __min_vector_width__(64)))
26
28
 
27
29
  /// Clears the MMX state by setting the state of the x87 stack registers
28
30
  /// to empty.
@@ -31,10 +33,10 @@ typedef char __v8qi __attribute__((__vector_size__(8)));
31
33
  ///
32
34
  /// This intrinsic corresponds to the <c> EMMS </c> instruction.
33
35
  ///
34
- static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("mmx")))
35
- _mm_empty(void)
36
- {
37
- __builtin_ia32_emms();
36
+ static __inline__ void __attribute__((__always_inline__, __nodebug__,
37
+ __target__("mmx,no-evex512")))
38
+ _mm_empty(void) {
39
+ __builtin_ia32_emms();
38
40
  }
39
41
 
40
42
  /// Constructs a 64-bit integer vector, setting the lower 32 bits to the
@@ -153,9 +153,162 @@ module _Builtin_intrinsics [system] [extern_c] {
153
153
  }
154
154
  }
155
155
 
156
- module _Builtin_stddef_max_align_t [system] [extern_c] {
157
- header "__stddef_max_align_t.h"
156
+ // Start -fbuiltin-headers-in-system-modules affected modules
157
+
158
+ // The following modules all ignore their headers when
159
+ // -fbuiltin-headers-in-system-modules is passed, and many of
160
+ // those headers join system modules when present.
161
+
162
+ // e.g. if -fbuiltin-headers-in-system-modules is passed, then
163
+ // float.h will not be in the _Builtin_float module (that module
164
+ // will be empty). If there is a system module that declares
165
+ // `header "float.h"`, then the builtin float.h will join
166
+ // that module. The system float.h (if present) will be treated
167
+ // as a textual header in the sytem module.
168
+ module _Builtin_float [system] {
169
+ header "float.h"
170
+ export *
171
+ }
172
+
173
+ module _Builtin_inttypes [system] {
174
+ header "inttypes.h"
175
+ export *
176
+ }
177
+
178
+ module _Builtin_iso646 [system] {
179
+ header "iso646.h"
180
+ export *
181
+ }
182
+
183
+ module _Builtin_limits [system] {
184
+ header "limits.h"
185
+ export *
186
+ }
187
+
188
+ module _Builtin_stdalign [system] {
189
+ header "stdalign.h"
190
+ export *
191
+ }
192
+
193
+ module _Builtin_stdarg [system] {
194
+ textual header "stdarg.h"
195
+
196
+ explicit module __gnuc_va_list {
197
+ header "__stdarg___gnuc_va_list.h"
198
+ export *
199
+ }
200
+
201
+ explicit module __va_copy {
202
+ header "__stdarg___va_copy.h"
203
+ export *
204
+ }
205
+
206
+ explicit module va_arg {
207
+ header "__stdarg_va_arg.h"
208
+ export *
209
+ }
210
+
211
+ explicit module va_copy {
212
+ header "__stdarg_va_copy.h"
213
+ export *
214
+ }
215
+
216
+ explicit module va_list {
217
+ header "__stdarg_va_list.h"
218
+ export *
219
+ }
220
+ }
221
+
222
+ module _Builtin_stdatomic [system] {
223
+ header "stdatomic.h"
224
+ export *
225
+ }
226
+
227
+ module _Builtin_stdbool [system] {
228
+ header "stdbool.h"
229
+ export *
230
+ }
231
+
232
+ module _Builtin_stddef [system] {
233
+ textual header "stddef.h"
234
+
235
+ // __stddef_max_align_t.h is always in this module, even if
236
+ // -fbuiltin-headers-in-system-modules is passed.
237
+ explicit module max_align_t {
238
+ header "__stddef_max_align_t.h"
239
+ export *
240
+ }
241
+
242
+ explicit module null {
243
+ header "__stddef_null.h"
244
+ export *
245
+ }
246
+
247
+ explicit module nullptr_t {
248
+ header "__stddef_nullptr_t.h"
249
+ export *
250
+ }
251
+
252
+ explicit module offsetof {
253
+ header "__stddef_offsetof.h"
254
+ export *
255
+ }
256
+
257
+ explicit module ptrdiff_t {
258
+ header "__stddef_ptrdiff_t.h"
259
+ export *
260
+ }
261
+
262
+ explicit module rsize_t {
263
+ header "__stddef_rsize_t.h"
264
+ export *
265
+ }
266
+
267
+ explicit module size_t {
268
+ header "__stddef_size_t.h"
269
+ export *
270
+ }
271
+
272
+ explicit module unreachable {
273
+ header "__stddef_unreachable.h"
274
+ export *
275
+ }
276
+
277
+ explicit module wchar_t {
278
+ header "__stddef_wchar_t.h"
279
+ export *
280
+ }
281
+ }
282
+
283
+ // wint_t is provided by <wchar.h> and not <stddef.h>. It's here
284
+ // for compatibility, but must be explicitly requested. Therefore
285
+ // __stddef_wint_t.h is not part of _Builtin_stddef. It is always in
286
+ // this module even if -fbuiltin-headers-in-system-modules is passed.
287
+ module _Builtin_stddef_wint_t [system] {
288
+ header "__stddef_wint_t.h"
289
+ export *
290
+ }
291
+
292
+ module _Builtin_stdint [system] {
293
+ header "stdint.h"
294
+ export *
295
+ }
296
+
297
+ module _Builtin_stdnoreturn [system] {
298
+ header "stdnoreturn.h"
299
+ export *
300
+ }
301
+
302
+ module _Builtin_tgmath [system] {
303
+ header "tgmath.h"
304
+ export *
305
+ }
306
+
307
+ module _Builtin_unwind [system] {
308
+ header "unwind.h"
309
+ export *
158
310
  }
311
+ // End -fbuiltin-headers-in-system-modules affected modules
159
312
 
160
313
  module opencl_c {
161
314
  requires opencl
@@ -0,0 +1,62 @@
1
+ /*===---- mwaitxintrin.h - MONITORX/MWAITX 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
+ #ifndef __X86INTRIN_H
11
+ #error "Never use <mwaitxintrin.h> directly; include <x86intrin.h> instead."
12
+ #endif
13
+
14
+ #ifndef __MWAITXINTRIN_H
15
+ #define __MWAITXINTRIN_H
16
+
17
+ /* Define the default attributes for the functions in this file. */
18
+ #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("mwaitx")))
19
+
20
+ /// Establishes a linear address memory range to be monitored and puts
21
+ /// the processor in the monitor event pending state. Data stored in the
22
+ /// monitored address range causes the processor to exit the pending state.
23
+ ///
24
+ /// \headerfile <x86intrin.h>
25
+ ///
26
+ /// This intrinsic corresponds to the \c MONITORX instruction.
27
+ ///
28
+ /// \param __p
29
+ /// The memory range to be monitored. The size of the range is determined by
30
+ /// CPUID function 0000_0005h.
31
+ /// \param __extensions
32
+ /// Optional extensions for the monitoring state.
33
+ /// \param __hints
34
+ /// Optional hints for the monitoring state.
35
+ static __inline__ void __DEFAULT_FN_ATTRS
36
+ _mm_monitorx(void * __p, unsigned __extensions, unsigned __hints)
37
+ {
38
+ __builtin_ia32_monitorx(__p, __extensions, __hints);
39
+ }
40
+
41
+ /// Used with the \c MONITORX instruction to wait while the processor is in
42
+ /// the monitor event pending state. Data stored in the monitored address
43
+ /// range, or an interrupt, causes the processor to exit the pending state.
44
+ ///
45
+ /// \headerfile <x86intrin.h>
46
+ ///
47
+ /// This intrinsic corresponds to the \c MWAITX instruction.
48
+ ///
49
+ /// \param __extensions
50
+ /// Optional extensions for the monitoring state, which can vary by
51
+ /// processor.
52
+ /// \param __hints
53
+ /// Optional hints for the monitoring state, which can vary by processor.
54
+ static __inline__ void __DEFAULT_FN_ATTRS
55
+ _mm_mwaitx(unsigned __extensions, unsigned __hints, unsigned __clock)
56
+ {
57
+ __builtin_ia32_mwaitx(__extensions, __hints, __clock);
58
+ }
59
+
60
+ #undef __DEFAULT_FN_ATTRS
61
+
62
+ #endif /* __MWAITXINTRIN_H */
@@ -45,6 +45,7 @@
45
45
  #define __opencl_c_ext_fp32_local_atomic_add 1
46
46
  #define __opencl_c_ext_fp32_global_atomic_min_max 1
47
47
  #define __opencl_c_ext_fp32_local_atomic_min_max 1
48
+ #define __opencl_c_ext_image_raw10_raw12 1
48
49
 
49
50
  #endif // defined(__SPIR__) || defined(__SPIRV__)
50
51
  #endif // (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200)
@@ -474,6 +475,13 @@ typedef enum memory_order
474
475
  #define CLK_HALF_FLOAT 0x10DD
475
476
  #define CLK_FLOAT 0x10DE
476
477
  #define CLK_UNORM_INT24 0x10DF
478
+ #if __OPENCL_C_VERSION__ >= CL_VERSION_3_0
479
+ #define CLK_UNORM_INT_101010_2 0x10E0
480
+ #endif // __OPENCL_C_VERSION__ >= CL_VERSION_3_0
481
+ #ifdef __opencl_c_ext_image_raw10_raw12
482
+ #define CLK_UNSIGNED_INT_RAW10_EXT 0x10E3
483
+ #define CLK_UNSIGNED_INT_RAW12_EXT 0x10E4
484
+ #endif // __opencl_c_ext_image_raw10_raw12
477
485
 
478
486
  // Channel order, numbering must be aligned with cl_channel_order in cl.h
479
487
  //
@@ -40,7 +40,6 @@ extern "C" {
40
40
 
41
41
  // Import types which will be used by __clang_hip_libdevice_declares.h
42
42
  #ifndef __cplusplus
43
- #include <stdbool.h>
44
43
  #include <stdint.h>
45
44
  #endif
46
45
 
@@ -1,4 +1,4 @@
1
- /*===-- __clang_openmp_device_functions.h - OpenMP math declares ------ c++ -===
1
+ /*===-- __clang_openmp_device_functions.h - OpenMP math declares -*- c++ -*-===
2
2
  *
3
3
  * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
4
  * See https://llvm.org/LICENSE.txt for license information.
@@ -13,7 +13,7 @@
13
13
  // which do not use nothrow_t are provided without the <new> header.
14
14
  #include_next <new>
15
15
 
16
- #if defined(__NVPTX__) && defined(_OPENMP)
16
+ #if (defined(__NVPTX__) || defined(__AMDGPU__)) && defined(_OPENMP)
17
17
 
18
18
  #include <cstdlib>
19
19
 
@@ -17,8 +17,9 @@
17
17
  #include <emmintrin.h>
18
18
 
19
19
  /* Define the default attributes for the functions in this file. */
20
- #define __DEFAULT_FN_ATTRS \
21
- __attribute__((__always_inline__, __nodebug__, __target__("sse3"), __min_vector_width__(128)))
20
+ #define __DEFAULT_FN_ATTRS \
21
+ __attribute__((__always_inline__, __nodebug__, \
22
+ __target__("sse3,no-evex512"), __min_vector_width__(128)))
22
23
 
23
24
  /// Loads data from an unaligned memory location to elements in a 128-bit
24
25
  /// vector.
@@ -253,9 +254,12 @@ _mm_movedup_pd(__m128d __a)
253
254
  /// the processor in the monitor event pending state. Data stored in the
254
255
  /// monitored address range causes the processor to exit the pending state.
255
256
  ///
257
+ /// The \c MONITOR instruction can be used in kernel mode, and in other modes
258
+ /// if MSR <c> C001_0015h[MonMwaitUserEn] </c> is set.
259
+ ///
256
260
  /// \headerfile <x86intrin.h>
257
261
  ///
258
- /// This intrinsic corresponds to the <c> MONITOR </c> instruction.
262
+ /// This intrinsic corresponds to the \c MONITOR instruction.
259
263
  ///
260
264
  /// \param __p
261
265
  /// The memory range to be monitored. The size of the range is determined by
@@ -270,19 +274,22 @@ _mm_monitor(void const *__p, unsigned __extensions, unsigned __hints)
270
274
  __builtin_ia32_monitor(__p, __extensions, __hints);
271
275
  }
272
276
 
273
- /// Used with the MONITOR instruction to wait while the processor is in
277
+ /// Used with the \c MONITOR instruction to wait while the processor is in
274
278
  /// the monitor event pending state. Data stored in the monitored address
275
- /// range causes the processor to exit the pending state.
279
+ /// range, or an interrupt, causes the processor to exit the pending state.
280
+ ///
281
+ /// The \c MWAIT instruction can be used in kernel mode, and in other modes if
282
+ /// MSR <c> C001_0015h[MonMwaitUserEn] </c> is set.
276
283
  ///
277
284
  /// \headerfile <x86intrin.h>
278
285
  ///
279
- /// This intrinsic corresponds to the <c> MWAIT </c> instruction.
286
+ /// This intrinsic corresponds to the \c MWAIT instruction.
280
287
  ///
281
288
  /// \param __extensions
282
- /// Optional extensions for the monitoring state, which may vary by
289
+ /// Optional extensions for the monitoring state, which can vary by
283
290
  /// processor.
284
291
  /// \param __hints
285
- /// Optional hints for the monitoring state, which may vary by processor.
292
+ /// Optional hints for the monitoring state, which can vary by processor.
286
293
  static __inline__ void __DEFAULT_FN_ATTRS
287
294
  _mm_mwait(unsigned __extensions, unsigned __hints)
288
295
  {
@@ -46,6 +46,7 @@
46
46
 
47
47
  /* SSE2 */
48
48
  typedef __vector double __v2df;
49
+ typedef __vector float __v4f;
49
50
  typedef __vector long long __v2di;
50
51
  typedef __vector unsigned long long __v2du;
51
52
  typedef __vector int __v4si;
@@ -951,7 +952,7 @@ extern __inline __m128d
951
952
  _mm_cvtpi32_pd(__m64 __A) {
952
953
  __v4si __temp;
953
954
  __v2di __tmp2;
954
- __v2df __result;
955
+ __v4f __result;
955
956
 
956
957
  __temp = (__v4si)vec_splats(__A);
957
958
  __tmp2 = (__v2di)vec_unpackl(__temp);
@@ -0,0 +1,26 @@
1
+ /*===---- nmmintrin.h - Implementation of SSE4 intrinsics on PowerPC -------===
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 NO_WARN_X86_INTRINSICS
11
+ /* This header is distributed to simplify porting x86_64 code that
12
+ makes explicit use of Intel intrinsics to powerpc64le.
13
+ It is the user's responsibility to determine if the results are
14
+ acceptable and make additional changes as necessary.
15
+ Note that much code that uses Intel intrinsics can be rewritten in
16
+ standard C or GNU C extensions, which are more portable and better
17
+ optimized across multiple targets. */
18
+ #endif
19
+
20
+ #ifndef NMMINTRIN_H_
21
+ #define NMMINTRIN_H_
22
+
23
+ /* We just include SSE4.1 header file. */
24
+ #include <smmintrin.h>
25
+
26
+ #endif /* NMMINTRIN_H_ */
@@ -14,7 +14,7 @@
14
14
 
15
15
  #ifndef NO_WARN_X86_INTRINSICS
16
16
  /* This header is distributed to simplify porting x86_64 code that
17
- makes explicit use of Intel intrinsics to powerp64/powerpc64le.
17
+ makes explicit use of Intel intrinsics to powerpc64/powerpc64le.
18
18
 
19
19
  It is the user's responsibility to determine if the results are
20
20
  acceptable and make additional changes as necessary.
@@ -68,10 +68,10 @@ extern __inline __m128d
68
68
  __asm__("mffsce %0" : "=f"(__fpscr_save.__fr));
69
69
  __enables_save.__fpscr = __fpscr_save.__fpscr & 0xf8;
70
70
  #else
71
- __fpscr_save.__fr = __builtin_mffs();
71
+ __fpscr_save.__fr = __builtin_ppc_mffs();
72
72
  __enables_save.__fpscr = __fpscr_save.__fpscr & 0xf8;
73
73
  __fpscr_save.__fpscr &= ~0xf8;
74
- __builtin_mtfsf(0b00000011, __fpscr_save.__fr);
74
+ __builtin_ppc_mtfsf(0b00000011, __fpscr_save.__fr);
75
75
  #endif
76
76
  /* Insert an artificial "read/write" reference to the variable
77
77
  read below, to ensure the compiler does not schedule
@@ -83,10 +83,15 @@ extern __inline __m128d
83
83
 
84
84
  switch (__rounding) {
85
85
  case _MM_FROUND_TO_NEAREST_INT:
86
- __fpscr_save.__fr = __builtin_mffsl();
86
+ #ifdef _ARCH_PWR9
87
+ __fpscr_save.__fr = __builtin_ppc_mffsl();
88
+ #else
89
+ __fpscr_save.__fr = __builtin_ppc_mffs();
90
+ __fpscr_save.__fpscr &= 0x70007f0ffL;
91
+ #endif
87
92
  __attribute__((fallthrough));
88
93
  case _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC:
89
- __builtin_set_fpscr_rn(0b00);
94
+ __builtin_ppc_set_fpscr_rn(0b00);
90
95
  /* Insert an artificial "read/write" reference to the variable
91
96
  read below, to ensure the compiler does not schedule
92
97
  a read/use of the variable before the FPSCR is modified, above.
@@ -102,7 +107,7 @@ extern __inline __m128d
102
107
  This can be removed if and when GCC PR102783 is fixed.
103
108
  */
104
109
  __asm__("" : : "wa"(__r));
105
- __builtin_set_fpscr_rn(__fpscr_save.__fpscr);
110
+ __builtin_ppc_set_fpscr_rn(__fpscr_save.__fpscr);
106
111
  break;
107
112
  case _MM_FROUND_TO_NEG_INF:
108
113
  case _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC:
@@ -128,9 +133,14 @@ extern __inline __m128d
128
133
  */
129
134
  __asm__("" : : "wa"(__r));
130
135
  /* Restore enabled exceptions. */
131
- __fpscr_save.__fr = __builtin_mffsl();
136
+ #ifdef _ARCH_PWR9
137
+ __fpscr_save.__fr = __builtin_ppc_mffsl();
138
+ #else
139
+ __fpscr_save.__fr = __builtin_ppc_mffs();
140
+ __fpscr_save.__fpscr &= 0x70007f0ffL;
141
+ #endif
132
142
  __fpscr_save.__fpscr |= __enables_save.__fpscr;
133
- __builtin_mtfsf(0b00000011, __fpscr_save.__fr);
143
+ __builtin_ppc_mtfsf(0b00000011, __fpscr_save.__fr);
134
144
  }
135
145
  return (__m128d)__r;
136
146
  }
@@ -159,10 +169,10 @@ extern __inline __m128
159
169
  __asm__("mffsce %0" : "=f"(__fpscr_save.__fr));
160
170
  __enables_save.__fpscr = __fpscr_save.__fpscr & 0xf8;
161
171
  #else
162
- __fpscr_save.__fr = __builtin_mffs();
172
+ __fpscr_save.__fr = __builtin_ppc_mffs();
163
173
  __enables_save.__fpscr = __fpscr_save.__fpscr & 0xf8;
164
174
  __fpscr_save.__fpscr &= ~0xf8;
165
- __builtin_mtfsf(0b00000011, __fpscr_save.__fr);
175
+ __builtin_ppc_mtfsf(0b00000011, __fpscr_save.__fr);
166
176
  #endif
167
177
  /* Insert an artificial "read/write" reference to the variable
168
178
  read below, to ensure the compiler does not schedule
@@ -174,10 +184,15 @@ extern __inline __m128
174
184
 
175
185
  switch (__rounding) {
176
186
  case _MM_FROUND_TO_NEAREST_INT:
177
- __fpscr_save.__fr = __builtin_mffsl();
187
+ #ifdef _ARCH_PWR9
188
+ __fpscr_save.__fr = __builtin_ppc_mffsl();
189
+ #else
190
+ __fpscr_save.__fr = __builtin_ppc_mffs();
191
+ __fpscr_save.__fpscr &= 0x70007f0ffL;
192
+ #endif
178
193
  __attribute__((fallthrough));
179
194
  case _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC:
180
- __builtin_set_fpscr_rn(0b00);
195
+ __builtin_ppc_set_fpscr_rn(0b00);
181
196
  /* Insert an artificial "read/write" reference to the variable
182
197
  read below, to ensure the compiler does not schedule
183
198
  a read/use of the variable before the FPSCR is modified, above.
@@ -193,7 +208,7 @@ extern __inline __m128
193
208
  This can be removed if and when GCC PR102783 is fixed.
194
209
  */
195
210
  __asm__("" : : "wa"(__r));
196
- __builtin_set_fpscr_rn(__fpscr_save.__fpscr);
211
+ __builtin_ppc_set_fpscr_rn(__fpscr_save.__fpscr);
197
212
  break;
198
213
  case _MM_FROUND_TO_NEG_INF:
199
214
  case _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC:
@@ -219,9 +234,14 @@ extern __inline __m128
219
234
  */
220
235
  __asm__("" : : "wa"(__r));
221
236
  /* Restore enabled exceptions. */
222
- __fpscr_save.__fr = __builtin_mffsl();
237
+ #ifdef _ARCH_PWR9
238
+ __fpscr_save.__fr = __builtin_ppc_mffsl();
239
+ #else
240
+ __fpscr_save.__fr = __builtin_ppc_mffs();
241
+ __fpscr_save.__fpscr &= 0x70007f0ffL;
242
+ #endif
223
243
  __fpscr_save.__fpscr |= __enables_save.__fpscr;
224
- __builtin_mtfsf(0b00000011, __fpscr_save.__fr);
244
+ __builtin_ppc_mtfsf(0b00000011, __fpscr_save.__fr);
225
245
  }
226
246
  return (__m128)__r;
227
247
  }
@@ -305,9 +325,9 @@ extern __inline int
305
325
  extern __inline __m128i
306
326
  __attribute__((__gnu_inline__, __always_inline__, __artificial__))
307
327
  _mm_blend_epi16(__m128i __A, __m128i __B, const int __imm8) {
308
- __v16qi __charmask = vec_splats((signed char)__imm8);
328
+ __v16qu __charmask = vec_splats((unsigned char)__imm8);
309
329
  __charmask = vec_gb(__charmask);
310
- __v8hu __shortmask = (__v8hu)vec_unpackh(__charmask);
330
+ __v8hu __shortmask = (__v8hu)vec_unpackh((__v16qi)__charmask);
311
331
  #ifdef __BIG_ENDIAN__
312
332
  __shortmask = vec_reve(__shortmask);
313
333
  #endif
@@ -0,0 +1,105 @@
1
+ /*===---- rdseedintrin.h - RDSEED 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
+ #ifndef __IMMINTRIN_H
11
+ #error "Never use <rdseedintrin.h> directly; include <immintrin.h> instead."
12
+ #endif
13
+
14
+ #ifndef __RDSEEDINTRIN_H
15
+ #define __RDSEEDINTRIN_H
16
+
17
+ /* Define the default attributes for the functions in this file. */
18
+ #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("rdseed")))
19
+
20
+ /// Stores a hardware-generated 16-bit random value in the memory at \a __p.
21
+ ///
22
+ /// The random number generator complies with NIST SP800-90B and SP800-90C.
23
+ ///
24
+ /// \code{.operation}
25
+ /// IF HW_NRND_GEN.ready == 1
26
+ /// Store16(__p, HW_NRND_GEN.data)
27
+ /// result := 1
28
+ /// ELSE
29
+ /// Store16(__p, 0)
30
+ /// result := 0
31
+ /// END
32
+ /// \endcode
33
+ ///
34
+ /// \headerfile <immintrin.h>
35
+ ///
36
+ /// This intrinsic corresponds to the \c RDSEED instruction.
37
+ ///
38
+ /// \param __p
39
+ /// Pointer to memory for storing the 16-bit random number.
40
+ /// \returns 1 if a random number was generated, 0 if not.
41
+ static __inline__ int __DEFAULT_FN_ATTRS
42
+ _rdseed16_step(unsigned short *__p)
43
+ {
44
+ return (int) __builtin_ia32_rdseed16_step(__p);
45
+ }
46
+
47
+ /// Stores a hardware-generated 32-bit random value in the memory at \a __p.
48
+ ///
49
+ /// The random number generator complies with NIST SP800-90B and SP800-90C.
50
+ ///
51
+ /// \code{.operation}
52
+ /// IF HW_NRND_GEN.ready == 1
53
+ /// Store32(__p, HW_NRND_GEN.data)
54
+ /// result := 1
55
+ /// ELSE
56
+ /// Store32(__p, 0)
57
+ /// result := 0
58
+ /// END
59
+ /// \endcode
60
+ ///
61
+ /// \headerfile <immintrin.h>
62
+ ///
63
+ /// This intrinsic corresponds to the \c RDSEED instruction.
64
+ ///
65
+ /// \param __p
66
+ /// Pointer to memory for storing the 32-bit random number.
67
+ /// \returns 1 if a random number was generated, 0 if not.
68
+ static __inline__ int __DEFAULT_FN_ATTRS
69
+ _rdseed32_step(unsigned int *__p)
70
+ {
71
+ return (int) __builtin_ia32_rdseed32_step(__p);
72
+ }
73
+
74
+ #ifdef __x86_64__
75
+ /// Stores a hardware-generated 64-bit random value in the memory at \a __p.
76
+ ///
77
+ /// The random number generator complies with NIST SP800-90B and SP800-90C.
78
+ ///
79
+ /// \code{.operation}
80
+ /// IF HW_NRND_GEN.ready == 1
81
+ /// Store64(__p, HW_NRND_GEN.data)
82
+ /// result := 1
83
+ /// ELSE
84
+ /// Store64(__p, 0)
85
+ /// result := 0
86
+ /// END
87
+ /// \endcode
88
+ ///
89
+ /// \headerfile <immintrin.h>
90
+ ///
91
+ /// This intrinsic corresponds to the \c RDSEED instruction.
92
+ ///
93
+ /// \param __p
94
+ /// Pointer to memory for storing the 64-bit random number.
95
+ /// \returns 1 if a random number was generated, 0 if not.
96
+ static __inline__ int __DEFAULT_FN_ATTRS
97
+ _rdseed64_step(unsigned long long *__p)
98
+ {
99
+ return (int) __builtin_ia32_rdseed64_step(__p);
100
+ }
101
+ #endif
102
+
103
+ #undef __DEFAULT_FN_ATTRS
104
+
105
+ #endif /* __RDSEEDINTRIN_H */