@nativescript/linux 0.0.0-stage → 0.1.0-alpha.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 (238) hide show
  1. package/framework/App_Resources/Linux/app.desktop +8 -0
  2. package/framework/App_Resources/Linux/app.metainfo.xml +15 -0
  3. package/framework/App_Resources/Linux/icon.png +0 -0
  4. package/framework/App_Resources/Linux/images/.gitkeep +0 -0
  5. package/framework/__PROJECT_NAME__/app/.gitkeep +0 -0
  6. package/framework/runtime/x64/metadata-x86_64.bin +0 -0
  7. package/framework/runtime/x64/ns-linux +4 -0
  8. package/framework/tools/x64/lib/clang/17/include/__clang_cuda_builtin_vars.h +121 -0
  9. package/framework/tools/x64/lib/clang/17/include/__clang_cuda_cmath.h +512 -0
  10. package/framework/tools/x64/lib/clang/17/include/__clang_cuda_complex_builtins.h +285 -0
  11. package/framework/tools/x64/lib/clang/17/include/__clang_cuda_device_functions.h +1558 -0
  12. package/framework/tools/x64/lib/clang/17/include/__clang_cuda_intrinsics.h +709 -0
  13. package/framework/tools/x64/lib/clang/17/include/__clang_cuda_libdevice_declares.h +468 -0
  14. package/framework/tools/x64/lib/clang/17/include/__clang_cuda_math.h +348 -0
  15. package/framework/tools/x64/lib/clang/17/include/__clang_cuda_math_forward_declares.h +284 -0
  16. package/framework/tools/x64/lib/clang/17/include/__clang_cuda_runtime_wrapper.h +503 -0
  17. package/framework/tools/x64/lib/clang/17/include/__clang_cuda_texture_intrinsics.h +742 -0
  18. package/framework/tools/x64/lib/clang/17/include/__clang_hip_cmath.h +842 -0
  19. package/framework/tools/x64/lib/clang/17/include/__clang_hip_libdevice_declares.h +353 -0
  20. package/framework/tools/x64/lib/clang/17/include/__clang_hip_math.h +1303 -0
  21. package/framework/tools/x64/lib/clang/17/include/__clang_hip_runtime_wrapper.h +151 -0
  22. package/framework/tools/x64/lib/clang/17/include/__clang_hip_stdlib.h +43 -0
  23. package/framework/tools/x64/lib/clang/17/include/__stddef_max_align_t.h +27 -0
  24. package/framework/tools/x64/lib/clang/17/include/__wmmintrin_aes.h +140 -0
  25. package/framework/tools/x64/lib/clang/17/include/__wmmintrin_pclmul.h +48 -0
  26. package/framework/tools/x64/lib/clang/17/include/adxintrin.h +227 -0
  27. package/framework/tools/x64/lib/clang/17/include/altivec.h +19342 -0
  28. package/framework/tools/x64/lib/clang/17/include/ammintrin.h +183 -0
  29. package/framework/tools/x64/lib/clang/17/include/amxcomplexintrin.h +169 -0
  30. package/framework/tools/x64/lib/clang/17/include/amxfp16intrin.h +58 -0
  31. package/framework/tools/x64/lib/clang/17/include/amxintrin.h +524 -0
  32. package/framework/tools/x64/lib/clang/17/include/arm64intr.h +35 -0
  33. package/framework/tools/x64/lib/clang/17/include/arm_acle.h +782 -0
  34. package/framework/tools/x64/lib/clang/17/include/arm_bf16.h +20 -0
  35. package/framework/tools/x64/lib/clang/17/include/arm_cde.h +410 -0
  36. package/framework/tools/x64/lib/clang/17/include/arm_cmse.h +217 -0
  37. package/framework/tools/x64/lib/clang/17/include/arm_fp16.h +596 -0
  38. package/framework/tools/x64/lib/clang/17/include/arm_mve.h +19187 -0
  39. package/framework/tools/x64/lib/clang/17/include/arm_neon.h +69885 -0
  40. package/framework/tools/x64/lib/clang/17/include/arm_neon_sve_bridge.h +182 -0
  41. package/framework/tools/x64/lib/clang/17/include/arm_sme_draft_spec_subject_to_change.h +642 -0
  42. package/framework/tools/x64/lib/clang/17/include/arm_sve.h +23950 -0
  43. package/framework/tools/x64/lib/clang/17/include/armintr.h +31 -0
  44. package/framework/tools/x64/lib/clang/17/include/avx2intrin.h +5263 -0
  45. package/framework/tools/x64/lib/clang/17/include/avx512bf16intrin.h +282 -0
  46. package/framework/tools/x64/lib/clang/17/include/avx512bitalgintrin.h +83 -0
  47. package/framework/tools/x64/lib/clang/17/include/avx512bwintrin.h +2024 -0
  48. package/framework/tools/x64/lib/clang/17/include/avx512cdintrin.h +123 -0
  49. package/framework/tools/x64/lib/clang/17/include/avx512dqintrin.h +1377 -0
  50. package/framework/tools/x64/lib/clang/17/include/avx512erintrin.h +271 -0
  51. package/framework/tools/x64/lib/clang/17/include/avx512fintrin.h +9775 -0
  52. package/framework/tools/x64/lib/clang/17/include/avx512fp16intrin.h +3350 -0
  53. package/framework/tools/x64/lib/clang/17/include/avx512ifmaintrin.h +68 -0
  54. package/framework/tools/x64/lib/clang/17/include/avx512ifmavlintrin.h +105 -0
  55. package/framework/tools/x64/lib/clang/17/include/avx512pfintrin.h +97 -0
  56. package/framework/tools/x64/lib/clang/17/include/avx512vbmi2intrin.h +357 -0
  57. package/framework/tools/x64/lib/clang/17/include/avx512vbmiintrin.h +105 -0
  58. package/framework/tools/x64/lib/clang/17/include/avx512vbmivlintrin.h +188 -0
  59. package/framework/tools/x64/lib/clang/17/include/avx512vlbf16intrin.h +515 -0
  60. package/framework/tools/x64/lib/clang/17/include/avx512vlbitalgintrin.h +145 -0
  61. package/framework/tools/x64/lib/clang/17/include/avx512vlbwintrin.h +3161 -0
  62. package/framework/tools/x64/lib/clang/17/include/avx512vlcdintrin.h +225 -0
  63. package/framework/tools/x64/lib/clang/17/include/avx512vldqintrin.h +1167 -0
  64. package/framework/tools/x64/lib/clang/17/include/avx512vlfp16intrin.h +2071 -0
  65. package/framework/tools/x64/lib/clang/17/include/avx512vlintrin.h +8431 -0
  66. package/framework/tools/x64/lib/clang/17/include/avx512vlvbmi2intrin.h +689 -0
  67. package/framework/tools/x64/lib/clang/17/include/avx512vlvnniintrin.h +304 -0
  68. package/framework/tools/x64/lib/clang/17/include/avx512vlvp2intersectintrin.h +121 -0
  69. package/framework/tools/x64/lib/clang/17/include/avx512vnniintrin.h +115 -0
  70. package/framework/tools/x64/lib/clang/17/include/avx512vp2intersectintrin.h +77 -0
  71. package/framework/tools/x64/lib/clang/17/include/avx512vpopcntdqintrin.h +54 -0
  72. package/framework/tools/x64/lib/clang/17/include/avx512vpopcntdqvlintrin.h +91 -0
  73. package/framework/tools/x64/lib/clang/17/include/avxifmaintrin.h +177 -0
  74. package/framework/tools/x64/lib/clang/17/include/avxintrin.h +5108 -0
  75. package/framework/tools/x64/lib/clang/17/include/avxneconvertintrin.h +484 -0
  76. package/framework/tools/x64/lib/clang/17/include/avxvnniint16intrin.h +473 -0
  77. package/framework/tools/x64/lib/clang/17/include/avxvnniint8intrin.h +471 -0
  78. package/framework/tools/x64/lib/clang/17/include/avxvnniintrin.h +225 -0
  79. package/framework/tools/x64/lib/clang/17/include/bmi2intrin.h +255 -0
  80. package/framework/tools/x64/lib/clang/17/include/bmiintrin.h +431 -0
  81. package/framework/tools/x64/lib/clang/17/include/builtins.h +16 -0
  82. package/framework/tools/x64/lib/clang/17/include/cet.h +66 -0
  83. package/framework/tools/x64/lib/clang/17/include/cetintrin.h +115 -0
  84. package/framework/tools/x64/lib/clang/17/include/cldemoteintrin.h +36 -0
  85. package/framework/tools/x64/lib/clang/17/include/clflushoptintrin.h +36 -0
  86. package/framework/tools/x64/lib/clang/17/include/clwbintrin.h +38 -0
  87. package/framework/tools/x64/lib/clang/17/include/clzerointrin.h +38 -0
  88. package/framework/tools/x64/lib/clang/17/include/cmpccxaddintrin.h +70 -0
  89. package/framework/tools/x64/lib/clang/17/include/cpuid.h +331 -0
  90. package/framework/tools/x64/lib/clang/17/include/crc32intrin.h +100 -0
  91. package/framework/tools/x64/lib/clang/17/include/cuda_wrappers/algorithm +116 -0
  92. package/framework/tools/x64/lib/clang/17/include/cuda_wrappers/bits/basic_string.h +9 -0
  93. package/framework/tools/x64/lib/clang/17/include/cuda_wrappers/bits/basic_string.tcc +9 -0
  94. package/framework/tools/x64/lib/clang/17/include/cuda_wrappers/bits/shared_ptr_base.h +9 -0
  95. package/framework/tools/x64/lib/clang/17/include/cuda_wrappers/cmath +90 -0
  96. package/framework/tools/x64/lib/clang/17/include/cuda_wrappers/complex +90 -0
  97. package/framework/tools/x64/lib/clang/17/include/cuda_wrappers/new +106 -0
  98. package/framework/tools/x64/lib/clang/17/include/emmintrin.h +4775 -0
  99. package/framework/tools/x64/lib/clang/17/include/enqcmdintrin.h +63 -0
  100. package/framework/tools/x64/lib/clang/17/include/f16cintrin.h +162 -0
  101. package/framework/tools/x64/lib/clang/17/include/float.h +168 -0
  102. package/framework/tools/x64/lib/clang/17/include/fma4intrin.h +218 -0
  103. package/framework/tools/x64/lib/clang/17/include/fmaintrin.h +780 -0
  104. package/framework/tools/x64/lib/clang/17/include/fxsrintrin.h +91 -0
  105. package/framework/tools/x64/lib/clang/17/include/gfniintrin.h +194 -0
  106. package/framework/tools/x64/lib/clang/17/include/hexagon_circ_brev_intrinsics.h +298 -0
  107. package/framework/tools/x64/lib/clang/17/include/hexagon_protos.h +8439 -0
  108. package/framework/tools/x64/lib/clang/17/include/hexagon_types.h +2621 -0
  109. package/framework/tools/x64/lib/clang/17/include/hresetintrin.h +49 -0
  110. package/framework/tools/x64/lib/clang/17/include/htmintrin.h +212 -0
  111. package/framework/tools/x64/lib/clang/17/include/htmxlintrin.h +345 -0
  112. package/framework/tools/x64/lib/clang/17/include/hvx_hexagon_protos.h +5183 -0
  113. package/framework/tools/x64/lib/clang/17/include/ia32intrin.h +441 -0
  114. package/framework/tools/x64/lib/clang/17/include/immintrin.h +758 -0
  115. package/framework/tools/x64/lib/clang/17/include/intrin.h +620 -0
  116. package/framework/tools/x64/lib/clang/17/include/inttypes.h +97 -0
  117. package/framework/tools/x64/lib/clang/17/include/invpcidintrin.h +23 -0
  118. package/framework/tools/x64/lib/clang/17/include/iso646.h +27 -0
  119. package/framework/tools/x64/lib/clang/17/include/keylockerintrin.h +530 -0
  120. package/framework/tools/x64/lib/clang/17/include/larchintrin.h +234 -0
  121. package/framework/tools/x64/lib/clang/17/include/limits.h +127 -0
  122. package/framework/tools/x64/lib/clang/17/include/llvm_libc_wrappers/ctype.h +85 -0
  123. package/framework/tools/x64/lib/clang/17/include/llvm_libc_wrappers/inttypes.h +34 -0
  124. package/framework/tools/x64/lib/clang/17/include/llvm_libc_wrappers/stdio.h +34 -0
  125. package/framework/tools/x64/lib/clang/17/include/llvm_libc_wrappers/stdlib.h +42 -0
  126. package/framework/tools/x64/lib/clang/17/include/llvm_libc_wrappers/string.h +37 -0
  127. package/framework/tools/x64/lib/clang/17/include/lwpintrin.h +136 -0
  128. package/framework/tools/x64/lib/clang/17/include/lzcntintrin.h +104 -0
  129. package/framework/tools/x64/lib/clang/17/include/mm3dnow.h +157 -0
  130. package/framework/tools/x64/lib/clang/17/include/mm_malloc.h +67 -0
  131. package/framework/tools/x64/lib/clang/17/include/mmintrin.h +1562 -0
  132. package/framework/tools/x64/lib/clang/17/include/module.modulemap +164 -0
  133. package/framework/tools/x64/lib/clang/17/include/movdirintrin.h +49 -0
  134. package/framework/tools/x64/lib/clang/17/include/msa.h +573 -0
  135. package/framework/tools/x64/lib/clang/17/include/mwaitxintrin.h +62 -0
  136. package/framework/tools/x64/lib/clang/17/include/nmmintrin.h +20 -0
  137. package/framework/tools/x64/lib/clang/17/include/opencl-c-base.h +820 -0
  138. package/framework/tools/x64/lib/clang/17/include/opencl-c.h +18356 -0
  139. package/framework/tools/x64/lib/clang/17/include/openmp_wrappers/__clang_openmp_device_functions.h +105 -0
  140. package/framework/tools/x64/lib/clang/17/include/openmp_wrappers/cmath +132 -0
  141. package/framework/tools/x64/lib/clang/17/include/openmp_wrappers/complex +55 -0
  142. package/framework/tools/x64/lib/clang/17/include/openmp_wrappers/complex.h +35 -0
  143. package/framework/tools/x64/lib/clang/17/include/openmp_wrappers/complex_cmath.h +388 -0
  144. package/framework/tools/x64/lib/clang/17/include/openmp_wrappers/math.h +61 -0
  145. package/framework/tools/x64/lib/clang/17/include/openmp_wrappers/new +48 -0
  146. package/framework/tools/x64/lib/clang/17/include/pconfigintrin.h +40 -0
  147. package/framework/tools/x64/lib/clang/17/include/pkuintrin.h +34 -0
  148. package/framework/tools/x64/lib/clang/17/include/pmmintrin.h +300 -0
  149. package/framework/tools/x64/lib/clang/17/include/popcntintrin.h +59 -0
  150. package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/bmi2intrin.h +134 -0
  151. package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/bmiintrin.h +165 -0
  152. package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/emmintrin.h +2269 -0
  153. package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/immintrin.h +27 -0
  154. package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/mm_malloc.h +45 -0
  155. package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/mmintrin.h +1453 -0
  156. package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/pmmintrin.h +145 -0
  157. package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/smmintrin.h +663 -0
  158. package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/tmmintrin.h +453 -0
  159. package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/x86gprintrin.h +17 -0
  160. package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/x86intrin.h +28 -0
  161. package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/xmmintrin.h +1827 -0
  162. package/framework/tools/x64/lib/clang/17/include/prfchiintrin.h +61 -0
  163. package/framework/tools/x64/lib/clang/17/include/prfchwintrin.h +58 -0
  164. package/framework/tools/x64/lib/clang/17/include/ptwriteintrin.h +37 -0
  165. package/framework/tools/x64/lib/clang/17/include/raointintrin.h +203 -0
  166. package/framework/tools/x64/lib/clang/17/include/rdpruintrin.h +57 -0
  167. package/framework/tools/x64/lib/clang/17/include/rdseedintrin.h +105 -0
  168. package/framework/tools/x64/lib/clang/17/include/riscv_ntlh.h +28 -0
  169. package/framework/tools/x64/lib/clang/17/include/rtmintrin.h +45 -0
  170. package/framework/tools/x64/lib/clang/17/include/s390intrin.h +25 -0
  171. package/framework/tools/x64/lib/clang/17/include/serializeintrin.h +30 -0
  172. package/framework/tools/x64/lib/clang/17/include/sgxintrin.h +60 -0
  173. package/framework/tools/x64/lib/clang/17/include/sha512intrin.h +200 -0
  174. package/framework/tools/x64/lib/clang/17/include/shaintrin.h +189 -0
  175. package/framework/tools/x64/lib/clang/17/include/sifive_vector.h +16 -0
  176. package/framework/tools/x64/lib/clang/17/include/sm3intrin.h +238 -0
  177. package/framework/tools/x64/lib/clang/17/include/sm4intrin.h +269 -0
  178. package/framework/tools/x64/lib/clang/17/include/smmintrin.h +2328 -0
  179. package/framework/tools/x64/lib/clang/17/include/stdalign.h +26 -0
  180. package/framework/tools/x64/lib/clang/17/include/stdarg.h +51 -0
  181. package/framework/tools/x64/lib/clang/17/include/stdatomic.h +196 -0
  182. package/framework/tools/x64/lib/clang/17/include/stdbool.h +34 -0
  183. package/framework/tools/x64/lib/clang/17/include/stddef.h +133 -0
  184. package/framework/tools/x64/lib/clang/17/include/stdint.h +979 -0
  185. package/framework/tools/x64/lib/clang/17/include/stdnoreturn.h +29 -0
  186. package/framework/tools/x64/lib/clang/17/include/tbmintrin.h +140 -0
  187. package/framework/tools/x64/lib/clang/17/include/tgmath.h +1368 -0
  188. package/framework/tools/x64/lib/clang/17/include/tmmintrin.h +775 -0
  189. package/framework/tools/x64/lib/clang/17/include/tsxldtrkintrin.h +56 -0
  190. package/framework/tools/x64/lib/clang/17/include/uintrintrin.h +157 -0
  191. package/framework/tools/x64/lib/clang/17/include/unwind.h +332 -0
  192. package/framework/tools/x64/lib/clang/17/include/vadefs.h +51 -0
  193. package/framework/tools/x64/lib/clang/17/include/vaesintrin.h +85 -0
  194. package/framework/tools/x64/lib/clang/17/include/varargs.h +12 -0
  195. package/framework/tools/x64/lib/clang/17/include/vecintrin.h +11127 -0
  196. package/framework/tools/x64/lib/clang/17/include/velintrin.h +71 -0
  197. package/framework/tools/x64/lib/clang/17/include/velintrin_approx.h +120 -0
  198. package/framework/tools/x64/lib/clang/17/include/velintrin_gen.h +1257 -0
  199. package/framework/tools/x64/lib/clang/17/include/vpclmulqdqintrin.h +30 -0
  200. package/framework/tools/x64/lib/clang/17/include/waitpkgintrin.h +42 -0
  201. package/framework/tools/x64/lib/clang/17/include/wasm_simd128.h +1997 -0
  202. package/framework/tools/x64/lib/clang/17/include/wbnoinvdintrin.h +24 -0
  203. package/framework/tools/x64/lib/clang/17/include/wmmintrin.h +23 -0
  204. package/framework/tools/x64/lib/clang/17/include/x86gprintrin.h +65 -0
  205. package/framework/tools/x64/lib/clang/17/include/x86intrin.h +67 -0
  206. package/framework/tools/x64/lib/clang/17/include/xmmintrin.h +3017 -0
  207. package/framework/tools/x64/lib/clang/17/include/xopintrin.h +770 -0
  208. package/framework/tools/x64/lib/clang/17/include/xsavecintrin.h +84 -0
  209. package/framework/tools/x64/lib/clang/17/include/xsaveintrin.h +63 -0
  210. package/framework/tools/x64/lib/clang/17/include/xsaveoptintrin.h +34 -0
  211. package/framework/tools/x64/lib/clang/17/include/xsavesintrin.h +44 -0
  212. package/framework/tools/x64/lib/clang/17/include/xtestintrin.h +27 -0
  213. package/framework/tools/x64/metadata-generator +4 -0
  214. package/framework/tools/x64/ns-bundle +0 -0
  215. package/framework/tools/x64/ns-metadata-filter +0 -0
  216. package/framework/typings/c!EGL.d.ts +431 -0
  217. package/framework/typings/c!GLES.d.ts +5002 -0
  218. package/framework/typings/c!GLib.d.ts +14488 -0
  219. package/framework/typings/c!Gtk.d.ts +17630 -0
  220. package/framework/typings/c!X11.d.ts +7054 -0
  221. package/framework/typings/c!_Builtin_intrinsics.d.ts +106 -0
  222. package/framework/typings/c!_Builtin_stddef_max_align_t.d.ts +6 -0
  223. package/framework/typings/c!cairo.d.ts +1248 -0
  224. package/framework/typings/c!fontconfig.d.ts +819 -0
  225. package/framework/typings/c!freetype.d.ts +1068 -0
  226. package/framework/typings/c!gdk_pixbuf.d.ts +326 -0
  227. package/framework/typings/c!graphene.d.ts +320 -0
  228. package/framework/typings/c!harfbuzz.d.ts +1292 -0
  229. package/framework/typings/c!icu.d.ts +3330 -0
  230. package/framework/typings/c!libc.d.ts +11639 -0
  231. package/framework/typings/c!libxml2.d.ts +7029 -0
  232. package/framework/typings/c!pango.d.ts +2225 -0
  233. package/framework/typings/c!uuid.d.ts +68 -0
  234. package/framework/typings/c!zlib.d.ts +276 -0
  235. package/framework/typings/index.d.ts +10 -0
  236. package/framework/typings/linux-runtime.d.ts +90 -0
  237. package/package.json +9 -4
  238. package/README.md +0 -3
