llvm-runtime-resources-darwin 0.0.0 → 22.1.8

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 (350) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +33 -0
  3. package/include/__clang_cuda_builtin_vars.h +121 -0
  4. package/include/__clang_cuda_cmath.h +512 -0
  5. package/include/__clang_cuda_complex_builtins.h +229 -0
  6. package/include/__clang_cuda_device_functions.h +1572 -0
  7. package/include/__clang_cuda_intrinsics.h +994 -0
  8. package/include/__clang_cuda_libdevice_declares.h +468 -0
  9. package/include/__clang_cuda_math.h +353 -0
  10. package/include/__clang_cuda_math_forward_declares.h +284 -0
  11. package/include/__clang_cuda_runtime_wrapper.h +522 -0
  12. package/include/__clang_cuda_texture_intrinsics.h +1177 -0
  13. package/include/__clang_hip_cmath.h +848 -0
  14. package/include/__clang_hip_libdevice_declares.h +340 -0
  15. package/include/__clang_hip_math.h +1405 -0
  16. package/include/__clang_hip_runtime_wrapper.h +165 -0
  17. package/include/__clang_hip_stdlib.h +43 -0
  18. package/include/__clang_spirv_builtins.h +217 -0
  19. package/include/__float_float.h +176 -0
  20. package/include/__float_header_macro.h +12 -0
  21. package/include/__float_infinity_nan.h +20 -0
  22. package/include/__stdarg___gnuc_va_list.h +13 -0
  23. package/include/__stdarg___va_copy.h +12 -0
  24. package/include/__stdarg_header_macro.h +12 -0
  25. package/include/__stdarg_va_arg.h +22 -0
  26. package/include/__stdarg_va_copy.h +12 -0
  27. package/include/__stdarg_va_list.h +13 -0
  28. package/include/__stddef_header_macro.h +12 -0
  29. package/include/__stddef_max_align_t.h +27 -0
  30. package/include/__stddef_null.h +29 -0
  31. package/include/__stddef_nullptr_t.h +29 -0
  32. package/include/__stddef_offsetof.h +17 -0
  33. package/include/__stddef_ptrdiff_t.h +20 -0
  34. package/include/__stddef_rsize_t.h +20 -0
  35. package/include/__stddef_size_t.h +20 -0
  36. package/include/__stddef_unreachable.h +21 -0
  37. package/include/__stddef_wchar_t.h +28 -0
  38. package/include/__stddef_wint_t.h +15 -0
  39. package/include/__wmmintrin_aes.h +140 -0
  40. package/include/__wmmintrin_pclmul.h +48 -0
  41. package/include/adcintrin.h +165 -0
  42. package/include/adxintrin.h +107 -0
  43. package/include/altivec.h +19364 -0
  44. package/include/amdgpuintrin.h +191 -0
  45. package/include/ammintrin.h +183 -0
  46. package/include/amo.h +131 -0
  47. package/include/amxavx512intrin.h +596 -0
  48. package/include/amxcomplexintrin.h +167 -0
  49. package/include/amxfp16intrin.h +93 -0
  50. package/include/amxfp8intrin.h +230 -0
  51. package/include/amxintrin.h +492 -0
  52. package/include/amxmovrsintrin.h +48 -0
  53. package/include/amxtf32intrin.h +108 -0
  54. package/include/andes_vector.h +16 -0
  55. package/include/arm64intr.h +35 -0
  56. package/include/arm_acle.h +865 -0
  57. package/include/arm_bf16.h +20 -0
  58. package/include/arm_cde.h +410 -0
  59. package/include/arm_cmse.h +217 -0
  60. package/include/arm_fp16.h +596 -0
  61. package/include/arm_mve.h +19187 -0
  62. package/include/arm_neon.h +74183 -0
  63. package/include/arm_neon_sve_bridge.h +182 -0
  64. package/include/arm_sme.h +3741 -0
  65. package/include/arm_sve.h +32278 -0
  66. package/include/arm_vector_types.h +432 -0
  67. package/include/armintr.h +31 -0
  68. package/include/avx10_2_512bf16intrin.h +568 -0
  69. package/include/avx10_2_512convertintrin.h +322 -0
  70. package/include/avx10_2_512minmaxintrin.h +127 -0
  71. package/include/avx10_2_512niintrin.h +314 -0
  72. package/include/avx10_2_512satcvtdsintrin.h +307 -0
  73. package/include/avx10_2_512satcvtintrin.h +301 -0
  74. package/include/avx10_2bf16intrin.h +1094 -0
  75. package/include/avx10_2convertintrin.h +3257 -0
  76. package/include/avx10_2copyintrin.h +66 -0
  77. package/include/avx10_2minmaxintrin.h +232 -0
  78. package/include/avx10_2niintrin.h +409 -0
  79. package/include/avx10_2satcvtdsintrin.h +376 -0
  80. package/include/avx10_2satcvtintrin.h +312 -0
  81. package/include/avx2intrin.h +5191 -0
  82. package/include/avx512bf16intrin.h +292 -0
  83. package/include/avx512bitalgintrin.h +75 -0
  84. package/include/avx512bwintrin.h +1895 -0
  85. package/include/avx512cdintrin.h +112 -0
  86. package/include/avx512dqintrin.h +1350 -0
  87. package/include/avx512fintrin.h +9378 -0
  88. package/include/avx512fp16intrin.h +3355 -0
  89. package/include/avx512ifmaintrin.h +68 -0
  90. package/include/avx512ifmavlintrin.h +138 -0
  91. package/include/avx512vbmi2intrin.h +368 -0
  92. package/include/avx512vbmiintrin.h +98 -0
  93. package/include/avx512vbmivlintrin.h +179 -0
  94. package/include/avx512vlbf16intrin.h +527 -0
  95. package/include/avx512vlbitalgintrin.h +135 -0
  96. package/include/avx512vlbwintrin.h +3064 -0
  97. package/include/avx512vlcdintrin.h +202 -0
  98. package/include/avx512vldqintrin.h +1156 -0
  99. package/include/avx512vlfp16intrin.h +2090 -0
  100. package/include/avx512vlintrin.h +8083 -0
  101. package/include/avx512vlvbmi2intrin.h +710 -0
  102. package/include/avx512vlvnniintrin.h +313 -0
  103. package/include/avx512vlvp2intersectintrin.h +123 -0
  104. package/include/avx512vnniintrin.h +116 -0
  105. package/include/avx512vp2intersectintrin.h +77 -0
  106. package/include/avx512vpopcntdqintrin.h +62 -0
  107. package/include/avx512vpopcntdqvlintrin.h +105 -0
  108. package/include/avxifmaintrin.h +193 -0
  109. package/include/avxintrin.h +5064 -0
  110. package/include/avxneconvertintrin.h +484 -0
  111. package/include/avxvnniint16intrin.h +451 -0
  112. package/include/avxvnniint8intrin.h +454 -0
  113. package/include/avxvnniintrin.h +233 -0
  114. package/include/bmi2intrin.h +253 -0
  115. package/include/bmiintrin.h +604 -0
  116. package/include/builtins.h +19 -0
  117. package/include/cet.h +66 -0
  118. package/include/cetintrin.h +115 -0
  119. package/include/cldemoteintrin.h +36 -0
  120. package/include/clflushoptintrin.h +36 -0
  121. package/include/clwbintrin.h +38 -0
  122. package/include/clzerointrin.h +38 -0
  123. package/include/cmpccxaddintrin.h +70 -0
  124. package/include/cpuid.h +451 -0
  125. package/include/crc32intrin.h +100 -0
  126. package/include/cuda_wrappers/__utility/declval.h +28 -0
  127. package/include/cuda_wrappers/algorithm +116 -0
  128. package/include/cuda_wrappers/bits/basic_string.h +9 -0
  129. package/include/cuda_wrappers/bits/basic_string.tcc +9 -0
  130. package/include/cuda_wrappers/bits/c++config.h +61 -0
  131. package/include/cuda_wrappers/bits/shared_ptr_base.h +9 -0
  132. package/include/cuda_wrappers/cmath +44 -0
  133. package/include/cuda_wrappers/complex +90 -0
  134. package/include/cuda_wrappers/new +108 -0
  135. package/include/emmintrin.h +4940 -0
  136. package/include/enqcmdintrin.h +63 -0
  137. package/include/f16cintrin.h +176 -0
  138. package/include/float.h +48 -0
  139. package/include/fma4intrin.h +220 -0
  140. package/include/fmaintrin.h +826 -0
  141. package/include/fuzzer/FuzzedDataProvider.h +397 -0
  142. package/include/fxsrintrin.h +91 -0
  143. package/include/gfniintrin.h +238 -0
  144. package/include/gpuintrin.h +330 -0
  145. package/include/hexagon_circ_brev_intrinsics.h +298 -0
  146. package/include/hexagon_protos.h +8439 -0
  147. package/include/hexagon_types.h +2628 -0
  148. package/include/hresetintrin.h +49 -0
  149. package/include/htmintrin.h +212 -0
  150. package/include/htmxlintrin.h +345 -0
  151. package/include/hvx_hexagon_protos.h +5399 -0
  152. package/include/ia32intrin.h +863 -0
  153. package/include/immintrin.h +595 -0
  154. package/include/intrin.h +491 -0
  155. package/include/intrin0.h +256 -0
  156. package/include/inttypes.h +101 -0
  157. package/include/invpcidintrin.h +23 -0
  158. package/include/iso646.h +31 -0
  159. package/include/keylockerintrin.h +518 -0
  160. package/include/larchintrin.h +260 -0
  161. package/include/lasxintrin.h +3999 -0
  162. package/include/limits.h +133 -0
  163. package/include/llvm_libc_wrappers/assert.h +32 -0
  164. package/include/llvm_libc_wrappers/ctype.h +28 -0
  165. package/include/llvm_libc_wrappers/inttypes.h +32 -0
  166. package/include/llvm_libc_wrappers/stdio.h +52 -0
  167. package/include/llvm_libc_wrappers/stdlib.h +32 -0
  168. package/include/llvm_libc_wrappers/string.h +28 -0
  169. package/include/llvm_libc_wrappers/time.h +28 -0
  170. package/include/llvm_offload_wrappers/__llvm_offload.h +31 -0
  171. package/include/llvm_offload_wrappers/__llvm_offload_device.h +10 -0
  172. package/include/llvm_offload_wrappers/__llvm_offload_host.h +15 -0
  173. package/include/lsxintrin.h +3752 -0
  174. package/include/lwpintrin.h +136 -0
  175. package/include/lzcntintrin.h +109 -0
  176. package/include/mm3dnow.h +22 -0
  177. package/include/mm_malloc.h +67 -0
  178. package/include/mmintrin.h +1541 -0
  179. package/include/module.modulemap +360 -0
  180. package/include/movdirintrin.h +49 -0
  181. package/include/movrs_avx10_2_512intrin.h +98 -0
  182. package/include/movrs_avx10_2intrin.h +174 -0
  183. package/include/movrsintrin.h +59 -0
  184. package/include/msa.h +573 -0
  185. package/include/mwaitxintrin.h +62 -0
  186. package/include/nmmintrin.h +20 -0
  187. package/include/nvptxintrin.h +219 -0
  188. package/include/opencl-c-base.h +758 -0
  189. package/include/opencl-c.h +18676 -0
  190. package/include/openmp_wrappers/__clang_openmp_device_functions.h +104 -0
  191. package/include/openmp_wrappers/cmath +132 -0
  192. package/include/openmp_wrappers/complex +55 -0
  193. package/include/openmp_wrappers/complex.h +35 -0
  194. package/include/openmp_wrappers/complex_cmath.h +393 -0
  195. package/include/openmp_wrappers/math.h +61 -0
  196. package/include/openmp_wrappers/new +48 -0
  197. package/include/pconfigintrin.h +40 -0
  198. package/include/pkuintrin.h +34 -0
  199. package/include/pmmintrin.h +302 -0
  200. package/include/popcntintrin.h +59 -0
  201. package/include/ppc_wrappers/bmi2intrin.h +134 -0
  202. package/include/ppc_wrappers/bmiintrin.h +165 -0
  203. package/include/ppc_wrappers/emmintrin.h +2269 -0
  204. package/include/ppc_wrappers/immintrin.h +27 -0
  205. package/include/ppc_wrappers/mm_malloc.h +45 -0
  206. package/include/ppc_wrappers/mmintrin.h +1453 -0
  207. package/include/ppc_wrappers/nmmintrin.h +26 -0
  208. package/include/ppc_wrappers/pmmintrin.h +145 -0
  209. package/include/ppc_wrappers/smmintrin.h +683 -0
  210. package/include/ppc_wrappers/tmmintrin.h +453 -0
  211. package/include/ppc_wrappers/x86gprintrin.h +17 -0
  212. package/include/ppc_wrappers/x86intrin.h +28 -0
  213. package/include/ppc_wrappers/xmmintrin.h +1827 -0
  214. package/include/prfchiintrin.h +61 -0
  215. package/include/prfchwintrin.h +57 -0
  216. package/include/profile/InstrProfData.inc +1001 -0
  217. package/include/profile/instr_prof_interface.h +88 -0
  218. package/include/ptrauth.h +407 -0
  219. package/include/ptwriteintrin.h +37 -0
  220. package/include/raointintrin.h +203 -0
  221. package/include/rdpruintrin.h +57 -0
  222. package/include/rdseedintrin.h +105 -0
  223. package/include/riscv_bitmanip.h +195 -0
  224. package/include/riscv_corev_alu.h +128 -0
  225. package/include/riscv_crypto.h +170 -0
  226. package/include/riscv_mips.h +34 -0
  227. package/include/riscv_nds.h +89 -0
  228. package/include/riscv_ntlh.h +26 -0
  229. package/include/riscv_vector.h +422 -0
  230. package/include/rtmintrin.h +45 -0
  231. package/include/s390intrin.h +25 -0
  232. package/include/sanitizer/allocator_interface.h +106 -0
  233. package/include/sanitizer/asan_interface.h +348 -0
  234. package/include/sanitizer/common_interface_defs.h +544 -0
  235. package/include/sanitizer/coverage_interface.h +36 -0
  236. package/include/sanitizer/dfsan_interface.h +220 -0
  237. package/include/sanitizer/hwasan_interface.h +109 -0
  238. package/include/sanitizer/linux_syscall_hooks.h +3112 -0
  239. package/include/sanitizer/lsan_interface.h +89 -0
  240. package/include/sanitizer/msan_interface.h +135 -0
  241. package/include/sanitizer/netbsd_syscall_hooks.h +5005 -0
  242. package/include/sanitizer/rtsan_interface.h +75 -0
  243. package/include/sanitizer/scudo_interface.h +38 -0
  244. package/include/sanitizer/tsan_interface.h +316 -0
  245. package/include/sanitizer/tsan_interface_atomic.h +223 -0
  246. package/include/sanitizer/ubsan_interface.h +34 -0
  247. package/include/serializeintrin.h +30 -0
  248. package/include/sgxintrin.h +60 -0
  249. package/include/sha512intrin.h +200 -0
  250. package/include/shaintrin.h +190 -0
  251. package/include/sifive_vector.h +174 -0
  252. package/include/sm3intrin.h +238 -0
  253. package/include/sm4evexintrin.h +32 -0
  254. package/include/sm4intrin.h +269 -0
  255. package/include/smmintrin.h +2352 -0
  256. package/include/spirvintrin.h +194 -0
  257. package/include/stdalign.h +24 -0
  258. package/include/stdarg.h +75 -0
  259. package/include/stdatomic.h +204 -0
  260. package/include/stdbool.h +39 -0
  261. package/include/stdckdint.h +42 -0
  262. package/include/stdcountof.h +15 -0
  263. package/include/stddef.h +139 -0
  264. package/include/stddefer.h +19 -0
  265. package/include/stdint.h +844 -0
  266. package/include/stdnoreturn.h +35 -0
  267. package/include/tbmintrin.h +128 -0
  268. package/include/tgmath.h +1368 -0
  269. package/include/tmmintrin.h +779 -0
  270. package/include/tsxldtrkintrin.h +56 -0
  271. package/include/uintrintrin.h +157 -0
  272. package/include/unwind.h +332 -0
  273. package/include/usermsrintrin.h +51 -0
  274. package/include/vadefs.h +51 -0
  275. package/include/vaesintrin.h +86 -0
  276. package/include/varargs.h +16 -0
  277. package/include/vecintrin.h +12868 -0
  278. package/include/velintrin.h +71 -0
  279. package/include/velintrin_approx.h +120 -0
  280. package/include/velintrin_gen.h +1257 -0
  281. package/include/vpclmulqdqintrin.h +30 -0
  282. package/include/waitpkgintrin.h +42 -0
  283. package/include/wasm_simd128.h +2143 -0
  284. package/include/wbnoinvdintrin.h +24 -0
  285. package/include/wmmintrin.h +23 -0
  286. package/include/x86gprintrin.h +49 -0
  287. package/include/x86intrin.h +35 -0
  288. package/include/xmmintrin.h +3175 -0
  289. package/include/xopintrin.h +780 -0
  290. package/include/xsavecintrin.h +84 -0
  291. package/include/xsaveintrin.h +63 -0
  292. package/include/xsaveoptintrin.h +34 -0
  293. package/include/xsavesintrin.h +44 -0
  294. package/include/xtestintrin.h +27 -0
  295. package/include/yvals_core.h +25 -0
  296. package/include/zos_wrappers/builtins.h +18 -0
  297. package/index.js +5 -0
  298. package/lib/darwin/libclang_rt.asan_abi_ios.a +0 -0
  299. package/lib/darwin/libclang_rt.asan_abi_iossim.a +0 -0
  300. package/lib/darwin/libclang_rt.asan_abi_osx.a +0 -0
  301. package/lib/darwin/libclang_rt.asan_ios_dynamic.dylib +0 -0
  302. package/lib/darwin/libclang_rt.asan_iossim_dynamic.dylib +0 -0
  303. package/lib/darwin/libclang_rt.asan_osx_dynamic.dylib +0 -0
  304. package/lib/darwin/libclang_rt.cc_kext.a +0 -0
  305. package/lib/darwin/libclang_rt.cc_kext_ios.a +0 -0
  306. package/lib/darwin/libclang_rt.fuzzer_interceptors_ios.a +0 -0
  307. package/lib/darwin/libclang_rt.fuzzer_interceptors_iossim.a +0 -0
  308. package/lib/darwin/libclang_rt.fuzzer_interceptors_osx.a +0 -0
  309. package/lib/darwin/libclang_rt.fuzzer_ios.a +0 -0
  310. package/lib/darwin/libclang_rt.fuzzer_iossim.a +0 -0
  311. package/lib/darwin/libclang_rt.fuzzer_no_main_ios.a +0 -0
  312. package/lib/darwin/libclang_rt.fuzzer_no_main_iossim.a +0 -0
  313. package/lib/darwin/libclang_rt.fuzzer_no_main_osx.a +0 -0
  314. package/lib/darwin/libclang_rt.fuzzer_osx.a +0 -0
  315. package/lib/darwin/libclang_rt.ios.a +0 -0
  316. package/lib/darwin/libclang_rt.iossim.a +0 -0
  317. package/lib/darwin/libclang_rt.lsan_ios_dynamic.dylib +0 -0
  318. package/lib/darwin/libclang_rt.lsan_iossim_dynamic.dylib +0 -0
  319. package/lib/darwin/libclang_rt.lsan_osx_dynamic.dylib +0 -0
  320. package/lib/darwin/libclang_rt.osx.a +0 -0
  321. package/lib/darwin/libclang_rt.profile_ios.a +0 -0
  322. package/lib/darwin/libclang_rt.profile_iossim.a +0 -0
  323. package/lib/darwin/libclang_rt.profile_osx.a +0 -0
  324. package/lib/darwin/libclang_rt.rtsan_ios_dynamic.dylib +0 -0
  325. package/lib/darwin/libclang_rt.rtsan_iossim_dynamic.dylib +0 -0
  326. package/lib/darwin/libclang_rt.rtsan_osx_dynamic.dylib +0 -0
  327. package/lib/darwin/libclang_rt.stats_client_ios.a +0 -0
  328. package/lib/darwin/libclang_rt.stats_client_iossim.a +0 -0
  329. package/lib/darwin/libclang_rt.stats_client_osx.a +0 -0
  330. package/lib/darwin/libclang_rt.stats_ios_dynamic.dylib +0 -0
  331. package/lib/darwin/libclang_rt.stats_iossim_dynamic.dylib +0 -0
  332. package/lib/darwin/libclang_rt.stats_osx_dynamic.dylib +0 -0
  333. package/lib/darwin/libclang_rt.tsan_ios_dynamic.dylib +0 -0
  334. package/lib/darwin/libclang_rt.tsan_iossim_dynamic.dylib +0 -0
  335. package/lib/darwin/libclang_rt.tsan_osx_dynamic.dylib +0 -0
  336. package/lib/darwin/libclang_rt.tysan_ios_dynamic.dylib +0 -0
  337. package/lib/darwin/libclang_rt.tysan_iossim_dynamic.dylib +0 -0
  338. package/lib/darwin/libclang_rt.tysan_osx_dynamic.dylib +0 -0
  339. package/lib/darwin/libclang_rt.ubsan_ios_dynamic.dylib +0 -0
  340. package/lib/darwin/libclang_rt.ubsan_iossim_dynamic.dylib +0 -0
  341. package/lib/darwin/libclang_rt.ubsan_minimal_ios.a +0 -0
  342. package/lib/darwin/libclang_rt.ubsan_minimal_ios_dynamic.dylib +0 -0
  343. package/lib/darwin/libclang_rt.ubsan_minimal_iossim.a +0 -0
  344. package/lib/darwin/libclang_rt.ubsan_minimal_iossim_dynamic.dylib +0 -0
  345. package/lib/darwin/libclang_rt.ubsan_minimal_osx.a +0 -0
  346. package/lib/darwin/libclang_rt.ubsan_minimal_osx_dynamic.dylib +0 -0
  347. package/lib/darwin/libclang_rt.ubsan_osx_dynamic.dylib +0 -0
  348. package/package.json +40 -1
  349. package/share/asan_ignorelist.txt +14 -0
  350. package/share/cfi_ignorelist.txt +17 -0
