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,518 @@
1
+ /*===----------------- keylockerintrin.h - KL Intrinsics -------------------===
2
+ *
3
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ * of this software and associated documentation files (the "Software"), to deal
5
+ * in the Software without restriction, including without limitation the rights
6
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ * copies of the Software, and to permit persons to whom the Software is
8
+ * furnished to do so, subject to the following conditions:
9
+ *
10
+ * The above copyright notice and this permission notice shall be included in
11
+ * all copies or substantial portions of the Software.
12
+ *
13
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ * THE SOFTWARE.
20
+ *
21
+ *===-----------------------------------------------------------------------===
22
+ */
23
+
24
+ #ifndef __IMMINTRIN_H
25
+ #error "Never use <keylockerintrin.h> directly; include <immintrin.h> instead."
26
+ #endif
27
+
28
+ #ifndef _KEYLOCKERINTRIN_H
29
+ #define _KEYLOCKERINTRIN_H
30
+
31
+ /* Define the default attributes for the functions in this file. */
32
+ #define __DEFAULT_FN_ATTRS \
33
+ __attribute__((__always_inline__, __nodebug__, __target__("kl"),\
34
+ __min_vector_width__(128)))
35
+
36
+ /// Load internal wrapping key from __intkey, __enkey_lo and __enkey_hi. __ctl
37
+ /// will assigned to EAX, whch specifies the KeySource and whether backing up
38
+ /// the key is permitted. The 256-bit encryption key is loaded from the two
39
+ /// explicit operands (__enkey_lo and __enkey_hi). The 128-bit integrity key is
40
+ /// loaded from the implicit operand XMM0 which assigned by __intkey.
41
+ ///
42
+ /// \headerfile <x86intrin.h>
43
+ ///
44
+ /// This intrinsic corresponds to the <c> LOADIWKEY </c> instructions.
45
+ ///
46
+ /// \code{.operation}
47
+ /// IF CPL > 0 // LOADKWKEY only allowed at ring 0 (supervisor mode)
48
+ /// GP (0)
49
+ /// FI
50
+ /// IF “LOADIWKEY exiting” VM execution control set
51
+ /// VMexit
52
+ /// FI
53
+ /// IF __ctl[4:1] > 1 // Reserved KeySource encoding used
54
+ /// GP (0)
55
+ /// FI
56
+ /// IF __ctl[31:5] != 0 // Reserved bit in __ctl is set
57
+ /// GP (0)
58
+ /// FI
59
+ /// IF __ctl[0] AND (CPUID.19H.ECX[0] == 0) // NoBackup is not supported on this part
60
+ /// GP (0)
61
+ /// FI
62
+ /// IF (__ctl[4:1] == 1) AND (CPUID.19H.ECX[1] == 0) // KeySource of 1 is not supported on this part
63
+ /// GP (0)
64
+ /// FI
65
+ /// IF (__ctl[4:1] == 0) // KeySource of 0.
66
+ /// IWKey.Encryption Key[127:0] := __enkey_hi[127:0]:
67
+ /// IWKey.Encryption Key[255:128] := __enkey_lo[127:0]
68
+ /// IWKey.IntegrityKey[127:0] := __intkey[127:0]
69
+ /// IWKey.NoBackup := __ctl[0]
70
+ /// IWKey.KeySource := __ctl[4:1]
71
+ /// ZF := 0
72
+ /// ELSE // KeySource of 1. See RDSEED definition for details of randomness
73
+ /// IF HW_NRND_GEN.ready == 1 // Full-entropy random data from RDSEED was received
74
+ /// IWKey.Encryption Key[127:0] := __enkey_hi[127:0] XOR HW_NRND_GEN.data[127:0]
75
+ /// IWKey.Encryption Key[255:128] := __enkey_lo[127:0] XOR HW_NRND_GEN.data[255:128]
76
+ /// IWKey.Encryption Key[255:0] := __enkey_hi[127:0]:__enkey_lo[127:0] XOR HW_NRND_GEN.data[255:0]
77
+ /// IWKey.IntegrityKey[127:0] := __intkey[127:0] XOR HW_NRND_GEN.data[383:256]
78
+ /// IWKey.NoBackup := __ctl[0]
79
+ /// IWKey.KeySource := __ctl[4:1]
80
+ /// ZF := 0
81
+ /// ELSE // Random data was not returned from RDSEED. IWKey was not loaded
82
+ /// ZF := 1
83
+ /// FI
84
+ /// FI
85
+ /// dst := ZF
86
+ /// OF := 0
87
+ /// SF := 0
88
+ /// AF := 0
89
+ /// PF := 0
90
+ /// CF := 0
91
+ /// \endcode
92
+ static __inline__ void __DEFAULT_FN_ATTRS
93
+ _mm_loadiwkey (unsigned int __ctl, __m128i __intkey,
94
+ __m128i __enkey_lo, __m128i __enkey_hi) {
95
+ __builtin_ia32_loadiwkey (__intkey, __enkey_lo, __enkey_hi, __ctl);
96
+ }
97
+
98
+ /// Wrap a 128-bit AES key from __key into a key handle and output in
99
+ /// ((__m128i*)__h) to ((__m128i*)__h) + 2 and a 32-bit value as return.
100
+ /// The explicit source operand __htype specifies handle restrictions.
101
+ ///
102
+ /// \headerfile <x86intrin.h>
103
+ ///
104
+ /// This intrinsic corresponds to the <c> ENCODEKEY128 </c> instructions.
105
+ ///
106
+ /// \code{.operation}
107
+ /// InputKey[127:0] := __key[127:0]
108
+ /// KeyMetadata[2:0] := __htype[2:0]
109
+ /// KeyMetadata[23:3] := 0 // Reserved for future usage
110
+ /// KeyMetadata[27:24] := 0 // KeyType is AES-128 (value of 0)
111
+ /// KeyMetadata[127:28] := 0 // Reserved for future usage
112
+ /// Handle[383:0] := WrapKey128(InputKey[127:0], KeyMetadata[127:0],
113
+ /// IWKey.Integrity Key[127:0], IWKey.Encryption Key[255:0])
114
+ /// dst[0] := IWKey.NoBackup
115
+ /// dst[4:1] := IWKey.KeySource[3:0]
116
+ /// dst[31:5] := 0
117
+ /// MEM[__h+127:__h] := Handle[127:0] // AAD
118
+ /// MEM[__h+255:__h+128] := Handle[255:128] // Integrity Tag
119
+ /// MEM[__h+383:__h+256] := Handle[383:256] // CipherText
120
+ /// OF := 0
121
+ /// SF := 0
122
+ /// ZF := 0
123
+ /// AF := 0
124
+ /// PF := 0
125
+ /// CF := 0
126
+ /// \endcode
127
+ static __inline__ unsigned int __DEFAULT_FN_ATTRS
128
+ _mm_encodekey128_u32(unsigned int __htype, __m128i __key, void *__h) {
129
+ return __builtin_ia32_encodekey128_u32(__htype, (__v2di)__key, __h);
130
+ }
131
+
132
+ /// Wrap a 256-bit AES key from __key_hi:__key_lo into a key handle, then
133
+ /// output handle in ((__m128i*)__h) to ((__m128i*)__h) + 3 and
134
+ /// a 32-bit value as return.
135
+ /// The explicit source operand __htype specifies handle restrictions.
136
+ ///
137
+ /// \headerfile <x86intrin.h>
138
+ ///
139
+ /// This intrinsic corresponds to the <c> ENCODEKEY256 </c> instructions.
140
+ ///
141
+ /// \code{.operation}
142
+ /// InputKey[127:0] := __key_lo[127:0]
143
+ /// InputKey[255:128] := __key_hi[255:128]
144
+ /// KeyMetadata[2:0] := __htype[2:0]
145
+ /// KeyMetadata[23:3] := 0 // Reserved for future usage
146
+ /// KeyMetadata[27:24] := 1 // KeyType is AES-256 (value of 1)
147
+ /// KeyMetadata[127:28] := 0 // Reserved for future usage
148
+ /// Handle[511:0] := WrapKey256(InputKey[255:0], KeyMetadata[127:0],
149
+ /// IWKey.Integrity Key[127:0], IWKey.Encryption Key[255:0])
150
+ /// dst[0] := IWKey.NoBackup
151
+ /// dst[4:1] := IWKey.KeySource[3:0]
152
+ /// dst[31:5] := 0
153
+ /// MEM[__h+127:__h] := Handle[127:0] // AAD
154
+ /// MEM[__h+255:__h+128] := Handle[255:128] // Tag
155
+ /// MEM[__h+383:__h+256] := Handle[383:256] // CipherText[127:0]
156
+ /// MEM[__h+511:__h+384] := Handle[511:384] // CipherText[255:128]
157
+ /// OF := 0
158
+ /// SF := 0
159
+ /// ZF := 0
160
+ /// AF := 0
161
+ /// PF := 0
162
+ /// CF := 0
163
+ /// \endcode
164
+ static __inline__ unsigned int __DEFAULT_FN_ATTRS
165
+ _mm_encodekey256_u32(unsigned int __htype, __m128i __key_lo, __m128i __key_hi,
166
+ void *__h) {
167
+ return __builtin_ia32_encodekey256_u32(__htype, (__v2di)__key_lo,
168
+ (__v2di)__key_hi, __h);
169
+ }
170
+
171
+ /// The AESENC128KL performs 10 rounds of AES to encrypt the __idata using
172
+ /// the 128-bit key in the handle from the __h. It stores the result in the
173
+ /// __odata. And return the affected ZF flag status.
174
+ ///
175
+ /// \headerfile <x86intrin.h>
176
+ ///
177
+ /// This intrinsic corresponds to the <c> AESENC128KL </c> instructions.
178
+ ///
179
+ /// \code{.operation}
180
+ /// Handle[383:0] := MEM[__h+383:__h] // Load is not guaranteed to be atomic.
181
+ /// IllegalHandle := ( HandleReservedBitSet (Handle[383:0]) ||
182
+ /// (Handle[127:0] AND (CPL > 0)) ||
183
+ /// Handle[383:256] ||
184
+ /// HandleKeyType (Handle[383:0]) != HANDLE_KEY_TYPE_AES128 )
185
+ /// IF (IllegalHandle)
186
+ /// ZF := 1
187
+ /// ELSE
188
+ /// (UnwrappedKey, Authentic) := UnwrapKeyAndAuthenticate384 (Handle[383:0], IWKey)
189
+ /// IF (Authentic == 0)
190
+ /// ZF := 1
191
+ /// ELSE
192
+ /// MEM[__odata+127:__odata] := AES128Encrypt (__idata[127:0], UnwrappedKey)
193
+ /// ZF := 0
194
+ /// FI
195
+ /// FI
196
+ /// dst := ZF
197
+ /// OF := 0
198
+ /// SF := 0
199
+ /// AF := 0
200
+ /// PF := 0
201
+ /// CF := 0
202
+ /// \endcode
203
+ static __inline__ unsigned char __DEFAULT_FN_ATTRS
204
+ _mm_aesenc128kl_u8(__m128i* __odata, __m128i __idata, const void *__h) {
205
+ return __builtin_ia32_aesenc128kl_u8((__v2di *)__odata, (__v2di)__idata, __h);
206
+ }
207
+
208
+ /// The AESENC256KL performs 14 rounds of AES to encrypt the __idata using
209
+ /// the 256-bit key in the handle from the __h. It stores the result in the
210
+ /// __odata. And return the affected ZF flag status.
211
+ ///
212
+ /// \headerfile <x86intrin.h>
213
+ ///
214
+ /// This intrinsic corresponds to the <c> AESENC256KL </c> instructions.
215
+ ///
216
+ /// \code{.operation}
217
+ /// Handle[511:0] := MEM[__h+511:__h] // Load is not guaranteed to be atomic.
218
+ /// IllegalHandle := ( HandleReservedBitSet (Handle[511:0]) ||
219
+ /// (Handle[127:0] AND (CPL > 0)) ||
220
+ /// Handle[255:128] ||
221
+ /// HandleKeyType (Handle[511:0]) != HANDLE_KEY_TYPE_AES256 )
222
+ /// IF (IllegalHandle)
223
+ /// ZF := 1
224
+ /// MEM[__odata+127:__odata] := 0
225
+ /// ELSE
226
+ /// (UnwrappedKey, Authentic) := UnwrapKeyAndAuthenticate512 (Handle[511:0], IWKey)
227
+ /// IF (Authentic == 0)
228
+ /// ZF := 1
229
+ /// MEM[__odata+127:__odata] := 0
230
+ /// ELSE
231
+ /// MEM[__odata+127:__odata] := AES256Encrypt (__idata[127:0], UnwrappedKey)
232
+ /// ZF := 0
233
+ /// FI
234
+ /// FI
235
+ /// dst := ZF
236
+ /// OF := 0
237
+ /// SF := 0
238
+ /// AF := 0
239
+ /// PF := 0
240
+ /// CF := 0
241
+ /// \endcode
242
+ static __inline__ unsigned char __DEFAULT_FN_ATTRS
243
+ _mm_aesenc256kl_u8(__m128i* __odata, __m128i __idata, const void *__h) {
244
+ return __builtin_ia32_aesenc256kl_u8((__v2di *)__odata, (__v2di)__idata, __h);
245
+ }
246
+
247
+ /// The AESDEC128KL performs 10 rounds of AES to decrypt the __idata using
248
+ /// the 128-bit key in the handle from the __h. It stores the result in the
249
+ /// __odata. And return the affected ZF flag status.
250
+ ///
251
+ /// \headerfile <x86intrin.h>
252
+ ///
253
+ /// This intrinsic corresponds to the <c> AESDEC128KL </c> instructions.
254
+ ///
255
+ /// \code{.operation}
256
+ /// Handle[383:0] := MEM[__h+383:__h] // Load is not guaranteed to be atomic.
257
+ /// IllegalHandle := (HandleReservedBitSet (Handle[383:0]) ||
258
+ /// (Handle[127:0] AND (CPL > 0)) ||
259
+ /// Handle[383:256] ||
260
+ /// HandleKeyType (Handle[383:0]) != HANDLE_KEY_TYPE_AES128)
261
+ /// IF (IllegalHandle)
262
+ /// ZF := 1
263
+ /// MEM[__odata+127:__odata] := 0
264
+ /// ELSE
265
+ /// (UnwrappedKey, Authentic) := UnwrapKeyAndAuthenticate384 (Handle[383:0], IWKey)
266
+ /// IF (Authentic == 0)
267
+ /// ZF := 1
268
+ /// MEM[__odata+127:__odata] := 0
269
+ /// ELSE
270
+ /// MEM[__odata+127:__odata] := AES128Decrypt (__idata[127:0], UnwrappedKey)
271
+ /// ZF := 0
272
+ /// FI
273
+ /// FI
274
+ /// dst := ZF
275
+ /// OF := 0
276
+ /// SF := 0
277
+ /// AF := 0
278
+ /// PF := 0
279
+ /// CF := 0
280
+ /// \endcode
281
+ static __inline__ unsigned char __DEFAULT_FN_ATTRS
282
+ _mm_aesdec128kl_u8(__m128i* __odata, __m128i __idata, const void *__h) {
283
+ return __builtin_ia32_aesdec128kl_u8((__v2di *)__odata, (__v2di)__idata, __h);
284
+ }
285
+
286
+ /// The AESDEC256KL performs 10 rounds of AES to decrypt the __idata using
287
+ /// the 256-bit key in the handle from the __h. It stores the result in the
288
+ /// __odata. And return the affected ZF flag status.
289
+ ///
290
+ /// \headerfile <x86intrin.h>
291
+ ///
292
+ /// This intrinsic corresponds to the <c> AESDEC256KL </c> instructions.
293
+ ///
294
+ /// \code{.operation}
295
+ /// Handle[511:0] := MEM[__h+511:__h]
296
+ /// IllegalHandle := (HandleReservedBitSet (Handle[511:0]) ||
297
+ /// (Handle[127:0] AND (CPL > 0)) ||
298
+ /// Handle[383:256] ||
299
+ /// HandleKeyType (Handle[511:0]) != HANDLE_KEY_TYPE_AES256)
300
+ /// IF (IllegalHandle)
301
+ /// ZF := 1
302
+ /// MEM[__odata+127:__odata] := 0
303
+ /// ELSE
304
+ /// (UnwrappedKey, Authentic) := UnwrapKeyAndAuthenticate512 (Handle[511:0], IWKey)
305
+ /// IF (Authentic == 0)
306
+ /// ZF := 1
307
+ /// MEM[__odata+127:__odata] := 0
308
+ /// ELSE
309
+ /// MEM[__odata+127:__odata] := AES256Decrypt (__idata[127:0], UnwrappedKey)
310
+ /// ZF := 0
311
+ /// FI
312
+ /// FI
313
+ /// dst := ZF
314
+ /// OF := 0
315
+ /// SF := 0
316
+ /// AF := 0
317
+ /// PF := 0
318
+ /// CF := 0
319
+ /// \endcode
320
+ static __inline__ unsigned char __DEFAULT_FN_ATTRS
321
+ _mm_aesdec256kl_u8(__m128i* __odata, __m128i __idata, const void *__h) {
322
+ return __builtin_ia32_aesdec256kl_u8((__v2di *)__odata, (__v2di)__idata, __h);
323
+ }
324
+
325
+ #undef __DEFAULT_FN_ATTRS
326
+
327
+ /* Define the default attributes for the functions in this file. */
328
+ #define __DEFAULT_FN_ATTRS \
329
+ __attribute__((__always_inline__, __nodebug__, __target__("kl,widekl"),\
330
+ __min_vector_width__(128)))
331
+
332
+ /// Encrypt __idata[0] to __idata[7] using 128-bit AES key indicated by handle
333
+ /// at __h and store each resultant block back from __odata to __odata+7. And
334
+ /// return the affected ZF flag status.
335
+ ///
336
+ /// \headerfile <x86intrin.h>
337
+ ///
338
+ /// This intrinsic corresponds to the <c> AESENCWIDE128KL </c> instructions.
339
+ ///
340
+ /// \code{.operation}
341
+ /// Handle := MEM[__h+383:__h]
342
+ /// IllegalHandle := ( HandleReservedBitSet (Handle[383:0]) ||
343
+ /// (Handle[127:0] AND (CPL > 0)) ||
344
+ /// Handle[255:128] ||
345
+ /// HandleKeyType (Handle[383:0]) != HANDLE_KEY_TYPE_AES128 )
346
+ /// IF (IllegalHandle)
347
+ /// ZF := 1
348
+ /// FOR i := 0 to 7
349
+ /// __odata[i] := 0
350
+ /// ENDFOR
351
+ /// ELSE
352
+ /// (UnwrappedKey, Authentic) := UnwrapKeyAndAuthenticate384 (Handle[383:0], IWKey)
353
+ /// IF Authentic == 0
354
+ /// ZF := 1
355
+ /// FOR i := 0 to 7
356
+ /// __odata[i] := 0
357
+ /// ENDFOR
358
+ /// ELSE
359
+ /// FOR i := 0 to 7
360
+ /// __odata[i] := AES128Encrypt (__idata[i], UnwrappedKey)
361
+ /// ENDFOR
362
+ /// ZF := 0
363
+ /// FI
364
+ /// FI
365
+ /// dst := ZF
366
+ /// OF := 0
367
+ /// SF := 0
368
+ /// AF := 0
369
+ /// PF := 0
370
+ /// CF := 0
371
+ /// \endcode
372
+ static __inline__ unsigned char __DEFAULT_FN_ATTRS
373
+ _mm_aesencwide128kl_u8(__m128i __odata[8], const __m128i __idata[8], const void* __h) {
374
+ return __builtin_ia32_aesencwide128kl_u8((__v2di *)__odata,
375
+ (const __v2di *)__idata, __h);
376
+ }
377
+
378
+ /// Encrypt __idata[0] to __idata[7] using 256-bit AES key indicated by handle
379
+ /// at __h and store each resultant block back from __odata to __odata+7. And
380
+ /// return the affected ZF flag status.
381
+ ///
382
+ /// \headerfile <x86intrin.h>
383
+ ///
384
+ /// This intrinsic corresponds to the <c> AESENCWIDE256KL </c> instructions.
385
+ ///
386
+ /// \code{.operation}
387
+ /// Handle[511:0] := MEM[__h+511:__h]
388
+ /// IllegalHandle := ( HandleReservedBitSet (Handle[511:0]) ||
389
+ /// (Handle[127:0] AND (CPL > 0)) ||
390
+ /// Handle[255:128] ||
391
+ /// HandleKeyType (Handle[511:0]) != HANDLE_KEY_TYPE_AES512 )
392
+ /// IF (IllegalHandle)
393
+ /// ZF := 1
394
+ /// FOR i := 0 to 7
395
+ /// __odata[i] := 0
396
+ /// ENDFOR
397
+ /// ELSE
398
+ /// (UnwrappedKey, Authentic) := UnwrapKeyAndAuthenticate512 (Handle[511:0], IWKey)
399
+ /// IF Authentic == 0
400
+ /// ZF := 1
401
+ /// FOR i := 0 to 7
402
+ /// __odata[i] := 0
403
+ /// ENDFOR
404
+ /// ELSE
405
+ /// FOR i := 0 to 7
406
+ /// __odata[i] := AES256Encrypt (__idata[i], UnwrappedKey)
407
+ /// ENDFOR
408
+ /// ZF := 0
409
+ /// FI
410
+ /// FI
411
+ /// dst := ZF
412
+ /// OF := 0
413
+ /// SF := 0
414
+ /// AF := 0
415
+ /// PF := 0
416
+ /// CF := 0
417
+ /// \endcode
418
+ static __inline__ unsigned char __DEFAULT_FN_ATTRS
419
+ _mm_aesencwide256kl_u8(__m128i __odata[8], const __m128i __idata[8], const void* __h) {
420
+ return __builtin_ia32_aesencwide256kl_u8((__v2di *)__odata,
421
+ (const __v2di *)__idata, __h);
422
+ }
423
+
424
+ /// Decrypt __idata[0] to __idata[7] using 128-bit AES key indicated by handle
425
+ /// at __h and store each resultant block back from __odata to __odata+7. And
426
+ /// return the affected ZF flag status.
427
+ ///
428
+ /// \headerfile <x86intrin.h>
429
+ ///
430
+ /// This intrinsic corresponds to the <c> AESDECWIDE128KL </c> instructions.
431
+ ///
432
+ /// \code{.operation}
433
+ /// Handle[383:0] := MEM[__h+383:__h]
434
+ /// IllegalHandle := ( HandleReservedBitSet (Handle[383:0]) ||
435
+ /// (Handle[127:0] AND (CPL > 0)) ||
436
+ /// Handle[255:128] ||
437
+ /// HandleKeyType (Handle) != HANDLE_KEY_TYPE_AES128 )
438
+ /// IF (IllegalHandle)
439
+ /// ZF := 1
440
+ /// FOR i := 0 to 7
441
+ /// __odata[i] := 0
442
+ /// ENDFOR
443
+ /// ELSE
444
+ /// (UnwrappedKey, Authentic) := UnwrapKeyAndAuthenticate384 (Handle[383:0], IWKey)
445
+ /// IF Authentic == 0
446
+ /// ZF := 1
447
+ /// FOR i := 0 to 7
448
+ /// __odata[i] := 0
449
+ /// ENDFOR
450
+ /// ELSE
451
+ /// FOR i := 0 to 7
452
+ /// __odata[i] := AES128Decrypt (__idata[i], UnwrappedKey)
453
+ /// ENDFOR
454
+ /// ZF := 0
455
+ /// FI
456
+ /// FI
457
+ /// dst := ZF
458
+ /// OF := 0
459
+ /// SF := 0
460
+ /// AF := 0
461
+ /// PF := 0
462
+ /// CF := 0
463
+ /// \endcode
464
+ static __inline__ unsigned char __DEFAULT_FN_ATTRS
465
+ _mm_aesdecwide128kl_u8(__m128i __odata[8], const __m128i __idata[8], const void* __h) {
466
+ return __builtin_ia32_aesdecwide128kl_u8((__v2di *)__odata,
467
+ (const __v2di *)__idata, __h);
468
+ }
469
+
470
+ /// Decrypt __idata[0] to __idata[7] using 256-bit AES key indicated by handle
471
+ /// at __h and store each resultant block back from __odata to __odata+7. And
472
+ /// return the affected ZF flag status.
473
+ ///
474
+ /// \headerfile <x86intrin.h>
475
+ ///
476
+ /// This intrinsic corresponds to the <c> AESDECWIDE256KL </c> instructions.
477
+ ///
478
+ /// \code{.operation}
479
+ /// Handle[511:0] := MEM[__h+511:__h]
480
+ /// IllegalHandle = ( HandleReservedBitSet (Handle[511:0]) ||
481
+ /// (Handle[127:0] AND (CPL > 0)) ||
482
+ /// Handle[255:128] ||
483
+ /// HandleKeyType (Handle) != HANDLE_KEY_TYPE_AES512 )
484
+ /// If (IllegalHandle)
485
+ /// ZF := 1
486
+ /// FOR i := 0 to 7
487
+ /// __odata[i] := 0
488
+ /// ENDFOR
489
+ /// ELSE
490
+ /// (UnwrappedKey, Authentic) := UnwrapKeyAndAuthenticate512 (Handle[511:0], IWKey)
491
+ /// IF Authentic == 0
492
+ /// ZF := 1
493
+ /// FOR i := 0 to 7
494
+ /// __odata[i] := 0
495
+ /// ENDFOR
496
+ /// ELSE
497
+ /// FOR i := 0 to 7
498
+ /// __odata[i] := AES256Decrypt (__idata[i], UnwrappedKey)
499
+ /// ENDFOR
500
+ /// ZF := 0
501
+ /// FI
502
+ /// FI
503
+ /// dst := ZF
504
+ /// OF := 0
505
+ /// SF := 0
506
+ /// AF := 0
507
+ /// PF := 0
508
+ /// CF := 0
509
+ /// \endcode
510
+ static __inline__ unsigned char __DEFAULT_FN_ATTRS
511
+ _mm_aesdecwide256kl_u8(__m128i __odata[8], const __m128i __idata[8], const void* __h) {
512
+ return __builtin_ia32_aesdecwide256kl_u8((__v2di *)__odata,
513
+ (const __v2di *)__idata, __h);
514
+ }
515
+
516
+ #undef __DEFAULT_FN_ATTRS
517
+
518
+ #endif /* _KEYLOCKERINTRIN_H */