@@ -0,0 +1,431 @@
1
+ /*===---- bmiintrin.h - BMI intrinsics -------------------------------------===
2
+ *
3
+ * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ * See https://llvm.org/LICENSE.txt for license information.
5
+ * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ *
7
+ *===-----------------------------------------------------------------------===
8
+ */
9
+
10
+ #if !defined __X86INTRIN_H && !defined __IMMINTRIN_H
11
+ #error "Never use <bmiintrin.h> directly; include <x86intrin.h> instead."
12
+ #endif
13
+
14
+ #ifndef __BMIINTRIN_H
15
+ #define __BMIINTRIN_H
16
+
17
+ /* Allow using the tzcnt intrinsics even for non-BMI targets. Since the TZCNT
18
+ instruction behaves as BSF on non-BMI targets, there is code that expects
19
+ to use it as a potentially faster version of BSF. */
20
+ #define __RELAXED_FN_ATTRS __attribute__((__always_inline__, __nodebug__))
21
+
22
+ #define _tzcnt_u16(a) (__tzcnt_u16((a)))
23
+
24
+ /// Counts the number of trailing zero bits in the operand.
25
+ ///
26
+ /// \headerfile <x86intrin.h>
27
+ ///
28
+ /// This intrinsic corresponds to the <c> TZCNT </c> instruction.
29
+ ///
30
+ /// \param __X
31
+ /// An unsigned 16-bit integer whose trailing zeros are to be counted.
32
+ /// \returns An unsigned 16-bit integer containing the number of trailing zero
33
+ /// bits in the operand.
34
+ static __inline__ unsigned short __RELAXED_FN_ATTRS
35
+ __tzcnt_u16(unsigned short __X)
36
+ {
37
+ return __builtin_ia32_tzcnt_u16(__X);
38
+ }
39
+
40
+ /// Counts the number of trailing zero bits in the operand.
41
+ ///
42
+ /// \headerfile <x86intrin.h>
43
+ ///
44
+ /// This intrinsic corresponds to the <c> TZCNT </c> instruction.
45
+ ///
46
+ /// \param __X
47
+ /// An unsigned 32-bit integer whose trailing zeros are to be counted.
48
+ /// \returns An unsigned 32-bit integer containing the number of trailing zero
49
+ /// bits in the operand.
50
+ /// \see _mm_tzcnt_32
51
+ static __inline__ unsigned int __RELAXED_FN_ATTRS
52
+ __tzcnt_u32(unsigned int __X)
53
+ {
54
+ return __builtin_ia32_tzcnt_u32(__X);
55
+ }
56
+
57
+ /// Counts the number of trailing zero bits in the operand.
58
+ ///
59
+ /// \headerfile <x86intrin.h>
60
+ ///
61
+ /// This intrinsic corresponds to the <c> TZCNT </c> instruction.
62
+ ///
63
+ /// \param __X
64
+ /// An unsigned 32-bit integer whose trailing zeros are to be counted.
65
+ /// \returns An 32-bit integer containing the number of trailing zero bits in
66
+ /// the operand.
67
+ /// \see __tzcnt_u32
68
+ static __inline__ int __RELAXED_FN_ATTRS
69
+ _mm_tzcnt_32(unsigned int __X)
70
+ {
71
+ return (int)__builtin_ia32_tzcnt_u32(__X);
72
+ }
73
+
74
+ #define _tzcnt_u32(a) (__tzcnt_u32((a)))
75
+
76
+ #ifdef __x86_64__
77
+
78
+ /// Counts the number of trailing zero bits in the operand.
79
+ ///
80
+ /// \headerfile <x86intrin.h>
81
+ ///
82
+ /// This intrinsic corresponds to the <c> TZCNT </c> instruction.
83
+ ///
84
+ /// \param __X
85
+ /// An unsigned 64-bit integer whose trailing zeros are to be counted.
86
+ /// \returns An unsigned 64-bit integer containing the number of trailing zero
87
+ /// bits in the operand.
88
+ /// \see _mm_tzcnt_64
89
+ static __inline__ unsigned long long __RELAXED_FN_ATTRS
90
+ __tzcnt_u64(unsigned long long __X)
91
+ {
92
+ return __builtin_ia32_tzcnt_u64(__X);
93
+ }
94
+
95
+ /// Counts the number of trailing zero bits in the operand.
96
+ ///
97
+ /// \headerfile <x86intrin.h>
98
+ ///
99
+ /// This intrinsic corresponds to the <c> TZCNT </c> instruction.
100
+ ///
101
+ /// \param __X
102
+ /// An unsigned 64-bit integer whose trailing zeros are to be counted.
103
+ /// \returns An 64-bit integer containing the number of trailing zero bits in
104
+ /// the operand.
105
+ /// \see __tzcnt_u64
106
+ static __inline__ long long __RELAXED_FN_ATTRS
107
+ _mm_tzcnt_64(unsigned long long __X)
108
+ {
109
+ return (long long)__builtin_ia32_tzcnt_u64(__X);
110
+ }
111
+
112
+ #define _tzcnt_u64(a) (__tzcnt_u64((a)))
113
+
114
+ #endif /* __x86_64__ */
115
+
116
+ #undef __RELAXED_FN_ATTRS
117
+
118
+ #if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \
119
+ defined(__BMI__)
120
+
121
+ /* Define the default attributes for the functions in this file. */
122
+ #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("bmi")))
123
+
124
+ #define _andn_u32(a, b) (__andn_u32((a), (b)))
125
+
126
+ /* _bextr_u32 != __bextr_u32 */
127
+ #define _blsi_u32(a) (__blsi_u32((a)))
128
+
129
+ #define _blsmsk_u32(a) (__blsmsk_u32((a)))
130
+
131
+ #define _blsr_u32(a) (__blsr_u32((a)))
132
+
133
+ /// Performs a bitwise AND of the second operand with the one's
134
+ /// complement of the first operand.
135
+ ///
136
+ /// \headerfile <x86intrin.h>
137
+ ///
138
+ /// This intrinsic corresponds to the <c> ANDN </c> instruction.
139
+ ///
140
+ /// \param __X
141
+ /// An unsigned integer containing one of the operands.
142
+ /// \param __Y
143
+ /// An unsigned integer containing one of the operands.
144
+ /// \returns An unsigned integer containing the bitwise AND of the second
145
+ /// operand with the one's complement of the first operand.
146
+ static __inline__ unsigned int __DEFAULT_FN_ATTRS
147
+ __andn_u32(unsigned int __X, unsigned int __Y)
148
+ {
149
+ return ~__X & __Y;
150
+ }
151
+
152
+ /* AMD-specified, double-leading-underscore version of BEXTR */
153
+ /// Extracts the specified bits from the first operand and returns them
154
+ /// in the least significant bits of the result.
155
+ ///
156
+ /// \headerfile <x86intrin.h>
157
+ ///
158
+ /// This intrinsic corresponds to the <c> BEXTR </c> instruction.
159
+ ///
160
+ /// \param __X
161
+ /// An unsigned integer whose bits are to be extracted.
162
+ /// \param __Y
163
+ /// An unsigned integer used to specify which bits are extracted. Bits [7:0]
164
+ /// specify the index of the least significant bit. Bits [15:8] specify the
165
+ /// number of bits to be extracted.
166
+ /// \returns An unsigned integer whose least significant bits contain the
167
+ /// extracted bits.
168
+ /// \see _bextr_u32
169
+ static __inline__ unsigned int __DEFAULT_FN_ATTRS
170
+ __bextr_u32(unsigned int __X, unsigned int __Y)
171
+ {
172
+ return __builtin_ia32_bextr_u32(__X, __Y);
173
+ }
174
+
175
+ /* Intel-specified, single-leading-underscore version of BEXTR */
176
+ /// Extracts the specified bits from the first operand and returns them
177
+ /// in the least significant bits of the result.
178
+ ///
179
+ /// \headerfile <x86intrin.h>
180
+ ///
181
+ /// This intrinsic corresponds to the <c> BEXTR </c> instruction.
182
+ ///
183
+ /// \param __X
184
+ /// An unsigned integer whose bits are to be extracted.
185
+ /// \param __Y
186
+ /// An unsigned integer used to specify the index of the least significant
187
+ /// bit for the bits to be extracted. Bits [7:0] specify the index.
188
+ /// \param __Z
189
+ /// An unsigned integer used to specify the number of bits to be extracted.
190
+ /// Bits [7:0] specify the number of bits.
191
+ /// \returns An unsigned integer whose least significant bits contain the
192
+ /// extracted bits.
193
+ /// \see __bextr_u32
194
+ static __inline__ unsigned int __DEFAULT_FN_ATTRS
195
+ _bextr_u32(unsigned int __X, unsigned int __Y, unsigned int __Z)
196
+ {
197
+ return __builtin_ia32_bextr_u32 (__X, ((__Y & 0xff) | ((__Z & 0xff) << 8)));
198
+ }
199
+
200
+ /* Intel-specified, single-leading-underscore version of BEXTR2 */
201
+ /// Extracts the specified bits from the first operand and returns them
202
+ /// in the least significant bits of the result.
203
+ ///
204
+ /// \headerfile <x86intrin.h>
205
+ ///
206
+ /// This intrinsic corresponds to the <c> BEXTR </c> instruction.
207
+ ///
208
+ /// \param __X
209
+ /// An unsigned integer whose bits are to be extracted.
210
+ /// \param __Y
211
+ /// An unsigned integer used to specify which bits are extracted. Bits [7:0]
212
+ /// specify the index of the least significant bit. Bits [15:8] specify the
213
+ /// number of bits to be extracted.
214
+ /// \returns An unsigned integer whose least significant bits contain the
215
+ /// extracted bits.
216
+ /// \see __bextr_u32
217
+ static __inline__ unsigned int __DEFAULT_FN_ATTRS
218
+ _bextr2_u32(unsigned int __X, unsigned int __Y) {
219
+ return __builtin_ia32_bextr_u32(__X, __Y);
220
+ }
221
+
222
+ /// Clears all bits in the source except for the least significant bit
223
+ /// containing a value of 1 and returns the result.
224
+ ///
225
+ /// \headerfile <x86intrin.h>
226
+ ///
227
+ /// This intrinsic corresponds to the <c> BLSI </c> instruction.
228
+ ///
229
+ /// \param __X
230
+ /// An unsigned integer whose bits are to be cleared.
231
+ /// \returns An unsigned integer containing the result of clearing the bits from
232
+ /// the source operand.
233
+ static __inline__ unsigned int __DEFAULT_FN_ATTRS
234
+ __blsi_u32(unsigned int __X)
235
+ {
236
+ return __X & -__X;
237
+ }
238
+
239
+ /// Creates a mask whose bits are set to 1, using bit 0 up to and
240
+ /// including the least significant bit that is set to 1 in the source
241
+ /// operand and returns the result.
242
+ ///
243
+ /// \headerfile <x86intrin.h>
244
+ ///
245
+ /// This intrinsic corresponds to the <c> BLSMSK </c> instruction.
246
+ ///
247
+ /// \param __X
248
+ /// An unsigned integer used to create the mask.
249
+ /// \returns An unsigned integer containing the newly created mask.
250
+ static __inline__ unsigned int __DEFAULT_FN_ATTRS
251
+ __blsmsk_u32(unsigned int __X)
252
+ {
253
+ return __X ^ (__X - 1);
254
+ }
255
+
256
+ /// Clears the least significant bit that is set to 1 in the source
257
+ /// operand and returns the result.
258
+ ///
259
+ /// \headerfile <x86intrin.h>
260
+ ///
261
+ /// This intrinsic corresponds to the <c> BLSR </c> instruction.
262
+ ///
263
+ /// \param __X
264
+ /// An unsigned integer containing the operand to be cleared.
265
+ /// \returns An unsigned integer containing the result of clearing the source
266
+ /// operand.
267
+ static __inline__ unsigned int __DEFAULT_FN_ATTRS
268
+ __blsr_u32(unsigned int __X)
269
+ {
270
+ return __X & (__X - 1);
271
+ }
272
+
273
+ #ifdef __x86_64__
274
+
275
+ #define _andn_u64(a, b) (__andn_u64((a), (b)))
276
+
277
+ /* _bextr_u64 != __bextr_u64 */
278
+ #define _blsi_u64(a) (__blsi_u64((a)))
279
+
280
+ #define _blsmsk_u64(a) (__blsmsk_u64((a)))
281
+
282
+ #define _blsr_u64(a) (__blsr_u64((a)))
283
+
284
+ /// Performs a bitwise AND of the second operand with the one's
285
+ /// complement of the first operand.
286
+ ///
287
+ /// \headerfile <x86intrin.h>
288
+ ///
289
+ /// This intrinsic corresponds to the <c> ANDN </c> instruction.
290
+ ///
291
+ /// \param __X
292
+ /// An unsigned 64-bit integer containing one of the operands.
293
+ /// \param __Y
294
+ /// An unsigned 64-bit integer containing one of the operands.
295
+ /// \returns An unsigned 64-bit integer containing the bitwise AND of the second
296
+ /// operand with the one's complement of the first operand.
297
+ static __inline__ unsigned long long __DEFAULT_FN_ATTRS
298
+ __andn_u64 (unsigned long long __X, unsigned long long __Y)
299
+ {
300
+ return ~__X & __Y;
301
+ }
302
+
303
+ /* AMD-specified, double-leading-underscore version of BEXTR */
304
+ /// Extracts the specified bits from the first operand and returns them
305
+ /// in the least significant bits of the result.
306
+ ///
307
+ /// \headerfile <x86intrin.h>
308
+ ///
309
+ /// This intrinsic corresponds to the <c> BEXTR </c> instruction.
310
+ ///
311
+ /// \param __X
312
+ /// An unsigned 64-bit integer whose bits are to be extracted.
313
+ /// \param __Y
314
+ /// An unsigned 64-bit integer used to specify which bits are extracted. Bits
315
+ /// [7:0] specify the index of the least significant bit. Bits [15:8] specify
316
+ /// the number of bits to be extracted.
317
+ /// \returns An unsigned 64-bit integer whose least significant bits contain the
318
+ /// extracted bits.
319
+ /// \see _bextr_u64
320
+ static __inline__ unsigned long long __DEFAULT_FN_ATTRS
321
+ __bextr_u64(unsigned long long __X, unsigned long long __Y)
322
+ {
323
+ return __builtin_ia32_bextr_u64(__X, __Y);
324
+ }
325
+
326
+ /* Intel-specified, single-leading-underscore version of BEXTR */
327
+ /// Extracts the specified bits from the first operand and returns them
328
+ /// in the least significant bits of the result.
329
+ ///
330
+ /// \headerfile <x86intrin.h>
331
+ ///
332
+ /// This intrinsic corresponds to the <c> BEXTR </c> instruction.
333
+ ///
334
+ /// \param __X
335
+ /// An unsigned 64-bit integer whose bits are to be extracted.
336
+ /// \param __Y
337
+ /// An unsigned integer used to specify the index of the least significant
338
+ /// bit for the bits to be extracted. Bits [7:0] specify the index.
339
+ /// \param __Z
340
+ /// An unsigned integer used to specify the number of bits to be extracted.
341
+ /// Bits [7:0] specify the number of bits.
342
+ /// \returns An unsigned 64-bit integer whose least significant bits contain the
343
+ /// extracted bits.
344
+ /// \see __bextr_u64
345
+ static __inline__ unsigned long long __DEFAULT_FN_ATTRS
346
+ _bextr_u64(unsigned long long __X, unsigned int __Y, unsigned int __Z)
347
+ {
348
+ return __builtin_ia32_bextr_u64 (__X, ((__Y & 0xff) | ((__Z & 0xff) << 8)));
349
+ }
350
+
351
+ /* Intel-specified, single-leading-underscore version of BEXTR2 */
352
+ /// Extracts the specified bits from the first operand and returns them
353
+ /// in the least significant bits of the result.
354
+ ///
355
+ /// \headerfile <x86intrin.h>
356
+ ///
357
+ /// This intrinsic corresponds to the <c> BEXTR </c> instruction.
358
+ ///
359
+ /// \param __X
360
+ /// An unsigned 64-bit integer whose bits are to be extracted.
361
+ /// \param __Y
362
+ /// An unsigned 64-bit integer used to specify which bits are extracted. Bits
363
+ /// [7:0] specify the index of the least significant bit. Bits [15:8] specify
364
+ /// the number of bits to be extracted.
365
+ /// \returns An unsigned 64-bit integer whose least significant bits contain the
366
+ /// extracted bits.
367
+ /// \see __bextr_u64
368
+ static __inline__ unsigned long long __DEFAULT_FN_ATTRS
369
+ _bextr2_u64(unsigned long long __X, unsigned long long __Y) {
370
+ return __builtin_ia32_bextr_u64(__X, __Y);
371
+ }
372
+
373
+ /// Clears all bits in the source except for the least significant bit
374
+ /// containing a value of 1 and returns the result.
375
+ ///
376
+ /// \headerfile <x86intrin.h>
377
+ ///
378
+ /// This intrinsic corresponds to the <c> BLSI </c> instruction.
379
+ ///
380
+ /// \param __X
381
+ /// An unsigned 64-bit integer whose bits are to be cleared.
382
+ /// \returns An unsigned 64-bit integer containing the result of clearing the
383
+ /// bits from the source operand.
384
+ static __inline__ unsigned long long __DEFAULT_FN_ATTRS
385
+ __blsi_u64(unsigned long long __X)
386
+ {
387
+ return __X & -__X;
388
+ }
389
+
390
+ /// Creates a mask whose bits are set to 1, using bit 0 up to and
391
+ /// including the least significant bit that is set to 1 in the source
392
+ /// operand and returns the result.
393
+ ///
394
+ /// \headerfile <x86intrin.h>
395
+ ///
396
+ /// This intrinsic corresponds to the <c> BLSMSK </c> instruction.
397
+ ///
398
+ /// \param __X
399
+ /// An unsigned 64-bit integer used to create the mask.
400
+ /// \returns An unsigned 64-bit integer containing the newly created mask.
401
+ static __inline__ unsigned long long __DEFAULT_FN_ATTRS
402
+ __blsmsk_u64(unsigned long long __X)
403
+ {
404
+ return __X ^ (__X - 1);
405
+ }
406
+
407
+ /// Clears the least significant bit that is set to 1 in the source
408
+ /// operand and returns the result.
409
+ ///
410
+ /// \headerfile <x86intrin.h>
411
+ ///
412
+ /// This intrinsic corresponds to the <c> BLSR </c> instruction.
413
+ ///
414
+ /// \param __X
415
+ /// An unsigned 64-bit integer containing the operand to be cleared.
416
+ /// \returns An unsigned 64-bit integer containing the result of clearing the
417
+ /// source operand.
418
+ static __inline__ unsigned long long __DEFAULT_FN_ATTRS
419
+ __blsr_u64(unsigned long long __X)
420
+ {
421
+ return __X & (__X - 1);
422
+ }
423
+
424
+ #endif /* __x86_64__ */
425
+
426
+ #undef __DEFAULT_FN_ATTRS
427
+
428
+ #endif /* !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) \
429
+ || defined(__BMI__) */
430
+
431
+ #endif /* __BMIINTRIN_H */
@@ -0,0 +1,16 @@
1
+ /*===---- builtins.h - Standard header for extra builtins -----------------===*\
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
+ /// Some legacy compilers have builtin definitions in a file named builtins.h.
10
+ /// This header file has been added to allow compatibility with code that was
11
+ /// written for those compilers. Code may have an include line for this file
12
+ /// and to avoid an error an empty file with this name is provided.
13
+ #ifndef __BUILTINS_H
14
+ #define __BUILTINS_H
15
+
16
+ #endif /* __BUILTINS_H */
@@ -0,0 +1,66 @@
1
+ /*===------ cet.h -Control-flow Enforcement Technology feature ------------===
2
+ * Add x86 feature with IBT and/or SHSTK bits to ELF program property if they
3
+ * are enabled. Otherwise, contents in this header file are unused. This file
4
+ * is mainly design for assembly source code which want to enable CET.
5
+ *
6
+ * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
7
+ * See https://llvm.org/LICENSE.txt for license information.
8
+ * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
9
+ *
10
+ *===-----------------------------------------------------------------------===
11
+ */
12
+ #ifndef __CET_H
13
+ #define __CET_H
14
+
15
+ #ifdef __ASSEMBLER__
16
+
17
+ #ifndef __CET__
18
+ # define _CET_ENDBR
19
+ #endif
20
+
21
+ #ifdef __CET__
22
+
23
+ # ifdef __LP64__
24
+ # if __CET__ & 0x1
25
+ # define _CET_ENDBR endbr64
26
+ # else
27
+ # define _CET_ENDBR
28
+ # endif
29
+ # else
30
+ # if __CET__ & 0x1
31
+ # define _CET_ENDBR endbr32
32
+ # else
33
+ # define _CET_ENDBR
34
+ # endif
35
+ # endif
36
+
37
+
38
+ # ifdef __LP64__
39
+ # define __PROPERTY_ALIGN 3
40
+ # else
41
+ # define __PROPERTY_ALIGN 2
42
+ # endif
43
+
44
+ .pushsection ".note.gnu.property", "a"
45
+ .p2align __PROPERTY_ALIGN
46
+ .long 1f - 0f /* name length. */
47
+ .long 4f - 1f /* data length. */
48
+ /* NT_GNU_PROPERTY_TYPE_0. */
49
+ .long 5 /* note type. */
50
+ 0:
51
+ .asciz "GNU" /* vendor name. */
52
+ 1:
53
+ .p2align __PROPERTY_ALIGN
54
+ /* GNU_PROPERTY_X86_FEATURE_1_AND. */
55
+ .long 0xc0000002 /* pr_type. */
56
+ .long 3f - 2f /* pr_datasz. */
57
+ 2:
58
+ /* GNU_PROPERTY_X86_FEATURE_1_XXX. */
59
+ .long __CET__
60
+ 3:
61
+ .p2align __PROPERTY_ALIGN
62
+ 4:
63
+ .popsection
64
+ #endif
65
+ #endif
66
+ #endif
@@ -0,0 +1,115 @@
1
+ /*===---- cetintrin.h - CET 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
+ #ifndef __IMMINTRIN_H
11
+ #error "Never use <cetintrin.h> directly; include <immintrin.h> instead."
12
+ #endif
13
+
14
+ #ifndef __CETINTRIN_H
15
+ #define __CETINTRIN_H
16
+
17
+ /* Define the default attributes for the functions in this file. */
18
+ #define __DEFAULT_FN_ATTRS \
19
+ __attribute__((__always_inline__, __nodebug__, __target__("shstk")))
20
+
21
+ static __inline__ void __DEFAULT_FN_ATTRS _incsspd(int __a) {
22
+ __builtin_ia32_incsspd((unsigned int)__a);
23
+ }
24
+
25
+ #ifdef __x86_64__
26
+ static __inline__ void __DEFAULT_FN_ATTRS _incsspq(unsigned long long __a) {
27
+ __builtin_ia32_incsspq(__a);
28
+ }
29
+ #endif /* __x86_64__ */
30
+
31
+ #ifdef __x86_64__
32
+ static __inline__ void __DEFAULT_FN_ATTRS _inc_ssp(unsigned int __a) {
33
+ __builtin_ia32_incsspq(__a);
34
+ }
35
+ #else /* __x86_64__ */
36
+ static __inline__ void __DEFAULT_FN_ATTRS _inc_ssp(unsigned int __a) {
37
+ __builtin_ia32_incsspd(__a);
38
+ }
39
+ #endif /* __x86_64__ */
40
+
41
+ static __inline__ unsigned int __DEFAULT_FN_ATTRS _rdsspd(unsigned int __a) {
42
+ return __builtin_ia32_rdsspd(__a);
43
+ }
44
+
45
+ static __inline__ unsigned int __DEFAULT_FN_ATTRS _rdsspd_i32(void) {
46
+ #pragma clang diagnostic push
47
+ #pragma clang diagnostic ignored "-Wuninitialized"
48
+ unsigned int t;
49
+ return __builtin_ia32_rdsspd(t);
50
+ #pragma clang diagnostic pop
51
+ }
52
+
53
+ #ifdef __x86_64__
54
+ static __inline__ unsigned long long __DEFAULT_FN_ATTRS _rdsspq(unsigned long long __a) {
55
+ return __builtin_ia32_rdsspq(__a);
56
+ }
57
+
58
+ static __inline__ unsigned long long __DEFAULT_FN_ATTRS _rdsspq_i64(void) {
59
+ #pragma clang diagnostic push
60
+ #pragma clang diagnostic ignored "-Wuninitialized"
61
+ unsigned long long t;
62
+ return __builtin_ia32_rdsspq(t);
63
+ #pragma clang diagnostic pop
64
+ }
65
+ #endif /* __x86_64__ */
66
+
67
+ #ifdef __x86_64__
68
+ static __inline__ unsigned long long __DEFAULT_FN_ATTRS _get_ssp(void) {
69
+ return __builtin_ia32_rdsspq(0);
70
+ }
71
+ #else /* __x86_64__ */
72
+ static __inline__ unsigned int __DEFAULT_FN_ATTRS _get_ssp(void) {
73
+ return __builtin_ia32_rdsspd(0);
74
+ }
75
+ #endif /* __x86_64__ */
76
+
77
+ static __inline__ void __DEFAULT_FN_ATTRS _saveprevssp(void) {
78
+ __builtin_ia32_saveprevssp();
79
+ }
80
+
81
+ static __inline__ void __DEFAULT_FN_ATTRS _rstorssp(void * __p) {
82
+ __builtin_ia32_rstorssp(__p);
83
+ }
84
+
85
+ static __inline__ void __DEFAULT_FN_ATTRS _wrssd(unsigned int __a, void * __p) {
86
+ __builtin_ia32_wrssd(__a, __p);
87
+ }
88
+
89
+ #ifdef __x86_64__
90
+ static __inline__ void __DEFAULT_FN_ATTRS _wrssq(unsigned long long __a, void * __p) {
91
+ __builtin_ia32_wrssq(__a, __p);
92
+ }
93
+ #endif /* __x86_64__ */
94
+
95
+ static __inline__ void __DEFAULT_FN_ATTRS _wrussd(unsigned int __a, void * __p) {
96
+ __builtin_ia32_wrussd(__a, __p);
97
+ }
98
+
99
+ #ifdef __x86_64__
100
+ static __inline__ void __DEFAULT_FN_ATTRS _wrussq(unsigned long long __a, void * __p) {
101
+ __builtin_ia32_wrussq(__a, __p);
102
+ }
103
+ #endif /* __x86_64__ */
104
+
105
+ static __inline__ void __DEFAULT_FN_ATTRS _setssbsy(void) {
106
+ __builtin_ia32_setssbsy();
107
+ }
108
+
109
+ static __inline__ void __DEFAULT_FN_ATTRS _clrssbsy(void * __p) {
110
+ __builtin_ia32_clrssbsy(__p);
111
+ }
112
+
113
+ #undef __DEFAULT_FN_ATTRS
114
+
115
+ #endif /* __CETINTRIN_H */
@@ -0,0 +1,36 @@
1
+ /*===---- cldemoteintrin.h - CLDEMOTE 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 <cldemoteintrin.h> directly; include <x86intrin.h> instead."
12
+ #endif
13
+
14
+ #ifndef __CLDEMOTEINTRIN_H
15
+ #define __CLDEMOTEINTRIN_H
16
+
17
+ /* Define the default attributes for the functions in this file. */
18
+ #define __DEFAULT_FN_ATTRS \
19
+ __attribute__((__always_inline__, __nodebug__, __target__("cldemote")))
20
+
21
+ /// Hint to hardware that the cache line that contains \p __P should be demoted
22
+ /// from the cache closest to the processor core to a level more distant from
23
+ /// the processor core.
24
+ ///
25
+ /// \headerfile <x86intrin.h>
26
+ ///
27
+ /// This intrinsic corresponds to the <c> CLDEMOTE </c> instruction.
28
+ static __inline__ void __DEFAULT_FN_ATTRS
29
+ _cldemote(const void * __P) {
30
+ __builtin_ia32_cldemote(__P);
31
+ }
32
+
33
+ #define _mm_cldemote(p) _cldemote(p)
34
+ #undef __DEFAULT_FN_ATTRS
35
+
36
+ #endif