@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,238 @@
1
+ /*===-------------------- sm3intrin.h - SM3 intrinsics ---------------------===
2
+ *
3
+ * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ * See https://llvm.org/LICENSE.txt for license information.
5
+ * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ *
7
+ *===-----------------------------------------------------------------------===
8
+ */
9
+
10
+ #ifndef __IMMINTRIN_H
11
+ #error "Never use <sm3intrin.h> directly; include <immintrin.h> instead."
12
+ #endif // __IMMINTRIN_H
13
+
14
+ #ifndef __SM3INTRIN_H
15
+ #define __SM3INTRIN_H
16
+
17
+ #define __DEFAULT_FN_ATTRS128 \
18
+ __attribute__((__always_inline__, __nodebug__, __target__("sm3"), \
19
+ __min_vector_width__(128)))
20
+
21
+ /// This intrinisc is one of the two SM3 message scheduling intrinsics. The
22
+ /// intrinsic performs an initial calculation for the next four SM3 message
23
+ /// words. The calculated results are stored in \a dst.
24
+ ///
25
+ /// \headerfile <immintrin.h>
26
+ ///
27
+ /// \code
28
+ /// __m128i _mm_sm3msg1_epi32(__m128i __A, __m128i __B, __m128i __C)
29
+ /// \endcode
30
+ ///
31
+ /// This intrinsic corresponds to the \c VSM3MSG1 instruction.
32
+ ///
33
+ /// \param __A
34
+ /// A 128-bit vector of [4 x int].
35
+ /// \param __B
36
+ /// A 128-bit vector of [4 x int].
37
+ /// \param __C
38
+ /// A 128-bit vector of [4 x int].
39
+ /// \returns
40
+ /// A 128-bit vector of [4 x int].
41
+ ///
42
+ /// \code{.operation}
43
+ /// DEFINE ROL32(dword, n) {
44
+ /// count := n % 32
45
+ /// dest := (dword << count) | (dword >> (32 - count))
46
+ /// RETURN dest
47
+ /// }
48
+ /// DEFINE P1(x) {
49
+ /// RETURN x ^ ROL32(x, 15) ^ ROL32(x, 23)
50
+ /// }
51
+ /// W[0] := __C.dword[0]
52
+ /// W[1] := __C.dword[1]
53
+ /// W[2] := __C.dword[2]
54
+ /// W[3] := __C.dword[3]
55
+ /// W[7] := __A.dword[0]
56
+ /// W[8] := __A.dword[1]
57
+ /// W[9] := __A.dword[2]
58
+ /// W[10] := __A.dword[3]
59
+ /// W[13] := __B.dword[0]
60
+ /// W[14] := __B.dword[1]
61
+ /// W[15] := __B.dword[2]
62
+ /// TMP0 := W[7] ^ W[0] ^ ROL32(W[13], 15)
63
+ /// TMP1 := W[8] ^ W[1] ^ ROL32(W[14], 15)
64
+ /// TMP2 := W[9] ^ W[2] ^ ROL32(W[15], 15)
65
+ /// TMP3 := W[10] ^ W[3]
66
+ /// dst.dword[0] := P1(TMP0)
67
+ /// dst.dword[1] := P1(TMP1)
68
+ /// dst.dword[2] := P1(TMP2)
69
+ /// dst.dword[3] := P1(TMP3)
70
+ /// dst[MAX:128] := 0
71
+ /// \endcode
72
+ static __inline__ __m128i __DEFAULT_FN_ATTRS128 _mm_sm3msg1_epi32(__m128i __A,
73
+ __m128i __B,
74
+ __m128i __C) {
75
+ return (__m128i)__builtin_ia32_vsm3msg1((__v4su)__A, (__v4su)__B,
76
+ (__v4su)__C);
77
+ }
78
+
79
+ /// This intrinisc is one of the two SM3 message scheduling intrinsics. The
80
+ /// intrinsic performs the final calculation for the next four SM3 message
81
+ /// words. The calculated results are stored in \a dst.
82
+ ///
83
+ /// \headerfile <immintrin.h>
84
+ ///
85
+ /// \code
86
+ /// __m128i _mm_sm3msg2_epi32(__m128i __A, __m128i __B, __m128i __C)
87
+ /// \endcode
88
+ ///
89
+ /// This intrinsic corresponds to the \c VSM3MSG2 instruction.
90
+ ///
91
+ /// \param __A
92
+ /// A 128-bit vector of [4 x int].
93
+ /// \param __B
94
+ /// A 128-bit vector of [4 x int].
95
+ /// \param __C
96
+ /// A 128-bit vector of [4 x int].
97
+ /// \returns
98
+ /// A 128-bit vector of [4 x int].
99
+ ///
100
+ /// \code{.operation}
101
+ /// DEFINE ROL32(dword, n) {
102
+ /// count := n % 32
103
+ /// dest := (dword << count) | (dword >> (32-count))
104
+ /// RETURN dest
105
+ /// }
106
+ /// WTMP[0] := __A.dword[0]
107
+ /// WTMP[1] := __A.dword[1]
108
+ /// WTMP[2] := __A.dword[2]
109
+ /// WTMP[3] := __A.dword[3]
110
+ /// W[3] := __B.dword[0]
111
+ /// W[4] := __B.dword[1]
112
+ /// W[5] := __B.dword[2]
113
+ /// W[6] := __B.dword[3]
114
+ /// W[10] := __C.dword[0]
115
+ /// W[11] := __C.dword[1]
116
+ /// W[12] := __C.dword[2]
117
+ /// W[13] := __C.dword[3]
118
+ /// W[16] := ROL32(W[3], 7) ^ W[10] ^ WTMP[0]
119
+ /// W[17] := ROL32(W[4], 7) ^ W[11] ^ WTMP[1]
120
+ /// W[18] := ROL32(W[5], 7) ^ W[12] ^ WTMP[2]
121
+ /// W[19] := ROL32(W[6], 7) ^ W[13] ^ WTMP[3]
122
+ /// W[19] := W[19] ^ ROL32(W[16], 6) ^ ROL32(W[16], 15) ^ ROL32(W[16], 30)
123
+ /// dst.dword[0] := W[16]
124
+ /// dst.dword[1] := W[17]
125
+ /// dst.dword[2] := W[18]
126
+ /// dst.dword[3] := W[19]
127
+ /// dst[MAX:128] := 0
128
+ /// \endcode
129
+ static __inline__ __m128i __DEFAULT_FN_ATTRS128 _mm_sm3msg2_epi32(__m128i __A,
130
+ __m128i __B,
131
+ __m128i __C) {
132
+ return (__m128i)__builtin_ia32_vsm3msg2((__v4su)__A, (__v4su)__B,
133
+ (__v4su)__C);
134
+ }
135
+
136
+ /// This intrinsic performs two rounds of SM3 operation using initial SM3 state
137
+ /// (C, D, G, H) from \a __A, an initial SM3 states (A, B, E, F)
138
+ /// from \a __B and a pre-computed words from the \a __C. \a __A with
139
+ /// initial SM3 state of (C, D, G, H) assumes input of non-rotated left
140
+ /// variables from previous state. The updated SM3 state (A, B, E, F) is
141
+ /// written to \a __A. The \a imm8 should contain the even round number
142
+ /// for the first of the two rounds computed by this instruction. The
143
+ /// computation masks the \a imm8 value by AND’ing it with 0x3E so that only
144
+ /// even round numbers from 0 through 62 are used for this operation. The
145
+ /// calculated results are stored in \a dst.
146
+ ///
147
+ /// \headerfile <immintrin.h>
148
+ ///
149
+ /// \code
150
+ /// __m128i _mm_sm3rnds2_epi32(__m128i __A, __m128i __B, __m128i __C, const int
151
+ /// imm8) \endcode
152
+ ///
153
+ /// This intrinsic corresponds to the \c VSM3RNDS2 instruction.
154
+ ///
155
+ /// \param __A
156
+ /// A 128-bit vector of [4 x int].
157
+ /// \param __B
158
+ /// A 128-bit vector of [4 x int].
159
+ /// \param __C
160
+ /// A 128-bit vector of [4 x int].
161
+ /// \param imm8
162
+ /// A 8-bit constant integer.
163
+ /// \returns
164
+ /// A 128-bit vector of [4 x int].
165
+ ///
166
+ /// \code{.operation}
167
+ /// DEFINE ROL32(dword, n) {
168
+ /// count := n % 32
169
+ /// dest := (dword << count) | (dword >> (32-count))
170
+ /// RETURN dest
171
+ /// }
172
+ /// DEFINE P0(dword) {
173
+ /// RETURN dword ^ ROL32(dword, 9) ^ ROL32(dword, 17)
174
+ /// }
175
+ /// DEFINE FF(x,y,z, round){
176
+ /// IF round < 16
177
+ /// RETURN (x ^ y ^ z)
178
+ /// ELSE
179
+ /// RETURN (x & y) | (x & z) | (y & z)
180
+ /// FI
181
+ /// }
182
+ /// DEFINE GG(x, y, z, round){
183
+ /// IF round < 16
184
+ /// RETURN (x ^ y ^ z)
185
+ /// ELSE
186
+ /// RETURN (x & y) | (~x & z)
187
+ /// FI
188
+ /// }
189
+ /// A[0] := __B.dword[3]
190
+ /// B[0] := __B.dword[2]
191
+ /// C[0] := __A.dword[3]
192
+ /// D[0] := __A.dword[2]
193
+ /// E[0] := __B.dword[1]
194
+ /// F[0] := __B.dword[0]
195
+ /// G[0] := __A.dword[1]
196
+ /// H[0] := __A.dword[0]
197
+ /// W[0] := __C.dword[0]
198
+ /// W[1] := __C.dword[1]
199
+ /// W[4] := __C.dword[2]
200
+ /// W[5] := __C.dword[3]
201
+ /// C[0] := ROL32(C[0], 9)
202
+ /// D[0] := ROL32(D[0], 9)
203
+ /// G[0] := ROL32(G[0], 19)
204
+ /// H[0] := ROL32(H[0], 19)
205
+ /// ROUND := __D & 0x3E
206
+ /// IF ROUND < 16
207
+ /// CONST := 0x79CC4519
208
+ /// ELSE
209
+ /// CONST := 0x7A879D8A
210
+ /// FI
211
+ /// CONST := ROL32(CONST,ROUND)
212
+ /// FOR i:= 0 to 1
213
+ /// S1 := ROL32((ROL32(A[i], 12) + E[i] + CONST), 7)
214
+ /// S2 := S1 ^ ROL32(A[i], 12)
215
+ /// T1 := FF(A[i], B[i], C[i], ROUND) + D[i] + S2 + (W[i] ^ W[i+4])
216
+ /// T2 := GG(E[i], F[i], G[i], ROUND) + H[i] + S1 + W[i]
217
+ /// D[i+1] := C[i]
218
+ /// C[i+1] := ROL32(B[i],9)
219
+ /// B[i+1] := A[i]
220
+ /// A[i+1] := T1
221
+ /// H[i+1] := G[i]
222
+ /// G[i+1] := ROL32(F[i], 19)
223
+ /// F[i+1] := E[i]
224
+ /// E[i+1] := P0(T2)
225
+ /// CONST := ROL32(CONST, 1)
226
+ /// ENDFOR
227
+ /// dst.dword[3] := A[2]
228
+ /// dst.dword[2] := B[2]
229
+ /// dst.dword[1] := E[2]
230
+ /// dst.dword[0] := F[2]
231
+ /// dst[MAX:128] := 0
232
+ /// \endcode
233
+ #define _mm_sm3rnds2_epi32(A, B, C, D) \
234
+ (__m128i) __builtin_ia32_vsm3rnds2((__v4su)A, (__v4su)B, (__v4su)C, (int)D)
235
+
236
+ #undef __DEFAULT_FN_ATTRS128
237
+
238
+ #endif // __SM3INTRIN_H
@@ -0,0 +1,269 @@
1
+ /*===--------------- sm4intrin.h - SM4 intrinsics -----------------===
2
+ *
3
+ * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ * See https://llvm.org/LICENSE.txt for license information.
5
+ * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ *
7
+ *===-----------------------------------------------------------------------===
8
+ */
9
+
10
+ #ifndef __IMMINTRIN_H
11
+ #error "Never use <sm4intrin.h> directly; include <immintrin.h> instead."
12
+ #endif // __IMMINTRIN_H
13
+
14
+ #ifndef __SM4INTRIN_H
15
+ #define __SM4INTRIN_H
16
+
17
+ /// This intrinsic performs four rounds of SM4 key expansion. The intrinsic
18
+ /// operates on independent 128-bit lanes. The calculated results are
19
+ /// stored in \a dst.
20
+ /// \headerfile <immintrin.h>
21
+ ///
22
+ /// \code
23
+ /// __m128i _mm_sm4key4_epi32(__m128i __A, __m128i __B)
24
+ /// \endcode
25
+ ///
26
+ /// This intrinsic corresponds to the \c VSM4KEY4 instruction.
27
+ ///
28
+ /// \param __A
29
+ /// A 128-bit vector of [4 x int].
30
+ /// \param __B
31
+ /// A 128-bit vector of [4 x int].
32
+ /// \returns
33
+ /// A 128-bit vector of [4 x int].
34
+ ///
35
+ /// \code{.operation}
36
+ /// DEFINE ROL32(dword, n) {
37
+ /// count := n % 32
38
+ /// dest := (dword << count) | (dword >> (32-count))
39
+ /// RETURN dest
40
+ /// }
41
+ /// DEFINE SBOX_BYTE(dword, i) {
42
+ /// RETURN sbox[dword.byte[i]]
43
+ /// }
44
+ /// DEFINE lower_t(dword) {
45
+ /// tmp.byte[0] := SBOX_BYTE(dword, 0)
46
+ /// tmp.byte[1] := SBOX_BYTE(dword, 1)
47
+ /// tmp.byte[2] := SBOX_BYTE(dword, 2)
48
+ /// tmp.byte[3] := SBOX_BYTE(dword, 3)
49
+ /// RETURN tmp
50
+ /// }
51
+ /// DEFINE L_KEY(dword) {
52
+ /// RETURN dword ^ ROL32(dword, 13) ^ ROL32(dword, 23)
53
+ /// }
54
+ /// DEFINE T_KEY(dword) {
55
+ /// RETURN L_KEY(lower_t(dword))
56
+ /// }
57
+ /// DEFINE F_KEY(X0, X1, X2, X3, round_key) {
58
+ /// RETURN X0 ^ T_KEY(X1 ^ X2 ^ X3 ^ round_key)
59
+ /// }
60
+ /// FOR i:= 0 to 0
61
+ /// P[0] := __B.xmm[i].dword[0]
62
+ /// P[1] := __B.xmm[i].dword[1]
63
+ /// P[2] := __B.xmm[i].dword[2]
64
+ /// P[3] := __B.xmm[i].dword[3]
65
+ /// C[0] := F_KEY(P[0], P[1], P[2], P[3], __A.xmm[i].dword[0])
66
+ /// C[1] := F_KEY(P[1], P[2], P[3], C[0], __A.xmm[i].dword[1])
67
+ /// C[2] := F_KEY(P[2], P[3], C[0], C[1], __A.xmm[i].dword[2])
68
+ /// C[3] := F_KEY(P[3], C[0], C[1], C[2], __A.xmm[i].dword[3])
69
+ /// DEST.xmm[i].dword[0] := C[0]
70
+ /// DEST.xmm[i].dword[1] := C[1]
71
+ /// DEST.xmm[i].dword[2] := C[2]
72
+ /// DEST.xmm[i].dword[3] := C[3]
73
+ /// ENDFOR
74
+ /// DEST[MAX:128] := 0
75
+ /// \endcode
76
+ #define _mm_sm4key4_epi32(A, B) \
77
+ (__m128i) __builtin_ia32_vsm4key4128((__v4su)A, (__v4su)B)
78
+
79
+ /// This intrinsic performs four rounds of SM4 key expansion. The intrinsic
80
+ /// operates on independent 128-bit lanes. The calculated results are
81
+ /// stored in \a dst.
82
+ /// \headerfile <immintrin.h>
83
+ ///
84
+ /// \code
85
+ /// __m256i _mm256_sm4key4_epi32(__m256i __A, __m256i __B)
86
+ /// \endcode
87
+ ///
88
+ /// This intrinsic corresponds to the \c VSM4KEY4 instruction.
89
+ ///
90
+ /// \param __A
91
+ /// A 256-bit vector of [8 x int].
92
+ /// \param __B
93
+ /// A 256-bit vector of [8 x int].
94
+ /// \returns
95
+ /// A 256-bit vector of [8 x int].
96
+ ///
97
+ /// \code{.operation}
98
+ /// DEFINE ROL32(dword, n) {
99
+ /// count := n % 32
100
+ /// dest := (dword << count) | (dword >> (32-count))
101
+ /// RETURN dest
102
+ /// }
103
+ /// DEFINE SBOX_BYTE(dword, i) {
104
+ /// RETURN sbox[dword.byte[i]]
105
+ /// }
106
+ /// DEFINE lower_t(dword) {
107
+ /// tmp.byte[0] := SBOX_BYTE(dword, 0)
108
+ /// tmp.byte[1] := SBOX_BYTE(dword, 1)
109
+ /// tmp.byte[2] := SBOX_BYTE(dword, 2)
110
+ /// tmp.byte[3] := SBOX_BYTE(dword, 3)
111
+ /// RETURN tmp
112
+ /// }
113
+ /// DEFINE L_KEY(dword) {
114
+ /// RETURN dword ^ ROL32(dword, 13) ^ ROL32(dword, 23)
115
+ /// }
116
+ /// DEFINE T_KEY(dword) {
117
+ /// RETURN L_KEY(lower_t(dword))
118
+ /// }
119
+ /// DEFINE F_KEY(X0, X1, X2, X3, round_key) {
120
+ /// RETURN X0 ^ T_KEY(X1 ^ X2 ^ X3 ^ round_key)
121
+ /// }
122
+ /// FOR i:= 0 to 1
123
+ /// P[0] := __B.xmm[i].dword[0]
124
+ /// P[1] := __B.xmm[i].dword[1]
125
+ /// P[2] := __B.xmm[i].dword[2]
126
+ /// P[3] := __B.xmm[i].dword[3]
127
+ /// C[0] := F_KEY(P[0], P[1], P[2], P[3], __A.xmm[i].dword[0])
128
+ /// C[1] := F_KEY(P[1], P[2], P[3], C[0], __A.xmm[i].dword[1])
129
+ /// C[2] := F_KEY(P[2], P[3], C[0], C[1], __A.xmm[i].dword[2])
130
+ /// C[3] := F_KEY(P[3], C[0], C[1], C[2], __A.xmm[i].dword[3])
131
+ /// DEST.xmm[i].dword[0] := C[0]
132
+ /// DEST.xmm[i].dword[1] := C[1]
133
+ /// DEST.xmm[i].dword[2] := C[2]
134
+ /// DEST.xmm[i].dword[3] := C[3]
135
+ /// ENDFOR
136
+ /// DEST[MAX:256] := 0
137
+ /// \endcode
138
+ #define _mm256_sm4key4_epi32(A, B) \
139
+ (__m256i) __builtin_ia32_vsm4key4256((__v8su)A, (__v8su)B)
140
+
141
+ /// This intrinisc performs four rounds of SM4 encryption. The intrinisc
142
+ /// operates on independent 128-bit lanes. The calculated results are
143
+ /// stored in \a dst.
144
+ /// \headerfile <immintrin.h>
145
+ ///
146
+ /// \code
147
+ /// __m128i _mm_sm4rnds4_epi32(__m128i __A, __m128i __B)
148
+ /// \endcode
149
+ ///
150
+ /// This intrinsic corresponds to the \c VSM4RNDS4 instruction.
151
+ ///
152
+ /// \param __A
153
+ /// A 128-bit vector of [4 x int].
154
+ /// \param __B
155
+ /// A 128-bit vector of [4 x int].
156
+ /// \returns
157
+ /// A 128-bit vector of [4 x int].
158
+ ///
159
+ /// \code{.operation}
160
+ /// DEFINE ROL32(dword, n) {
161
+ /// count := n % 32
162
+ /// dest := (dword << count) | (dword >> (32-count))
163
+ /// RETURN dest
164
+ /// }
165
+ /// DEFINE lower_t(dword) {
166
+ /// tmp.byte[0] := SBOX_BYTE(dword, 0)
167
+ /// tmp.byte[1] := SBOX_BYTE(dword, 1)
168
+ /// tmp.byte[2] := SBOX_BYTE(dword, 2)
169
+ /// tmp.byte[3] := SBOX_BYTE(dword, 3)
170
+ /// RETURN tmp
171
+ /// }
172
+ /// DEFINE L_RND(dword) {
173
+ /// tmp := dword
174
+ /// tmp := tmp ^ ROL32(dword, 2)
175
+ /// tmp := tmp ^ ROL32(dword, 10)
176
+ /// tmp := tmp ^ ROL32(dword, 18)
177
+ /// tmp := tmp ^ ROL32(dword, 24)
178
+ /// RETURN tmp
179
+ /// }
180
+ /// DEFINE T_RND(dword) {
181
+ /// RETURN L_RND(lower_t(dword))
182
+ /// }
183
+ /// DEFINE F_RND(X0, X1, X2, X3, round_key) {
184
+ /// RETURN X0 ^ T_RND(X1 ^ X2 ^ X3 ^ round_key)
185
+ /// }
186
+ /// FOR i:= 0 to 0
187
+ /// P[0] := __B.xmm[i].dword[0]
188
+ /// P[1] := __B.xmm[i].dword[1]
189
+ /// P[2] := __B.xmm[i].dword[2]
190
+ /// P[3] := __B.xmm[i].dword[3]
191
+ /// C[0] := F_RND(P[0], P[1], P[2], P[3], __A.xmm[i].dword[0])
192
+ /// C[1] := F_RND(P[1], P[2], P[3], C[0], __A.xmm[i].dword[1])
193
+ /// C[2] := F_RND(P[2], P[3], C[0], C[1], __A.xmm[i].dword[2])
194
+ /// C[3] := F_RND(P[3], C[0], C[1], C[2], __A.xmm[i].dword[3])
195
+ /// DEST.xmm[i].dword[0] := C[0]
196
+ /// DEST.xmm[i].dword[1] := C[1]
197
+ /// DEST.xmm[i].dword[2] := C[2]
198
+ /// DEST.xmm[i].dword[3] := C[3]
199
+ /// ENDFOR
200
+ /// DEST[MAX:128] := 0
201
+ /// \endcode
202
+ #define _mm_sm4rnds4_epi32(A, B) \
203
+ (__m128i) __builtin_ia32_vsm4rnds4128((__v4su)A, (__v4su)B)
204
+
205
+ /// This intrinisc performs four rounds of SM4 encryption. The intrinisc
206
+ /// operates on independent 128-bit lanes. The calculated results are
207
+ /// stored in \a dst.
208
+ /// \headerfile <immintrin.h>
209
+ ///
210
+ /// \code
211
+ /// __m256i _mm256_sm4rnds4_epi32(__m256i __A, __m256i __B)
212
+ /// \endcode
213
+ ///
214
+ /// This intrinsic corresponds to the \c VSM4RNDS4 instruction.
215
+ ///
216
+ /// \param __A
217
+ /// A 256-bit vector of [8 x int].
218
+ /// \param __B
219
+ /// A 256-bit vector of [8 x int].
220
+ /// \returns
221
+ /// A 256-bit vector of [8 x int].
222
+ ///
223
+ /// \code{.operation}
224
+ /// DEFINE ROL32(dword, n) {
225
+ /// count := n % 32
226
+ /// dest := (dword << count) | (dword >> (32-count))
227
+ /// RETURN dest
228
+ /// }
229
+ /// DEFINE lower_t(dword) {
230
+ /// tmp.byte[0] := SBOX_BYTE(dword, 0)
231
+ /// tmp.byte[1] := SBOX_BYTE(dword, 1)
232
+ /// tmp.byte[2] := SBOX_BYTE(dword, 2)
233
+ /// tmp.byte[3] := SBOX_BYTE(dword, 3)
234
+ /// RETURN tmp
235
+ /// }
236
+ /// DEFINE L_RND(dword) {
237
+ /// tmp := dword
238
+ /// tmp := tmp ^ ROL32(dword, 2)
239
+ /// tmp := tmp ^ ROL32(dword, 10)
240
+ /// tmp := tmp ^ ROL32(dword, 18)
241
+ /// tmp := tmp ^ ROL32(dword, 24)
242
+ /// RETURN tmp
243
+ /// }
244
+ /// DEFINE T_RND(dword) {
245
+ /// RETURN L_RND(lower_t(dword))
246
+ /// }
247
+ /// DEFINE F_RND(X0, X1, X2, X3, round_key) {
248
+ /// RETURN X0 ^ T_RND(X1 ^ X2 ^ X3 ^ round_key)
249
+ /// }
250
+ /// FOR i:= 0 to 0
251
+ /// P[0] := __B.xmm[i].dword[0]
252
+ /// P[1] := __B.xmm[i].dword[1]
253
+ /// P[2] := __B.xmm[i].dword[2]
254
+ /// P[3] := __B.xmm[i].dword[3]
255
+ /// C[0] := F_RND(P[0], P[1], P[2], P[3], __A.xmm[i].dword[0])
256
+ /// C[1] := F_RND(P[1], P[2], P[3], C[0], __A.xmm[i].dword[1])
257
+ /// C[2] := F_RND(P[2], P[3], C[0], C[1], __A.xmm[i].dword[2])
258
+ /// C[3] := F_RND(P[3], C[0], C[1], C[2], __A.xmm[i].dword[3])
259
+ /// DEST.xmm[i].dword[0] := C[0]
260
+ /// DEST.xmm[i].dword[1] := C[1]
261
+ /// DEST.xmm[i].dword[2] := C[2]
262
+ /// DEST.xmm[i].dword[3] := C[3]
263
+ /// ENDFOR
264
+ /// DEST[MAX:256] := 0
265
+ /// \endcode
266
+ #define _mm256_sm4rnds4_epi32(A, B) \
267
+ (__m256i) __builtin_ia32_vsm4rnds4256((__v8su)A, (__v8su)B)
268
+
269
+ #endif // __SM4INTRIN_H