@@ -0,0 +1,88 @@
1
+ /*===---- instr_prof_interface.h - Instrumentation PGO User Program API ----===
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
+ * This header provides a public interface for fine-grained control of counter
10
+ * reset and profile dumping. These interface functions can be directly called
11
+ * in user programs.
12
+ *
13
+ \*===---------------------------------------------------------------------===*/
14
+
15
+ #ifndef COMPILER_RT_INSTR_PROFILING
16
+ #define COMPILER_RT_INSTR_PROFILING
17
+
18
+ #ifdef __cplusplus
19
+ extern "C" {
20
+ #endif
21
+
22
+ #ifdef __LLVM_INSTR_PROFILE_GENERATE
23
+ // Profile file reset and dump interfaces.
24
+ // When `-fprofile[-instr]-generate`/`-fcs-profile-generate` is in effect,
25
+ // clang defines __LLVM_INSTR_PROFILE_GENERATE to pick up the API calls.
26
+
27
+ /*!
28
+ * \brief Set the filename for writing instrumentation data.
29
+ *
30
+ * Sets the filename to be used for subsequent calls to
31
+ * \a __llvm_profile_write_file().
32
+ *
33
+ * \c Name is not copied, so it must remain valid. Passing NULL resets the
34
+ * filename logic to the default behaviour.
35
+ *
36
+ * Note: There may be multiple copies of the profile runtime (one for each
37
+ * instrumented image/DSO). This API only modifies the filename within the
38
+ * copy of the runtime available to the calling image.
39
+ *
40
+ * Warning: This is a no-op if continuous mode (\ref
41
+ * __llvm_profile_is_continuous_mode_enabled) is on. The reason for this is
42
+ * that in continuous mode, profile counters are mmap()'d to the profile at
43
+ * program initialization time. Support for transferring the mmap'd profile
44
+ * counts to a new file has not been implemented.
45
+ */
46
+ void __llvm_profile_set_filename(const char *Name);
47
+
48
+ /*!
49
+ * \brief Interface to set all PGO counters to zero for the current process.
50
+ *
51
+ */
52
+ void __llvm_profile_reset_counters(void);
53
+
54
+ /*!
55
+ * \brief this is a wrapper interface to \c __llvm_profile_write_file.
56
+ * After this interface is invoked, an already dumped flag will be set
57
+ * so that profile won't be dumped again during program exit.
58
+ * Invocation of interface __llvm_profile_reset_counters will clear
59
+ * the flag. This interface is designed to be used to collect profile
60
+ * data from user selected hot regions. The use model is
61
+ * __llvm_profile_reset_counters();
62
+ * ... hot region 1
63
+ * __llvm_profile_dump();
64
+ * .. some other code
65
+ * __llvm_profile_reset_counters();
66
+ * ... hot region 2
67
+ * __llvm_profile_dump();
68
+ *
69
+ * It is expected that on-line profile merging is on with \c %m specifier
70
+ * used in profile filename . If merging is not turned on, user is expected
71
+ * to invoke __llvm_profile_set_filename to specify different profile names
72
+ * for different regions before dumping to avoid profile write clobbering.
73
+ */
74
+ int __llvm_profile_dump(void);
75
+
76
+ #else
77
+
78
+ #define __llvm_profile_set_filename(Name)
79
+ #define __llvm_profile_reset_counters()
80
+ #define __llvm_profile_dump() (0)
81
+
82
+ #endif
83
+
84
+ #ifdef __cplusplus
85
+ } // extern "C"
86
+ #endif
87
+
88
+ #endif
@@ -0,0 +1,407 @@
1
+ /*===---- ptrauth.h - Pointer authentication -------------------------------===
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 __PTRAUTH_H
11
+ #define __PTRAUTH_H
12
+
13
+ typedef enum {
14
+ ptrauth_key_asia = 0,
15
+ ptrauth_key_asib = 1,
16
+ ptrauth_key_asda = 2,
17
+ ptrauth_key_asdb = 3,
18
+
19
+ /* A process-independent key which can be used to sign code pointers. */
20
+ ptrauth_key_process_independent_code = ptrauth_key_asia,
21
+
22
+ /* A process-specific key which can be used to sign code pointers. */
23
+ ptrauth_key_process_dependent_code = ptrauth_key_asib,
24
+
25
+ /* A process-independent key which can be used to sign data pointers. */
26
+ ptrauth_key_process_independent_data = ptrauth_key_asda,
27
+
28
+ /* A process-specific key which can be used to sign data pointers. */
29
+ ptrauth_key_process_dependent_data = ptrauth_key_asdb,
30
+
31
+ /* The key used to sign return addresses on the stack.
32
+ The extra data is based on the storage address of the return address.
33
+ On AArch64, that is always the storage address of the return address + 8
34
+ (or, in other words, the value of the stack pointer on function entry) */
35
+ ptrauth_key_return_address = ptrauth_key_process_dependent_code,
36
+
37
+ /* The key used to sign C function pointers.
38
+ The extra data is always 0. */
39
+ ptrauth_key_function_pointer = ptrauth_key_process_independent_code,
40
+
41
+ /* The key used to sign C++ v-table pointers.
42
+ The extra data is always 0. */
43
+ ptrauth_key_cxx_vtable_pointer = ptrauth_key_process_independent_data,
44
+
45
+ /* The key used to sign metadata pointers to Objective-C method-lists. */
46
+ ptrauth_key_method_list_pointer = ptrauth_key_asda,
47
+
48
+ /* The key used to sign Objective-C isa and super pointers. */
49
+ ptrauth_key_objc_isa_pointer = ptrauth_key_process_independent_data,
50
+ ptrauth_key_objc_super_pointer = ptrauth_key_process_independent_data,
51
+
52
+ /* The key used to sign selector pointers */
53
+ ptrauth_key_objc_sel_pointer = ptrauth_key_process_dependent_data,
54
+
55
+ /* The key used to sign Objective-C class_ro_t pointers. */
56
+ ptrauth_key_objc_class_ro_pointer = ptrauth_key_process_independent_data,
57
+
58
+ /* The key used to sign pointers in ELF .init_array/.fini_array. */
59
+ ptrauth_key_init_fini_pointer = ptrauth_key_process_independent_code,
60
+
61
+ /* Other pointers signed under the ABI use private ABI rules. */
62
+
63
+ } ptrauth_key;
64
+
65
+ /* An integer type of the appropriate size for a discriminator argument. */
66
+ typedef __UINTPTR_TYPE__ ptrauth_extra_data_t;
67
+
68
+ /* An integer type of the appropriate size for a generic signature. */
69
+ typedef __UINTPTR_TYPE__ ptrauth_generic_signature_t;
70
+
71
+ /* A signed pointer value embeds the original pointer together with
72
+ a signature that attests to the validity of that pointer. Because
73
+ this signature must use only "spare" bits of the pointer, a
74
+ signature's validity is probabilistic in practice: it is unlikely
75
+ but still plausible that an invalidly-derived signature will
76
+ somehow equal the correct signature and therefore successfully
77
+ authenticate. Nonetheless, this scheme provides a strong degree
78
+ of protection against certain kinds of attacks. */
79
+
80
+ /* Authenticating a pointer that was not signed with the given key
81
+ and extra-data value will (likely) fail by trapping. */
82
+
83
+ /* The null function pointer is always the all-zero bit pattern.
84
+ Signing an all-zero bit pattern will embed a (likely) non-zero
85
+ signature in the result, and so the result will not seem to be
86
+ a null function pointer. Authenticating this value will yield
87
+ a null function pointer back. However, authenticating an
88
+ all-zero bit pattern will probably fail, because the
89
+ authentication will expect a (likely) non-zero signature to
90
+ embedded in the value.
91
+
92
+ Because of this, if a pointer may validly be null, you should
93
+ check for null before attempting to authenticate it with one
94
+ of these intrinsics. This is not necessary when using the
95
+ __ptrauth qualifier; the compiler will perform this check
96
+ automatically. */
97
+
98
+ #if __has_feature(ptrauth_intrinsics) || defined(__PTRAUTH__)
99
+
100
+ /* Strip the signature from a value without authenticating it.
101
+
102
+ If the value is a function pointer, the result will not be a
103
+ legal function pointer because of the missing signature, and
104
+ attempting to call it will result in an authentication failure.
105
+
106
+ The value must be an expression of pointer type.
107
+ The key must be a constant expression of type ptrauth_key.
108
+ The result will have the same type as the original value. */
109
+ #define ptrauth_strip(__value, __key) __builtin_ptrauth_strip(__value, __key)
110
+
111
+ /* Blend a constant discriminator into the given pointer-like value
112
+ to form a new discriminator. Not all bits of the inputs are
113
+ guaranteed to contribute to the result.
114
+
115
+ On arm64e, the integer must fall within the range of a uint16_t;
116
+ other bits may be ignored.
117
+
118
+ For the purposes of ptrauth_sign_constant, the result of calling
119
+ this function is considered a constant expression if the arguments
120
+ are constant. Some restrictions may be imposed on the pointer.
121
+
122
+ The first argument must be an expression of pointer type.
123
+ The second argument must be an expression of integer type.
124
+ The result will have type uintptr_t. */
125
+ #define ptrauth_blend_discriminator(__pointer, __integer) \
126
+ __builtin_ptrauth_blend_discriminator(__pointer, __integer)
127
+
128
+ /* Return a signed pointer for a constant address in a manner which guarantees
129
+ a non-attackable sequence.
130
+
131
+ The value must be a constant expression of pointer type which evaluates to
132
+ a non-null pointer.
133
+ The key must be a constant expression of type ptrauth_key.
134
+ The extra data must be a constant expression of pointer or integer type;
135
+ if an integer, it will be coerced to ptrauth_extra_data_t.
136
+ The result will have the same type as the original value.
137
+
138
+ This can be used in constant expressions. */
139
+ #define ptrauth_sign_constant(__value, __key, __data) \
140
+ __builtin_ptrauth_sign_constant(__value, __key, __data)
141
+
142
+ /* Add a signature to the given pointer value using a specific key,
143
+ using the given extra data as a salt to the signing process.
144
+
145
+ This operation does not authenticate the original value and is
146
+ therefore potentially insecure if an attacker could possibly
147
+ control that value.
148
+
149
+ The value must be an expression of pointer type.
150
+ The key must be a constant expression of type ptrauth_key.
151
+ The extra data must be an expression of pointer or integer type;
152
+ if an integer, it will be coerced to ptrauth_extra_data_t.
153
+ The result will have the same type as the original value. */
154
+ #define ptrauth_sign_unauthenticated(__value, __key, __data) \
155
+ __builtin_ptrauth_sign_unauthenticated(__value, __key, __data)
156
+
157
+ /* Authenticate a pointer using one scheme and resign it using another.
158
+
159
+ If the result is subsequently authenticated using the new scheme, that
160
+ authentication is guaranteed to fail if and only if the initial
161
+ authentication failed.
162
+
163
+ The value must be an expression of pointer type.
164
+ The key must be a constant expression of type ptrauth_key.
165
+ The extra data must be an expression of pointer or integer type;
166
+ if an integer, it will be coerced to ptrauth_extra_data_t.
167
+ The result will have the same type as the original value.
168
+
169
+ This operation is guaranteed to not leave the intermediate value
170
+ available for attack before it is re-signed.
171
+
172
+ Do not pass a null pointer to this function. A null pointer
173
+ will not successfully authenticate.
174
+
175
+ This operation traps if the authentication fails. */
176
+ #define ptrauth_auth_and_resign(__value, __old_key, __old_data, __new_key, \
177
+ __new_data) \
178
+ __builtin_ptrauth_auth_and_resign(__value, __old_key, __old_data, __new_key, \
179
+ __new_data)
180
+
181
+ /* Authenticate a pointer using one scheme and resign it as a C
182
+ function pointer.
183
+
184
+ If the result is subsequently authenticated using the new scheme, that
185
+ authentication is guaranteed to fail if and only if the initial
186
+ authentication failed.
187
+
188
+ The value must be an expression of function pointer type.
189
+ The key must be a constant expression of type ptrauth_key.
190
+ The extra data must be an expression of pointer or integer type;
191
+ if an integer, it will be coerced to ptrauth_extra_data_t.
192
+ The result will have the same type as the original value.
193
+
194
+ This operation is guaranteed to not leave the intermediate value
195
+ available for attack before it is re-signed. Additionally, if this
196
+ expression is used syntactically as the function expression in a
197
+ call, only a single authentication will be performed. */
198
+ #define ptrauth_auth_function(__value, __old_key, __old_data) \
199
+ ptrauth_auth_and_resign(__value, __old_key, __old_data, \
200
+ ptrauth_key_function_pointer, 0)
201
+
202
+ /* Authenticate a data pointer.
203
+
204
+ The value must be an expression of non-function pointer type.
205
+ The key must be a constant expression of type ptrauth_key.
206
+ The extra data must be an expression of pointer or integer type;
207
+ if an integer, it will be coerced to ptrauth_extra_data_t.
208
+ The result will have the same type as the original value.
209
+
210
+ This operation traps if the authentication fails. */
211
+ #define ptrauth_auth_data(__value, __old_key, __old_data) \
212
+ __builtin_ptrauth_auth(__value, __old_key, __old_data)
213
+
214
+ /* Compute a constant discriminator from the given string.
215
+
216
+ The argument must be a string literal of char character type. The result
217
+ has type ptrauth_extra_data_t.
218
+
219
+ The result value is never zero and always within range for both the
220
+ __ptrauth qualifier and ptrauth_blend_discriminator.
221
+
222
+ This can be used in constant expressions.
223
+ */
224
+ #define ptrauth_string_discriminator(__string) \
225
+ __builtin_ptrauth_string_discriminator(__string)
226
+
227
+ /* Compute a constant discriminator from the given type.
228
+
229
+ The result can be used as the second argument to
230
+ ptrauth_blend_discriminator or the third argument to the
231
+ __ptrauth qualifier. It has type size_t.
232
+
233
+ If the type is a C++ member function pointer type, the result is
234
+ the discriminator used to signed member function pointers of that
235
+ type. If the type is a function, function pointer, or function
236
+ reference type, the result is the discriminator used to sign
237
+ functions of that type. It is ill-formed to use this macro with any
238
+ other type.
239
+
240
+ A call to this function is an integer constant expression. */
241
+ #define ptrauth_type_discriminator(__type) \
242
+ __builtin_ptrauth_type_discriminator(__type)
243
+
244
+ /* Compute the constant discriminator used by Clang to sign pointers with the
245
+ given C function pointer type.
246
+
247
+ A call to this function is an integer constant expression. */
248
+ #if __has_feature(ptrauth_function_pointer_type_discrimination)
249
+ #define ptrauth_function_pointer_type_discriminator(__type) \
250
+ __builtin_ptrauth_type_discriminator(__type)
251
+ #else
252
+ #define ptrauth_function_pointer_type_discriminator(__type) \
253
+ ((ptrauth_extra_data_t)0)
254
+ #endif
255
+
256
+ /* Compute a signature for the given pair of pointer-sized values.
257
+ The order of the arguments is significant.
258
+
259
+ Like a pointer signature, the resulting signature depends on
260
+ private key data and therefore should not be reliably reproducible
261
+ by attackers. That means that this can be used to validate the
262
+ integrity of arbitrary data by storing a signature for that data
263
+ alongside it, then checking that the signature is still valid later.
264
+ Data which exceeds two pointers in size can be signed by either
265
+ computing a tree of generic signatures or just signing an ordinary
266
+ cryptographic hash of the data.
267
+
268
+ The result has type ptrauth_generic_signature_t. However, it may
269
+ not have as many bits of entropy as that type's width would suggest;
270
+ some implementations are known to compute a compressed signature as
271
+ if the arguments were a pointer and a discriminator.
272
+
273
+ The arguments must be either pointers or integers; if integers, they
274
+ will be coerce to uintptr_t. */
275
+ #define ptrauth_sign_generic_data(__value, __data) \
276
+ __builtin_ptrauth_sign_generic_data(__value, __data)
277
+
278
+ /* C++ vtable pointer signing class attribute */
279
+ #define ptrauth_cxx_vtable_pointer(key, address_discrimination, \
280
+ extra_discrimination...) \
281
+ [[clang::ptrauth_vtable_pointer(key, address_discrimination, \
282
+ extra_discrimination)]]
283
+
284
+ /* The value is ptrauth_string_discriminator("init_fini") */
285
+ #define __ptrauth_init_fini_discriminator 0xd9d4
286
+
287
+ /* Objective-C pointer auth ABI qualifiers */
288
+ #define __ptrauth_objc_method_list_imp \
289
+ __ptrauth(ptrauth_key_function_pointer, 1, 0)
290
+
291
+ #if __has_feature(ptrauth_objc_method_list_pointer)
292
+ #define __ptrauth_objc_method_list_pointer \
293
+ __ptrauth(ptrauth_key_method_list_pointer, 1, 0xC310)
294
+ #else
295
+ #define __ptrauth_objc_method_list_pointer
296
+ #endif
297
+
298
+ #define __ptrauth_isa_discriminator 0x6AE1
299
+ #define __ptrauth_super_discriminator 0xB5AB
300
+ #define __ptrauth_objc_isa_pointer \
301
+ __ptrauth(ptrauth_key_objc_isa_pointer, 1, __ptrauth_isa_discriminator)
302
+ #if __has_feature(ptrauth_restricted_intptr_qualifier)
303
+ #define __ptrauth_objc_isa_uintptr \
304
+ __ptrauth_restricted_intptr(ptrauth_key_objc_isa_pointer, 1, \
305
+ __ptrauth_isa_discriminator)
306
+ #else
307
+ #define __ptrauth_objc_isa_uintptr \
308
+ __ptrauth(ptrauth_key_objc_isa_pointer, 1, __ptrauth_isa_discriminator)
309
+ #endif
310
+
311
+ #define __ptrauth_objc_super_pointer \
312
+ __ptrauth(ptrauth_key_objc_super_pointer, 1, __ptrauth_super_discriminator)
313
+
314
+ #define __ptrauth_objc_sel_discriminator 0x57c2
315
+ #if __has_feature(ptrauth_objc_interface_sel)
316
+ #define __ptrauth_objc_sel \
317
+ __ptrauth(ptrauth_key_objc_sel_pointer, 1, __ptrauth_objc_sel_discriminator)
318
+ #else
319
+ #define __ptrauth_objc_sel
320
+ #endif
321
+
322
+ #define __ptrauth_objc_class_ro_discriminator 0x61f8
323
+ #define __ptrauth_objc_class_ro \
324
+ __ptrauth(ptrauth_key_objc_class_ro_pointer, 1, \
325
+ __ptrauth_objc_class_ro_discriminator)
326
+
327
+ #else
328
+
329
+ #define ptrauth_strip(__value, __key) \
330
+ ({ \
331
+ (void)__key; \
332
+ __value; \
333
+ })
334
+
335
+ #define ptrauth_blend_discriminator(__pointer, __integer) \
336
+ ({ \
337
+ (void)__pointer; \
338
+ (void)__integer; \
339
+ ((ptrauth_extra_data_t)0); \
340
+ })
341
+
342
+ #define ptrauth_sign_constant(__value, __key, __data) \
343
+ ({ \
344
+ (void)__key; \
345
+ (void)__data; \
346
+ __value; \
347
+ })
348
+
349
+ #define ptrauth_sign_unauthenticated(__value, __key, __data) \
350
+ ({ \
351
+ (void)__key; \
352
+ (void)__data; \
353
+ __value; \
354
+ })
355
+
356
+ #define ptrauth_auth_and_resign(__value, __old_key, __old_data, __new_key, \
357
+ __new_data) \
358
+ ({ \
359
+ (void)__old_key; \
360
+ (void)__old_data; \
361
+ (void)__new_key; \
362
+ (void)__new_data; \
363
+ __value; \
364
+ })
365
+
366
+ #define ptrauth_auth_function(__value, __old_key, __old_data) \
367
+ ({ \
368
+ (void)__old_key; \
369
+ (void)__old_data; \
370
+ __value; \
371
+ })
372
+
373
+ #define ptrauth_auth_data(__value, __old_key, __old_data) \
374
+ ({ \
375
+ (void)__old_key; \
376
+ (void)__old_data; \
377
+ __value; \
378
+ })
379
+
380
+ #define ptrauth_string_discriminator(__string) \
381
+ ({ \
382
+ (void)__string; \
383
+ ((ptrauth_extra_data_t)0); \
384
+ })
385
+
386
+ #define ptrauth_type_discriminator(__type) ((ptrauth_extra_data_t)0)
387
+ #define ptrauth_function_pointer_type_discriminator(__type) \
388
+ ((ptrauth_extra_data_t)0)
389
+
390
+ #define ptrauth_sign_generic_data(__value, __data) \
391
+ ({ \
392
+ (void)__value; \
393
+ (void)__data; \
394
+ ((ptrauth_generic_signature_t)0); \
395
+ })
396
+
397
+
398
+ #define ptrauth_cxx_vtable_pointer(key, address_discrimination, \
399
+ extra_discrimination...)
400
+
401
+ #define __ptrauth_objc_isa_pointer
402
+ #define __ptrauth_objc_isa_uintptr
403
+ #define __ptrauth_objc_super_pointer
404
+
405
+ #endif /* __has_feature(ptrauth_intrinsics) || defined(__PTRAUTH__) */
406
+
407
+ #endif /* __PTRAUTH_H */
@@ -0,0 +1,37 @@
1
+ /*===------------ ptwriteintrin.h - PTWRITE 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 <ptwriteintrin.h> directly; include <x86intrin.h> instead."
12
+ #endif
13
+
14
+ #ifndef __PTWRITEINTRIN_H
15
+ #define __PTWRITEINTRIN_H
16
+
17
+ /* Define the default attributes for the functions in this file. */
18
+ #define __DEFAULT_FN_ATTRS \
19
+ __attribute__((__always_inline__, __nodebug__, __target__("ptwrite")))
20
+
21
+ static __inline__ void __DEFAULT_FN_ATTRS
22
+ _ptwrite32(unsigned int __value) {
23
+ __builtin_ia32_ptwrite32(__value);
24
+ }
25
+
26
+ #ifdef __x86_64__
27
+
28
+ static __inline__ void __DEFAULT_FN_ATTRS
29
+ _ptwrite64(unsigned long long __value) {
30
+ __builtin_ia32_ptwrite64(__value);
31
+ }
32
+
33
+ #endif /* __x86_64__ */
34
+
35
+ #undef __DEFAULT_FN_ATTRS
36
+
37
+ #endif /* __PTWRITEINTRIN_H */