llvm-runtime-resources-darwin 0.0.0 → 23.1.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 (372) 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 +236 -0
  6. package/include/__clang_cuda_device_functions.h +1572 -0
  7. package/include/__clang_cuda_intrinsics.h +975 -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 +289 -0
  11. package/include/__clang_cuda_runtime_wrapper.h +526 -0
  12. package/include/__clang_cuda_texture_intrinsics.h +1177 -0
  13. package/include/__clang_gpu_builtin_vars.h +71 -0
  14. package/include/__clang_gpu_device_functions.h +411 -0
  15. package/include/__clang_gpu_intrinsics.h +242 -0
  16. package/include/__clang_hip_cmath.h +848 -0
  17. package/include/__clang_hip_libdevice_declares.h +238 -0
  18. package/include/__clang_hip_math.h +1405 -0
  19. package/include/__clang_hip_runtime_wrapper.h +170 -0
  20. package/include/__clang_hip_stdlib.h +43 -0
  21. package/include/__clang_spirv_builtins.h +217 -0
  22. package/include/__clang_spirv_libdevice_declares.h +170 -0
  23. package/include/__clang_spirv_math.h +719 -0
  24. package/include/__float_float.h +176 -0
  25. package/include/__float_header_macro.h +12 -0
  26. package/include/__float_infinity_nan.h +20 -0
  27. package/include/__stdarg___gnuc_va_list.h +13 -0
  28. package/include/__stdarg___va_copy.h +12 -0
  29. package/include/__stdarg_header_macro.h +12 -0
  30. package/include/__stdarg_va_arg.h +22 -0
  31. package/include/__stdarg_va_copy.h +12 -0
  32. package/include/__stdarg_va_list.h +13 -0
  33. package/include/__stddef_header_macro.h +12 -0
  34. package/include/__stddef_max_align_t.h +27 -0
  35. package/include/__stddef_null.h +29 -0
  36. package/include/__stddef_nullptr_t.h +29 -0
  37. package/include/__stddef_offsetof.h +17 -0
  38. package/include/__stddef_ptrdiff_t.h +20 -0
  39. package/include/__stddef_rsize_t.h +20 -0
  40. package/include/__stddef_size_t.h +20 -0
  41. package/include/__stddef_unreachable.h +21 -0
  42. package/include/__stddef_wchar_t.h +28 -0
  43. package/include/__stddef_wint_t.h +15 -0
  44. package/include/__wmmintrin_aes.h +140 -0
  45. package/include/__wmmintrin_pclmul.h +48 -0
  46. package/include/adcintrin.h +165 -0
  47. package/include/adxintrin.h +107 -0
  48. package/include/altivec.h +19434 -0
  49. package/include/amdgpuintrin.h +164 -0
  50. package/include/amdhsa_abi.h +83 -0
  51. package/include/ammintrin.h +183 -0
  52. package/include/amo.h +220 -0
  53. package/include/amxavx512intrin.h +596 -0
  54. package/include/amxcomplexintrin.h +167 -0
  55. package/include/amxfp16intrin.h +93 -0
  56. package/include/amxfp8intrin.h +230 -0
  57. package/include/amxintrin.h +492 -0
  58. package/include/amxmovrsintrin.h +48 -0
  59. package/include/andes_vector.h +21 -0
  60. package/include/arm64_neon.h +21 -0
  61. package/include/arm64intr.h +45 -0
  62. package/include/arm_acle.h +866 -0
  63. package/include/arm_bf16.h +20 -0
  64. package/include/arm_cde.h +410 -0
  65. package/include/arm_cmse.h +217 -0
  66. package/include/arm_fp16.h +596 -0
  67. package/include/arm_mve.h +19187 -0
  68. package/include/arm_neon.h +74351 -0
  69. package/include/arm_neon_sve_bridge.h +182 -0
  70. package/include/arm_sme.h +3753 -0
  71. package/include/arm_sve.h +32698 -0
  72. package/include/arm_vector_types.h +432 -0
  73. package/include/armintr.h +31 -0
  74. package/include/avx10_2_512bf16intrin.h +568 -0
  75. package/include/avx10_2_512convertintrin.h +322 -0
  76. package/include/avx10_2_512minmaxintrin.h +127 -0
  77. package/include/avx10_2_512niintrin.h +314 -0
  78. package/include/avx10_2_512satcvtdsintrin.h +307 -0
  79. package/include/avx10_2_512satcvtintrin.h +301 -0
  80. package/include/avx10_2bf16intrin.h +1094 -0
  81. package/include/avx10_2convertintrin.h +3257 -0
  82. package/include/avx10_2copyintrin.h +66 -0
  83. package/include/avx10_2minmaxintrin.h +232 -0
  84. package/include/avx10_2niintrin.h +409 -0
  85. package/include/avx10_2satcvtdsintrin.h +376 -0
  86. package/include/avx10_2satcvtintrin.h +312 -0
  87. package/include/avx2intrin.h +5190 -0
  88. package/include/avx512bf16intrin.h +292 -0
  89. package/include/avx512bitalgintrin.h +75 -0
  90. package/include/avx512bmmintrin.h +174 -0
  91. package/include/avx512bmmvlintrin.h +245 -0
  92. package/include/avx512bwintrin.h +1885 -0
  93. package/include/avx512cdintrin.h +112 -0
  94. package/include/avx512dqintrin.h +1350 -0
  95. package/include/avx512fintrin.h +9351 -0
  96. package/include/avx512fp16intrin.h +3349 -0
  97. package/include/avx512ifmaintrin.h +68 -0
  98. package/include/avx512ifmavlintrin.h +138 -0
  99. package/include/avx512vbmi2intrin.h +364 -0
  100. package/include/avx512vbmiintrin.h +98 -0
  101. package/include/avx512vbmivlintrin.h +179 -0
  102. package/include/avx512vlbf16intrin.h +527 -0
  103. package/include/avx512vlbitalgintrin.h +135 -0
  104. package/include/avx512vlbwintrin.h +3052 -0
  105. package/include/avx512vlcdintrin.h +202 -0
  106. package/include/avx512vldqintrin.h +1156 -0
  107. package/include/avx512vlfp16intrin.h +2090 -0
  108. package/include/avx512vlintrin.h +8067 -0
  109. package/include/avx512vlvbmi2intrin.h +702 -0
  110. package/include/avx512vlvnniintrin.h +308 -0
  111. package/include/avx512vlvp2intersectintrin.h +123 -0
  112. package/include/avx512vnniintrin.h +113 -0
  113. package/include/avx512vp2intersectintrin.h +77 -0
  114. package/include/avx512vpopcntdqintrin.h +62 -0
  115. package/include/avx512vpopcntdqvlintrin.h +105 -0
  116. package/include/avxifmaintrin.h +193 -0
  117. package/include/avxintrin.h +5064 -0
  118. package/include/avxneconvertintrin.h +484 -0
  119. package/include/avxvnniint16intrin.h +451 -0
  120. package/include/avxvnniint8intrin.h +454 -0
  121. package/include/avxvnniintrin.h +238 -0
  122. package/include/bmi2intrin.h +253 -0
  123. package/include/bmiintrin.h +604 -0
  124. package/include/builtins.h +19 -0
  125. package/include/cet.h +66 -0
  126. package/include/cetintrin.h +115 -0
  127. package/include/cldemoteintrin.h +36 -0
  128. package/include/clflushoptintrin.h +36 -0
  129. package/include/clwbintrin.h +38 -0
  130. package/include/clzerointrin.h +38 -0
  131. package/include/cmpccxaddintrin.h +70 -0
  132. package/include/cpuid.h +451 -0
  133. package/include/crc32intrin.h +102 -0
  134. package/include/cuda_wrappers/__utility/declval.h +28 -0
  135. package/include/cuda_wrappers/algorithm +116 -0
  136. package/include/cuda_wrappers/bits/basic_string.h +9 -0
  137. package/include/cuda_wrappers/bits/basic_string.tcc +9 -0
  138. package/include/cuda_wrappers/bits/c++config.h +61 -0
  139. package/include/cuda_wrappers/bits/shared_ptr_base.h +9 -0
  140. package/include/cuda_wrappers/cmath +44 -0
  141. package/include/cuda_wrappers/complex +90 -0
  142. package/include/cuda_wrappers/new +108 -0
  143. package/include/emmintrin.h +4940 -0
  144. package/include/endian.h +91 -0
  145. package/include/enqcmdintrin.h +63 -0
  146. package/include/f16cintrin.h +176 -0
  147. package/include/float.h +48 -0
  148. package/include/fma4intrin.h +220 -0
  149. package/include/fmaintrin.h +826 -0
  150. package/include/fuzzer/FuzzedDataProvider.h +397 -0
  151. package/include/fxsrintrin.h +91 -0
  152. package/include/gfniintrin.h +238 -0
  153. package/include/gpuintrin.h +348 -0
  154. package/include/hexagon_circ_brev_intrinsics.h +298 -0
  155. package/include/hexagon_protos.h +8439 -0
  156. package/include/hexagon_types.h +2628 -0
  157. package/include/hlsl_alias_intrinsics_gen.inc +3869 -0
  158. package/include/hlsl_inline_intrinsics_gen.inc +546 -0
  159. package/include/hresetintrin.h +49 -0
  160. package/include/htmintrin.h +212 -0
  161. package/include/htmxlintrin.h +345 -0
  162. package/include/hvx_hexagon_protos.h +5421 -0
  163. package/include/ia32intrin.h +863 -0
  164. package/include/immintrin.h +597 -0
  165. package/include/intrin.h +501 -0
  166. package/include/intrin0.h +256 -0
  167. package/include/inttypes.h +101 -0
  168. package/include/invpcidintrin.h +23 -0
  169. package/include/iso646.h +31 -0
  170. package/include/keylockerintrin.h +518 -0
  171. package/include/larchintrin.h +262 -0
  172. package/include/lasxintrin.h +3999 -0
  173. package/include/limits.h +133 -0
  174. package/include/llvm_libc_wrappers/assert.h +32 -0
  175. package/include/llvm_libc_wrappers/ctype.h +29 -0
  176. package/include/llvm_libc_wrappers/inttypes.h +32 -0
  177. package/include/llvm_libc_wrappers/stdio.h +52 -0
  178. package/include/llvm_libc_wrappers/stdlib.h +32 -0
  179. package/include/llvm_libc_wrappers/string.h +29 -0
  180. package/include/llvm_libc_wrappers/time.h +28 -0
  181. package/include/llvm_offload_wrappers/__llvm_offload.h +31 -0
  182. package/include/llvm_offload_wrappers/__llvm_offload_device.h +10 -0
  183. package/include/llvm_offload_wrappers/__llvm_offload_host.h +15 -0
  184. package/include/lsxintrin.h +3752 -0
  185. package/include/lwpintrin.h +136 -0
  186. package/include/lzcntintrin.h +109 -0
  187. package/include/mm3dnow.h +22 -0
  188. package/include/mm_malloc.h +67 -0
  189. package/include/mmintrin.h +1541 -0
  190. package/include/module.modulemap +375 -0
  191. package/include/movdirintrin.h +49 -0
  192. package/include/movrs_avx10_2_512intrin.h +98 -0
  193. package/include/movrs_avx10_2intrin.h +174 -0
  194. package/include/movrsintrin.h +59 -0
  195. package/include/msa.h +573 -0
  196. package/include/mwaitxintrin.h +62 -0
  197. package/include/nmmintrin.h +20 -0
  198. package/include/nvptxintrin.h +208 -0
  199. package/include/opencl-c-base.h +765 -0
  200. package/include/opencl-c.h +18737 -0
  201. package/include/openmp_wrappers/__clang_openmp_device_functions.h +118 -0
  202. package/include/openmp_wrappers/cmath +132 -0
  203. package/include/openmp_wrappers/complex +61 -0
  204. package/include/openmp_wrappers/complex.h +41 -0
  205. package/include/openmp_wrappers/complex_cmath.h +393 -0
  206. package/include/openmp_wrappers/math.h +71 -0
  207. package/include/openmp_wrappers/new +48 -0
  208. package/include/pconfigintrin.h +40 -0
  209. package/include/pkuintrin.h +34 -0
  210. package/include/pmmintrin.h +302 -0
  211. package/include/popcntintrin.h +59 -0
  212. package/include/ppc_wrappers/bmi2intrin.h +134 -0
  213. package/include/ppc_wrappers/bmiintrin.h +165 -0
  214. package/include/ppc_wrappers/emmintrin.h +2269 -0
  215. package/include/ppc_wrappers/immintrin.h +27 -0
  216. package/include/ppc_wrappers/mm_malloc.h +45 -0
  217. package/include/ppc_wrappers/mmintrin.h +1453 -0
  218. package/include/ppc_wrappers/nmmintrin.h +26 -0
  219. package/include/ppc_wrappers/pmmintrin.h +145 -0
  220. package/include/ppc_wrappers/smmintrin.h +683 -0
  221. package/include/ppc_wrappers/tmmintrin.h +453 -0
  222. package/include/ppc_wrappers/x86gprintrin.h +17 -0
  223. package/include/ppc_wrappers/x86intrin.h +28 -0
  224. package/include/ppc_wrappers/xmmintrin.h +1827 -0
  225. package/include/prfchiintrin.h +61 -0
  226. package/include/prfchwintrin.h +57 -0
  227. package/include/profile/InstrProfData.inc +1063 -0
  228. package/include/profile/instr_prof_interface.h +88 -0
  229. package/include/ptrauth.h +485 -0
  230. package/include/ptwriteintrin.h +37 -0
  231. package/include/raointintrin.h +203 -0
  232. package/include/rdpruintrin.h +57 -0
  233. package/include/rdseedintrin.h +105 -0
  234. package/include/riscv_bitmanip.h +202 -0
  235. package/include/riscv_corev_alu.h +130 -0
  236. package/include/riscv_crypto.h +178 -0
  237. package/include/riscv_mips.h +36 -0
  238. package/include/riscv_nds.h +92 -0
  239. package/include/riscv_ntlh.h +28 -0
  240. package/include/riscv_packed_simd.h +644 -0
  241. package/include/riscv_vector.h +465 -0
  242. package/include/rtmintrin.h +45 -0
  243. package/include/s390intrin.h +25 -0
  244. package/include/sanitizer/allocator_interface.h +106 -0
  245. package/include/sanitizer/asan_interface.h +398 -0
  246. package/include/sanitizer/common_interface_defs.h +507 -0
  247. package/include/sanitizer/coverage_interface.h +36 -0
  248. package/include/sanitizer/dfsan_interface.h +220 -0
  249. package/include/sanitizer/hwasan_interface.h +109 -0
  250. package/include/sanitizer/linux_syscall_hooks.h +3112 -0
  251. package/include/sanitizer/lsan_interface.h +89 -0
  252. package/include/sanitizer/msan_interface.h +135 -0
  253. package/include/sanitizer/netbsd_syscall_hooks.h +5005 -0
  254. package/include/sanitizer/rtsan_interface.h +75 -0
  255. package/include/sanitizer/safestack_interface.h +50 -0
  256. package/include/sanitizer/scudo_interface.h +38 -0
  257. package/include/sanitizer/tsan_interface.h +316 -0
  258. package/include/sanitizer/tsan_interface_atomic.h +223 -0
  259. package/include/sanitizer/tysan_interface.h +36 -0
  260. package/include/sanitizer/ubsan_interface.h +64 -0
  261. package/include/serializeintrin.h +30 -0
  262. package/include/sgxintrin.h +60 -0
  263. package/include/sha512intrin.h +200 -0
  264. package/include/shaintrin.h +190 -0
  265. package/include/sifive_vector.h +192 -0
  266. package/include/sm3intrin.h +238 -0
  267. package/include/sm4evexintrin.h +32 -0
  268. package/include/sm4intrin.h +269 -0
  269. package/include/smmintrin.h +2352 -0
  270. package/include/spirvintrin.h +167 -0
  271. package/include/stdalign.h +24 -0
  272. package/include/stdarg.h +75 -0
  273. package/include/stdatomic.h +204 -0
  274. package/include/stdbool.h +39 -0
  275. package/include/stdckdint.h +42 -0
  276. package/include/stdcountof.h +15 -0
  277. package/include/stddef.h +139 -0
  278. package/include/stddefer.h +19 -0
  279. package/include/stdint.h +835 -0
  280. package/include/stdnoreturn.h +35 -0
  281. package/include/tbmintrin.h +128 -0
  282. package/include/tgmath.h +1368 -0
  283. package/include/tmmintrin.h +779 -0
  284. package/include/tsxldtrkintrin.h +56 -0
  285. package/include/uintrintrin.h +157 -0
  286. package/include/unwind.h +332 -0
  287. package/include/usermsrintrin.h +51 -0
  288. package/include/vadefs.h +51 -0
  289. package/include/vaesintrin.h +86 -0
  290. package/include/varargs.h +16 -0
  291. package/include/vecintrin.h +12868 -0
  292. package/include/velintrin.h +71 -0
  293. package/include/velintrin_approx.h +120 -0
  294. package/include/velintrin_gen.h +1257 -0
  295. package/include/vpclmulqdqintrin.h +30 -0
  296. package/include/waitpkgintrin.h +42 -0
  297. package/include/wasm_simd128.h +2160 -0
  298. package/include/wbnoinvdintrin.h +24 -0
  299. package/include/wmmintrin.h +23 -0
  300. package/include/x86gprintrin.h +49 -0
  301. package/include/x86intrin.h +35 -0
  302. package/include/xmmintrin.h +3176 -0
  303. package/include/xopintrin.h +780 -0
  304. package/include/xsavecintrin.h +84 -0
  305. package/include/xsaveintrin.h +63 -0
  306. package/include/xsaveoptintrin.h +34 -0
  307. package/include/xsavesintrin.h +44 -0
  308. package/include/xtestintrin.h +27 -0
  309. package/include/yvals_core.h +25 -0
  310. package/include/zos_wrappers/builtins.h +18 -0
  311. package/include/zos_wrappers/grp.h +19 -0
  312. package/include/zos_wrappers/locale.h +19 -0
  313. package/include/zos_wrappers/math.h +31 -0
  314. package/include/zos_wrappers/poll.h +19 -0
  315. package/include/zos_wrappers/stdlib.h +20 -0
  316. package/include/zos_wrappers/string.h +19 -0
  317. package/include/zos_wrappers/time.h +19 -0
  318. package/include/zos_wrappers/variant.h +19 -0
  319. package/index.js +5 -0
  320. package/lib/darwin/libclang_rt.asan_abi_ios.a +0 -0
  321. package/lib/darwin/libclang_rt.asan_abi_iossim.a +0 -0
  322. package/lib/darwin/libclang_rt.asan_abi_osx.a +0 -0
  323. package/lib/darwin/libclang_rt.asan_ios_dynamic.dylib +0 -0
  324. package/lib/darwin/libclang_rt.asan_iossim_dynamic.dylib +0 -0
  325. package/lib/darwin/libclang_rt.asan_osx_dynamic.dylib +0 -0
  326. package/lib/darwin/libclang_rt.cc_kext.a +0 -0
  327. package/lib/darwin/libclang_rt.cc_kext_ios.a +0 -0
  328. package/lib/darwin/libclang_rt.fuzzer_interceptors_ios.a +0 -0
  329. package/lib/darwin/libclang_rt.fuzzer_interceptors_iossim.a +0 -0
  330. package/lib/darwin/libclang_rt.fuzzer_interceptors_osx.a +0 -0
  331. package/lib/darwin/libclang_rt.fuzzer_ios.a +0 -0
  332. package/lib/darwin/libclang_rt.fuzzer_iossim.a +0 -0
  333. package/lib/darwin/libclang_rt.fuzzer_no_main_ios.a +0 -0
  334. package/lib/darwin/libclang_rt.fuzzer_no_main_iossim.a +0 -0
  335. package/lib/darwin/libclang_rt.fuzzer_no_main_osx.a +0 -0
  336. package/lib/darwin/libclang_rt.fuzzer_osx.a +0 -0
  337. package/lib/darwin/libclang_rt.ios.a +0 -0
  338. package/lib/darwin/libclang_rt.iossim.a +0 -0
  339. package/lib/darwin/libclang_rt.lsan_ios_dynamic.dylib +0 -0
  340. package/lib/darwin/libclang_rt.lsan_iossim_dynamic.dylib +0 -0
  341. package/lib/darwin/libclang_rt.lsan_osx_dynamic.dylib +0 -0
  342. package/lib/darwin/libclang_rt.osx.a +0 -0
  343. package/lib/darwin/libclang_rt.profile_ios.a +0 -0
  344. package/lib/darwin/libclang_rt.profile_iossim.a +0 -0
  345. package/lib/darwin/libclang_rt.profile_osx.a +0 -0
  346. package/lib/darwin/libclang_rt.rtsan_ios_dynamic.dylib +0 -0
  347. package/lib/darwin/libclang_rt.rtsan_iossim_dynamic.dylib +0 -0
  348. package/lib/darwin/libclang_rt.rtsan_osx_dynamic.dylib +0 -0
  349. package/lib/darwin/libclang_rt.stats_client_ios.a +0 -0
  350. package/lib/darwin/libclang_rt.stats_client_iossim.a +0 -0
  351. package/lib/darwin/libclang_rt.stats_client_osx.a +0 -0
  352. package/lib/darwin/libclang_rt.stats_ios_dynamic.dylib +0 -0
  353. package/lib/darwin/libclang_rt.stats_iossim_dynamic.dylib +0 -0
  354. package/lib/darwin/libclang_rt.stats_osx_dynamic.dylib +0 -0
  355. package/lib/darwin/libclang_rt.tsan_ios_dynamic.dylib +0 -0
  356. package/lib/darwin/libclang_rt.tsan_iossim_dynamic.dylib +0 -0
  357. package/lib/darwin/libclang_rt.tsan_osx_dynamic.dylib +0 -0
  358. package/lib/darwin/libclang_rt.tysan_ios_dynamic.dylib +0 -0
  359. package/lib/darwin/libclang_rt.tysan_iossim_dynamic.dylib +0 -0
  360. package/lib/darwin/libclang_rt.tysan_osx_dynamic.dylib +0 -0
  361. package/lib/darwin/libclang_rt.ubsan_ios_dynamic.dylib +0 -0
  362. package/lib/darwin/libclang_rt.ubsan_iossim_dynamic.dylib +0 -0
  363. package/lib/darwin/libclang_rt.ubsan_minimal_ios.a +0 -0
  364. package/lib/darwin/libclang_rt.ubsan_minimal_ios_dynamic.dylib +0 -0
  365. package/lib/darwin/libclang_rt.ubsan_minimal_iossim.a +0 -0
  366. package/lib/darwin/libclang_rt.ubsan_minimal_iossim_dynamic.dylib +0 -0
  367. package/lib/darwin/libclang_rt.ubsan_minimal_osx.a +0 -0
  368. package/lib/darwin/libclang_rt.ubsan_minimal_osx_dynamic.dylib +0 -0
  369. package/lib/darwin/libclang_rt.ubsan_osx_dynamic.dylib +0 -0
  370. package/package.json +40 -1
  371. package/share/asan_ignorelist.txt +14 -0
  372. 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,485 @@
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 pointers to C++ v-tables. */
42
+ ptrauth_key_cxx_vtable_pointer = ptrauth_key_process_independent_data,
43
+
44
+ /* The key used to sign metadata pointers to Objective-C method-lists. */
45
+ ptrauth_key_method_list_pointer = ptrauth_key_asda,
46
+
47
+ /* The key used to sign Objective-C isa and super pointers. */
48
+ ptrauth_key_objc_isa_pointer = ptrauth_key_process_independent_data,
49
+ ptrauth_key_objc_super_pointer = ptrauth_key_process_independent_data,
50
+
51
+ /* The key used to sign selector pointers */
52
+ ptrauth_key_objc_sel_pointer = ptrauth_key_process_dependent_data,
53
+
54
+ /* The key used to sign Objective-C class_ro_t pointers. */
55
+ ptrauth_key_objc_class_ro_pointer = ptrauth_key_process_independent_data,
56
+
57
+ /* The key used to sign pointers in ELF .init_array/.fini_array. */
58
+ ptrauth_key_init_fini_pointer = ptrauth_key_process_independent_code,
59
+
60
+ /* Other pointers signed under the ABI use private ABI rules. */
61
+
62
+ } ptrauth_key;
63
+
64
+ /* An integer type of the appropriate size for a discriminator argument. */
65
+ typedef __UINTPTR_TYPE__ ptrauth_extra_data_t;
66
+
67
+ /* An integer type of the appropriate size for a generic signature. */
68
+ typedef __UINTPTR_TYPE__ ptrauth_generic_signature_t;
69
+
70
+ /* A signed pointer value embeds the original pointer together with
71
+ a signature that attests to the validity of that pointer. Because
72
+ this signature must use only "spare" bits of the pointer, a
73
+ signature's validity is probabilistic in practice: it is unlikely
74
+ but still plausible that an invalidly-derived signature will
75
+ somehow equal the correct signature and therefore successfully
76
+ authenticate. Nonetheless, this scheme provides a strong degree
77
+ of protection against certain kinds of attacks. */
78
+
79
+ /* Authenticating a pointer that was not signed with the given key
80
+ and extra-data value will (likely) fail by trapping. */
81
+
82
+ /* The null function pointer is always the all-zero bit pattern.
83
+ Signing an all-zero bit pattern will embed a (likely) non-zero
84
+ signature in the result, and so the result will not seem to be
85
+ a null function pointer. Authenticating this value will yield
86
+ a null function pointer back. However, authenticating an
87
+ all-zero bit pattern will probably fail, because the
88
+ authentication will expect a (likely) non-zero signature to
89
+ embedded in the value.
90
+
91
+ Because of this, if a pointer may validly be null, you should
92
+ check for null before attempting to authenticate it with one
93
+ of these intrinsics. This is not necessary when using the
94
+ __ptrauth qualifier; the compiler will perform this check
95
+ automatically. */
96
+
97
+ #if __has_feature(ptrauth_intrinsics) || defined(__PTRAUTH__)
98
+
99
+ /* Strip the signature from a value without authenticating it.
100
+
101
+ If the value is a function pointer, the result will not be a
102
+ legal function pointer because of the missing signature, and
103
+ attempting to call it will result in an authentication failure.
104
+
105
+ The value must be an expression of pointer type.
106
+ The key must be a constant expression of type ptrauth_key.
107
+ The result will have the same type as the original value. */
108
+ #define ptrauth_strip(__value, __key) __builtin_ptrauth_strip(__value, __key)
109
+
110
+ /* Blend a constant discriminator into the given pointer-like value
111
+ to form a new discriminator. Not all bits of the inputs are
112
+ guaranteed to contribute to the result.
113
+
114
+ On arm64e, the integer must fall within the range of a uint16_t;
115
+ other bits may be ignored.
116
+
117
+ For the purposes of ptrauth_sign_constant, the result of calling
118
+ this function is considered a constant expression if the arguments
119
+ are constant. Some restrictions may be imposed on the pointer.
120
+
121
+ The first argument must be an expression of pointer type.
122
+ The second argument must be an expression of integer type.
123
+ The result will have type uintptr_t. */
124
+ #define ptrauth_blend_discriminator(__pointer, __integer) \
125
+ __builtin_ptrauth_blend_discriminator(__pointer, __integer)
126
+
127
+ /* Return a signed pointer for a constant address in a manner which guarantees
128
+ a non-attackable sequence.
129
+
130
+ The value must be a constant expression of pointer type which evaluates to
131
+ a non-null pointer.
132
+ The key must be a constant expression of type ptrauth_key.
133
+ The extra data must be a constant expression of pointer or integer type;
134
+ if an integer, it will be coerced to ptrauth_extra_data_t.
135
+ The result will have the same type as the original value.
136
+
137
+ This can be used in constant expressions. */
138
+ #define ptrauth_sign_constant(__value, __key, __data) \
139
+ __builtin_ptrauth_sign_constant(__value, __key, __data)
140
+
141
+ /* Add a signature to the given pointer value using a specific key,
142
+ using the given extra data as a salt to the signing process.
143
+
144
+ This operation does not authenticate the original value and is
145
+ therefore potentially insecure if an attacker could possibly
146
+ control that value.
147
+
148
+ The value must be an expression of pointer type.
149
+ The key must be a constant expression of type ptrauth_key.
150
+ The extra data must be an expression of pointer or integer type;
151
+ if an integer, it will be coerced to ptrauth_extra_data_t.
152
+ The result will have the same type as the original value. */
153
+ #define ptrauth_sign_unauthenticated(__value, __key, __data) \
154
+ __builtin_ptrauth_sign_unauthenticated(__value, __key, __data)
155
+
156
+ /* Authenticate a pointer using one scheme and resign it using another.
157
+
158
+ If the result is subsequently authenticated using the new scheme, that
159
+ authentication is guaranteed to fail if and only if the initial
160
+ authentication failed.
161
+
162
+ The value must be an expression of pointer type.
163
+ The key must be a constant expression of type ptrauth_key.
164
+ The extra data must be an expression of pointer or integer type;
165
+ if an integer, it will be coerced to ptrauth_extra_data_t.
166
+ The result will have the same type as the original value.
167
+
168
+ This operation is guaranteed to not leave the intermediate value
169
+ available for attack before it is re-signed.
170
+
171
+ Do not pass a null pointer to this function. A null pointer
172
+ will not successfully authenticate.
173
+
174
+ This operation traps if the authentication fails. */
175
+ #define ptrauth_auth_and_resign(__value, __old_key, __old_data, __new_key, \
176
+ __new_data) \
177
+ __builtin_ptrauth_auth_and_resign(__value, __old_key, __old_data, __new_key, \
178
+ __new_data)
179
+
180
+ /* Authenticate a pointer using a PC-based signature scheme and resign
181
+ it using a different scheme.
182
+
183
+ If the result is subsequently authenticated using the new scheme, that
184
+ authentication is guaranteed to fail if and only if the initial
185
+ authentication failed.
186
+
187
+ The value must be an expression of pointer type.
188
+ The key must be a constant expression of type ptrauth_key.
189
+ The extra data must be an expression of pointer or integer type;
190
+ if an integer, it will be coerced to ptrauth_extra_data_t.
191
+ The oldpc must be an expression of pointer or integer type representing
192
+ the PC value where the original signature was created.
193
+ The result will have the same type as the original value.
194
+
195
+ This operation is guaranteed to not leave the intermediate value
196
+ available for attack before it is re-signed.
197
+
198
+ Do not pass a null pointer to this function. A null pointer
199
+ will not successfully authenticate. */
200
+ #define ptrauth_auth_with_pc_and_resign(__value, __old_key, __old_data, \
201
+ __old_pc, __new_key, __new_data) \
202
+ __builtin_ptrauth_auth_with_pc_and_resign(__value, __old_key, __old_data, \
203
+ __old_pc, __new_key, __new_data)
204
+
205
+ /* Authenticate a pointer using one scheme, load 32bit value at offset addend
206
+ from the pointer, and add this value to the pointer, sign using specified
207
+ scheme.
208
+
209
+ If the result is subsequently authenticated using the new scheme, that
210
+ authentication is guaranteed to fail if and only if the initial
211
+ authentication failed.
212
+
213
+ The value must be an expression of pointer type.
214
+ The key must be a constant expression of type ptrauth_key.
215
+ The extra data must be an expression of pointer or integer type;
216
+ if an integer, it will be coerced to ptrauth_extra_data_t.
217
+ The addend must be an immediate ptrdiff_t value.
218
+ The result will have the same type as the original value.
219
+
220
+ This operation is guaranteed to not leave the intermediate value
221
+ available for attack before it is re-signed.
222
+
223
+ Do not pass a null pointer to this function. A null pointer
224
+ will not successfully authenticate. */
225
+ #define ptrauth_auth_load_relative_and_sign(__value, __old_key, __old_data, \
226
+ __new_key, __new_data, __offset) \
227
+ __builtin_ptrauth_auth_load_relative_and_sign( \
228
+ __value, __old_key, __old_data, __new_key, __new_data, __offset)
229
+
230
+ /* Authenticate a pointer using one scheme and resign it as a C
231
+ function pointer.
232
+
233
+ If the result is subsequently authenticated using the new scheme, that
234
+ authentication is guaranteed to fail if and only if the initial
235
+ authentication failed.
236
+
237
+ The value must be an expression of function pointer type.
238
+ The key must be a constant expression of type ptrauth_key.
239
+ The extra data must be an expression of pointer or integer type;
240
+ if an integer, it will be coerced to ptrauth_extra_data_t.
241
+ The result will have the same type as the original value.
242
+
243
+ This operation is guaranteed to not leave the intermediate value
244
+ available for attack before it is re-signed. Additionally, if this
245
+ expression is used syntactically as the function expression in a
246
+ call, only a single authentication will be performed. */
247
+ #define ptrauth_auth_function(__value, __old_key, __old_data) \
248
+ ptrauth_auth_and_resign(__value, __old_key, __old_data, \
249
+ ptrauth_key_function_pointer, 0)
250
+
251
+ /* Authenticate a data pointer.
252
+
253
+ The value must be an expression of non-function pointer type.
254
+ The key must be a constant expression of type ptrauth_key.
255
+ The extra data must be an expression of pointer or integer type;
256
+ if an integer, it will be coerced to ptrauth_extra_data_t.
257
+ The result will have the same type as the original value.
258
+
259
+ This operation traps if the authentication fails. */
260
+ #define ptrauth_auth_data(__value, __old_key, __old_data) \
261
+ __builtin_ptrauth_auth(__value, __old_key, __old_data)
262
+
263
+ /* Compute a constant discriminator from the given string.
264
+
265
+ The argument must be a string literal of char character type. The result
266
+ has type ptrauth_extra_data_t.
267
+
268
+ The result value is never zero and always within range for both the
269
+ __ptrauth qualifier and ptrauth_blend_discriminator.
270
+
271
+ This can be used in constant expressions.
272
+ */
273
+ #define ptrauth_string_discriminator(__string) \
274
+ __builtin_ptrauth_string_discriminator(__string)
275
+
276
+ /* Compute a constant discriminator from the given type.
277
+
278
+ The result can be used as the second argument to
279
+ ptrauth_blend_discriminator or the third argument to the
280
+ __ptrauth qualifier. It has type size_t.
281
+
282
+ If the type is a C++ member function pointer type, the result is
283
+ the discriminator used to signed member function pointers of that
284
+ type. If the type is a function, function pointer, or function
285
+ reference type, the result is the discriminator used to sign
286
+ functions of that type. It is ill-formed to use this macro with any
287
+ other type.
288
+
289
+ A call to this function is an integer constant expression. */
290
+ #define ptrauth_type_discriminator(__type) \
291
+ __builtin_ptrauth_type_discriminator(__type)
292
+
293
+ /* Compute the constant discriminator used by Clang to sign pointers with the
294
+ given C function pointer type.
295
+
296
+ A call to this function is an integer constant expression. */
297
+ #if __has_feature(ptrauth_function_pointer_type_discrimination)
298
+ #define ptrauth_function_pointer_type_discriminator(__type) \
299
+ __builtin_ptrauth_type_discriminator(__type)
300
+ #else
301
+ #define ptrauth_function_pointer_type_discriminator(__type) \
302
+ ((ptrauth_extra_data_t)0)
303
+ #endif
304
+
305
+ /* Compute a signature for the given pair of pointer-sized values.
306
+ The order of the arguments is significant.
307
+
308
+ Like a pointer signature, the resulting signature depends on
309
+ private key data and therefore should not be reliably reproducible
310
+ by attackers. That means that this can be used to validate the
311
+ integrity of arbitrary data by storing a signature for that data
312
+ alongside it, then checking that the signature is still valid later.
313
+ Data which exceeds two pointers in size can be signed by either
314
+ computing a tree of generic signatures or just signing an ordinary
315
+ cryptographic hash of the data.
316
+
317
+ The result has type ptrauth_generic_signature_t. However, it may
318
+ not have as many bits of entropy as that type's width would suggest;
319
+ some implementations are known to compute a compressed signature as
320
+ if the arguments were a pointer and a discriminator.
321
+
322
+ The arguments must be either pointers or integers; if integers, they
323
+ will be coerce to uintptr_t. */
324
+ #define ptrauth_sign_generic_data(__value, __data) \
325
+ __builtin_ptrauth_sign_generic_data(__value, __data)
326
+
327
+ /* C++ vtable pointer signing class attribute */
328
+ #define ptrauth_cxx_vtable_pointer(key, address_discrimination, \
329
+ extra_discrimination...) \
330
+ [[clang::ptrauth_vtable_pointer(key, address_discrimination, \
331
+ extra_discrimination)]]
332
+
333
+ /* The value is ptrauth_string_discriminator("init_fini") */
334
+ #define __ptrauth_init_fini_discriminator 0xd9d4
335
+
336
+ /* Objective-C pointer auth ABI qualifiers */
337
+ #define __ptrauth_objc_method_list_imp \
338
+ __ptrauth(ptrauth_key_function_pointer, 1, 0)
339
+
340
+ #if __has_feature(ptrauth_objc_method_list_pointer)
341
+ #define __ptrauth_objc_method_list_pointer \
342
+ __ptrauth(ptrauth_key_method_list_pointer, 1, 0xC310)
343
+ #else
344
+ #define __ptrauth_objc_method_list_pointer
345
+ #endif
346
+
347
+ #define __ptrauth_isa_discriminator 0x6AE1
348
+ #define __ptrauth_super_discriminator 0xB5AB
349
+ #define __ptrauth_objc_isa_pointer \
350
+ __ptrauth(ptrauth_key_objc_isa_pointer, 1, __ptrauth_isa_discriminator)
351
+ #if __has_feature(ptrauth_restricted_intptr_qualifier)
352
+ #define __ptrauth_objc_isa_uintptr \
353
+ __ptrauth_restricted_intptr(ptrauth_key_objc_isa_pointer, 1, \
354
+ __ptrauth_isa_discriminator)
355
+ #else
356
+ #define __ptrauth_objc_isa_uintptr \
357
+ __ptrauth(ptrauth_key_objc_isa_pointer, 1, __ptrauth_isa_discriminator)
358
+ #endif
359
+
360
+ #define __ptrauth_objc_super_pointer \
361
+ __ptrauth(ptrauth_key_objc_super_pointer, 1, __ptrauth_super_discriminator)
362
+
363
+ #define __ptrauth_objc_sel_discriminator 0x57c2
364
+ #if __has_feature(ptrauth_objc_interface_sel)
365
+ #define __ptrauth_objc_sel \
366
+ __ptrauth(ptrauth_key_objc_sel_pointer, 1, __ptrauth_objc_sel_discriminator)
367
+ #else
368
+ #define __ptrauth_objc_sel
369
+ #endif
370
+
371
+ #define __ptrauth_objc_class_ro_discriminator 0x61f8
372
+ #define __ptrauth_objc_class_ro \
373
+ __ptrauth(ptrauth_key_objc_class_ro_pointer, 1, \
374
+ __ptrauth_objc_class_ro_discriminator)
375
+
376
+ #if __has_feature(ptrauth_init_fini_address_discrimination)
377
+ #define __ptrauth_init_fini_pointer \
378
+ __ptrauth(ptrauth_key_init_fini_pointer, 1, __ptrauth_init_fini_discriminator)
379
+ #else
380
+ #define __ptrauth_init_fini_pointer \
381
+ __ptrauth(ptrauth_key_init_fini_pointer, 0, __ptrauth_init_fini_discriminator)
382
+ #endif
383
+
384
+ #else
385
+
386
+ #define ptrauth_strip(__value, __key) \
387
+ __extension__({ \
388
+ (void)__key; \
389
+ __value; \
390
+ })
391
+
392
+ #define ptrauth_blend_discriminator(__pointer, __integer) \
393
+ __extension__({ \
394
+ (void)__pointer; \
395
+ (void)__integer; \
396
+ ((ptrauth_extra_data_t)0); \
397
+ })
398
+
399
+ #define ptrauth_sign_constant(__value, __key, __data) \
400
+ __extension__({ \
401
+ (void)__key; \
402
+ (void)__data; \
403
+ __value; \
404
+ })
405
+
406
+ #define ptrauth_sign_unauthenticated(__value, __key, __data) \
407
+ __extension__({ \
408
+ (void)__key; \
409
+ (void)__data; \
410
+ __value; \
411
+ })
412
+
413
+ #define ptrauth_auth_and_resign(__value, __old_key, __old_data, __new_key, \
414
+ __new_data) \
415
+ __extension__({ \
416
+ (void)__old_key; \
417
+ (void)__old_data; \
418
+ (void)__new_key; \
419
+ (void)__new_data; \
420
+ __value; \
421
+ })
422
+
423
+ #define ptrauth_auth_with_pc_and_resign(__value, __old_key, __old_data, \
424
+ __old_pc, __new_key, __new_data) \
425
+ __extension__({ \
426
+ (void)__old_key; \
427
+ (void)__old_data; \
428
+ (void)__old_pc; \
429
+ (void)__new_key; \
430
+ (void)__new_data; \
431
+ __value; \
432
+ })
433
+
434
+ #define ptrauth_auth_load_relative_and_sign(__value, __old_key, __old_data, \
435
+ __new_key, __new_data, __offset) \
436
+ __extension__({ \
437
+ (void)__old_key; \
438
+ (void)__old_data; \
439
+ (void)__new_key; \
440
+ (void)__new_data; \
441
+ const char *__value_tmp = (const char *)(__value); \
442
+ (void *)(__value_tmp + *(const int *)(__value_tmp + (__offset))); \
443
+ })
444
+
445
+ #define ptrauth_auth_function(__value, __old_key, __old_data) \
446
+ __extension__({ \
447
+ (void)__old_key; \
448
+ (void)__old_data; \
449
+ __value; \
450
+ })
451
+
452
+ #define ptrauth_auth_data(__value, __old_key, __old_data) \
453
+ __extension__({ \
454
+ (void)__old_key; \
455
+ (void)__old_data; \
456
+ __value; \
457
+ })
458
+
459
+ #define ptrauth_string_discriminator(__string) \
460
+ __extension__({ \
461
+ (void)__string; \
462
+ ((ptrauth_extra_data_t)0); \
463
+ })
464
+
465
+ #define ptrauth_type_discriminator(__type) ((ptrauth_extra_data_t)0)
466
+ #define ptrauth_function_pointer_type_discriminator(__type) \
467
+ ((ptrauth_extra_data_t)0)
468
+
469
+ #define ptrauth_sign_generic_data(__value, __data) \
470
+ __extension__({ \
471
+ (void)__value; \
472
+ (void)__data; \
473
+ ((ptrauth_generic_signature_t)0); \
474
+ })
475
+
476
+ #define ptrauth_cxx_vtable_pointer(key, address_discrimination, \
477
+ extra_discrimination...)
478
+
479
+ #define __ptrauth_objc_isa_pointer
480
+ #define __ptrauth_objc_isa_uintptr
481
+ #define __ptrauth_objc_super_pointer
482
+
483
+ #endif /* __has_feature(ptrauth_intrinsics) || defined(__PTRAUTH__) */
484
+
485
+ #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 */