@cpp-linter/clang-tidy-linux-arm64 18.1.5 → 19.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) hide show
  1. package/README.md +2 -2
  2. package/bin/clang-tidy +2 -2
  3. package/lib/clang/{18 → 19}/include/__clang_cuda_intrinsics.h +1 -3
  4. package/lib/clang/19/include/__stdarg_header_macro.h +12 -0
  5. package/lib/clang/19/include/__stddef_header_macro.h +12 -0
  6. package/lib/clang/{18 → 19}/include/arm_acle.h +31 -5
  7. package/lib/clang/{18 → 19}/include/arm_fp16.h +1 -1
  8. package/lib/clang/{18 → 19}/include/arm_neon.h +43796 -43801
  9. package/lib/clang/{18 → 19}/include/arm_sme.h +408 -1
  10. package/lib/clang/{18 → 19}/include/arm_sve.h +27266 -27714
  11. package/lib/clang/{18 → 19}/include/arm_vector_types.h +5 -5
  12. package/lib/clang/{18 → 19}/include/avx512fp16intrin.h +38 -38
  13. package/lib/clang/{18 → 19}/include/avxintrin.h +58 -44
  14. package/lib/clang/{18 → 19}/include/bmiintrin.h +2 -4
  15. package/lib/clang/{18 → 19}/include/builtins.h +3 -0
  16. package/lib/clang/{18 → 19}/include/cpuid.h +23 -3
  17. package/lib/clang/{18 → 19}/include/cuda_wrappers/algorithm +1 -1
  18. package/lib/clang/{18 → 19}/include/emmintrin.h +301 -170
  19. package/lib/clang/{18 → 19}/include/float.h +28 -0
  20. package/lib/clang/{18 → 19}/include/fmaintrin.h +32 -16
  21. package/lib/clang/{18 → 19}/include/hlsl/hlsl_basic_types.h +10 -3
  22. package/lib/clang/19/include/hlsl/hlsl_intrinsics.h +1697 -0
  23. package/lib/clang/{18 → 19}/include/ia32intrin.h +36 -36
  24. package/lib/clang/{18 → 19}/include/immintrin.h +85 -159
  25. package/lib/clang/{18 → 19}/include/intrin.h +48 -224
  26. package/lib/clang/19/include/intrin0.h +247 -0
  27. package/lib/clang/{18 → 19}/include/inttypes.h +4 -0
  28. package/lib/clang/{18 → 19}/include/iso646.h +4 -0
  29. package/lib/clang/{18 → 19}/include/keylockerintrin.h +5 -8
  30. package/lib/clang/{18 → 19}/include/limits.h +5 -0
  31. package/lib/clang/{18 → 19}/include/llvm_libc_wrappers/assert.h +1 -1
  32. package/lib/clang/19/include/mm3dnow.h +22 -0
  33. package/lib/clang/{18 → 19}/include/mmintrin.h +76 -84
  34. package/lib/clang/{18 → 19}/include/module.modulemap +14 -1
  35. package/lib/clang/{18 → 19}/include/opencl-c-base.h +4 -0
  36. package/lib/clang/{18 → 19}/include/opencl-c.h +15 -0
  37. package/lib/clang/{18 → 19}/include/prfchwintrin.h +10 -8
  38. package/lib/clang/19/include/ptrauth.h +330 -0
  39. package/lib/clang/{18 → 19}/include/riscv_vector.h +0 -4
  40. package/lib/clang/19/include/sifive_vector.h +118 -0
  41. package/lib/clang/{18 → 19}/include/smmintrin.h +12 -12
  42. package/lib/clang/{18 → 19}/include/stdalign.h +5 -0
  43. package/lib/clang/{18 → 19}/include/stdarg.h +15 -19
  44. package/lib/clang/{18 → 19}/include/stdatomic.h +11 -1
  45. package/lib/clang/{18 → 19}/include/stdbool.h +5 -0
  46. package/lib/clang/{18 → 19}/include/stddef.h +38 -22
  47. package/lib/clang/{18 → 19}/include/stdint.h +5 -0
  48. package/lib/clang/{18 → 19}/include/stdnoreturn.h +6 -0
  49. package/lib/clang/{18 → 19}/include/tmmintrin.h +20 -16
  50. package/lib/clang/{18 → 19}/include/varargs.h +5 -1
  51. package/lib/clang/{18 → 19}/include/x86gprintrin.h +7 -14
  52. package/lib/clang/19/include/x86intrin.h +53 -0
  53. package/lib/clang/{18 → 19}/include/xmmintrin.h +285 -99
  54. package/lib/clang/19/include/yvals_core.h +25 -0
  55. package/lib/clang/19/include/zos_wrappers/builtins.h +18 -0
  56. package/package.json +6 -6
  57. package/lib/clang/18/include/avx512erintrin.h +0 -271
  58. package/lib/clang/18/include/avx512pfintrin.h +0 -92
  59. package/lib/clang/18/include/hlsl/hlsl_intrinsics.h +0 -624
  60. package/lib/clang/18/include/mm3dnow.h +0 -157
  61. package/lib/clang/18/include/sifive_vector.h +0 -16
  62. package/lib/clang/18/include/x86intrin.h +0 -67
  63. /package/lib/clang/{18 → 19}/include/__clang_cuda_builtin_vars.h +0 -0
  64. /package/lib/clang/{18 → 19}/include/__clang_cuda_cmath.h +0 -0
  65. /package/lib/clang/{18 → 19}/include/__clang_cuda_complex_builtins.h +0 -0
  66. /package/lib/clang/{18 → 19}/include/__clang_cuda_device_functions.h +0 -0
  67. /package/lib/clang/{18 → 19}/include/__clang_cuda_libdevice_declares.h +0 -0
  68. /package/lib/clang/{18 → 19}/include/__clang_cuda_math.h +0 -0
  69. /package/lib/clang/{18 → 19}/include/__clang_cuda_math_forward_declares.h +0 -0
  70. /package/lib/clang/{18 → 19}/include/__clang_cuda_runtime_wrapper.h +0 -0
  71. /package/lib/clang/{18 → 19}/include/__clang_cuda_texture_intrinsics.h +0 -0
  72. /package/lib/clang/{18 → 19}/include/__clang_hip_cmath.h +0 -0
  73. /package/lib/clang/{18 → 19}/include/__clang_hip_libdevice_declares.h +0 -0
  74. /package/lib/clang/{18 → 19}/include/__clang_hip_math.h +0 -0
  75. /package/lib/clang/{18 → 19}/include/__clang_hip_runtime_wrapper.h +0 -0
  76. /package/lib/clang/{18 → 19}/include/__clang_hip_stdlib.h +0 -0
  77. /package/lib/clang/{18 → 19}/include/__stdarg___gnuc_va_list.h +0 -0
  78. /package/lib/clang/{18 → 19}/include/__stdarg___va_copy.h +0 -0
  79. /package/lib/clang/{18 → 19}/include/__stdarg_va_arg.h +0 -0
  80. /package/lib/clang/{18 → 19}/include/__stdarg_va_copy.h +0 -0
  81. /package/lib/clang/{18 → 19}/include/__stdarg_va_list.h +0 -0
  82. /package/lib/clang/{18 → 19}/include/__stddef_max_align_t.h +0 -0
  83. /package/lib/clang/{18 → 19}/include/__stddef_null.h +0 -0
  84. /package/lib/clang/{18 → 19}/include/__stddef_nullptr_t.h +0 -0
  85. /package/lib/clang/{18 → 19}/include/__stddef_offsetof.h +0 -0
  86. /package/lib/clang/{18 → 19}/include/__stddef_ptrdiff_t.h +0 -0
  87. /package/lib/clang/{18 → 19}/include/__stddef_rsize_t.h +0 -0
  88. /package/lib/clang/{18 → 19}/include/__stddef_size_t.h +0 -0
  89. /package/lib/clang/{18 → 19}/include/__stddef_unreachable.h +0 -0
  90. /package/lib/clang/{18 → 19}/include/__stddef_wchar_t.h +0 -0
  91. /package/lib/clang/{18 → 19}/include/__stddef_wint_t.h +0 -0
  92. /package/lib/clang/{18 → 19}/include/__wmmintrin_aes.h +0 -0
  93. /package/lib/clang/{18 → 19}/include/__wmmintrin_pclmul.h +0 -0
  94. /package/lib/clang/{18 → 19}/include/adcintrin.h +0 -0
  95. /package/lib/clang/{18 → 19}/include/adxintrin.h +0 -0
  96. /package/lib/clang/{18 → 19}/include/altivec.h +0 -0
  97. /package/lib/clang/{18 → 19}/include/ammintrin.h +0 -0
  98. /package/lib/clang/{18 → 19}/include/amxcomplexintrin.h +0 -0
  99. /package/lib/clang/{18 → 19}/include/amxfp16intrin.h +0 -0
  100. /package/lib/clang/{18 → 19}/include/amxintrin.h +0 -0
  101. /package/lib/clang/{18 → 19}/include/arm64intr.h +0 -0
  102. /package/lib/clang/{18 → 19}/include/arm_bf16.h +0 -0
  103. /package/lib/clang/{18 → 19}/include/arm_cde.h +0 -0
  104. /package/lib/clang/{18 → 19}/include/arm_cmse.h +0 -0
  105. /package/lib/clang/{18 → 19}/include/arm_mve.h +0 -0
  106. /package/lib/clang/{18 → 19}/include/arm_neon_sve_bridge.h +0 -0
  107. /package/lib/clang/{18 → 19}/include/armintr.h +0 -0
  108. /package/lib/clang/{18 → 19}/include/avx2intrin.h +0 -0
  109. /package/lib/clang/{18 → 19}/include/avx512bf16intrin.h +0 -0
  110. /package/lib/clang/{18 → 19}/include/avx512bitalgintrin.h +0 -0
  111. /package/lib/clang/{18 → 19}/include/avx512bwintrin.h +0 -0
  112. /package/lib/clang/{18 → 19}/include/avx512cdintrin.h +0 -0
  113. /package/lib/clang/{18 → 19}/include/avx512dqintrin.h +0 -0
  114. /package/lib/clang/{18 → 19}/include/avx512fintrin.h +0 -0
  115. /package/lib/clang/{18 → 19}/include/avx512ifmaintrin.h +0 -0
  116. /package/lib/clang/{18 → 19}/include/avx512ifmavlintrin.h +0 -0
  117. /package/lib/clang/{18 → 19}/include/avx512vbmi2intrin.h +0 -0
  118. /package/lib/clang/{18 → 19}/include/avx512vbmiintrin.h +0 -0
  119. /package/lib/clang/{18 → 19}/include/avx512vbmivlintrin.h +0 -0
  120. /package/lib/clang/{18 → 19}/include/avx512vlbf16intrin.h +0 -0
  121. /package/lib/clang/{18 → 19}/include/avx512vlbitalgintrin.h +0 -0
  122. /package/lib/clang/{18 → 19}/include/avx512vlbwintrin.h +0 -0
  123. /package/lib/clang/{18 → 19}/include/avx512vlcdintrin.h +0 -0
  124. /package/lib/clang/{18 → 19}/include/avx512vldqintrin.h +0 -0
  125. /package/lib/clang/{18 → 19}/include/avx512vlfp16intrin.h +0 -0
  126. /package/lib/clang/{18 → 19}/include/avx512vlintrin.h +0 -0
  127. /package/lib/clang/{18 → 19}/include/avx512vlvbmi2intrin.h +0 -0
  128. /package/lib/clang/{18 → 19}/include/avx512vlvnniintrin.h +0 -0
  129. /package/lib/clang/{18 → 19}/include/avx512vlvp2intersectintrin.h +0 -0
  130. /package/lib/clang/{18 → 19}/include/avx512vnniintrin.h +0 -0
  131. /package/lib/clang/{18 → 19}/include/avx512vp2intersectintrin.h +0 -0
  132. /package/lib/clang/{18 → 19}/include/avx512vpopcntdqintrin.h +0 -0
  133. /package/lib/clang/{18 → 19}/include/avx512vpopcntdqvlintrin.h +0 -0
  134. /package/lib/clang/{18 → 19}/include/avxifmaintrin.h +0 -0
  135. /package/lib/clang/{18 → 19}/include/avxneconvertintrin.h +0 -0
  136. /package/lib/clang/{18 → 19}/include/avxvnniint16intrin.h +0 -0
  137. /package/lib/clang/{18 → 19}/include/avxvnniint8intrin.h +0 -0
  138. /package/lib/clang/{18 → 19}/include/avxvnniintrin.h +0 -0
  139. /package/lib/clang/{18 → 19}/include/bmi2intrin.h +0 -0
  140. /package/lib/clang/{18 → 19}/include/cet.h +0 -0
  141. /package/lib/clang/{18 → 19}/include/cetintrin.h +0 -0
  142. /package/lib/clang/{18 → 19}/include/cldemoteintrin.h +0 -0
  143. /package/lib/clang/{18 → 19}/include/clflushoptintrin.h +0 -0
  144. /package/lib/clang/{18 → 19}/include/clwbintrin.h +0 -0
  145. /package/lib/clang/{18 → 19}/include/clzerointrin.h +0 -0
  146. /package/lib/clang/{18 → 19}/include/cmpccxaddintrin.h +0 -0
  147. /package/lib/clang/{18 → 19}/include/crc32intrin.h +0 -0
  148. /package/lib/clang/{18 → 19}/include/cuda_wrappers/bits/basic_string.h +0 -0
  149. /package/lib/clang/{18 → 19}/include/cuda_wrappers/bits/basic_string.tcc +0 -0
  150. /package/lib/clang/{18 → 19}/include/cuda_wrappers/bits/shared_ptr_base.h +0 -0
  151. /package/lib/clang/{18 → 19}/include/cuda_wrappers/cmath +0 -0
  152. /package/lib/clang/{18 → 19}/include/cuda_wrappers/complex +0 -0
  153. /package/lib/clang/{18 → 19}/include/cuda_wrappers/new +0 -0
  154. /package/lib/clang/{18 → 19}/include/enqcmdintrin.h +0 -0
  155. /package/lib/clang/{18 → 19}/include/f16cintrin.h +0 -0
  156. /package/lib/clang/{18 → 19}/include/fma4intrin.h +0 -0
  157. /package/lib/clang/{18 → 19}/include/fxsrintrin.h +0 -0
  158. /package/lib/clang/{18 → 19}/include/gfniintrin.h +0 -0
  159. /package/lib/clang/{18 → 19}/include/hexagon_circ_brev_intrinsics.h +0 -0
  160. /package/lib/clang/{18 → 19}/include/hexagon_protos.h +0 -0
  161. /package/lib/clang/{18 → 19}/include/hexagon_types.h +0 -0
  162. /package/lib/clang/{18 → 19}/include/hlsl.h +0 -0
  163. /package/lib/clang/{18 → 19}/include/hresetintrin.h +0 -0
  164. /package/lib/clang/{18 → 19}/include/htmintrin.h +0 -0
  165. /package/lib/clang/{18 → 19}/include/htmxlintrin.h +0 -0
  166. /package/lib/clang/{18 → 19}/include/hvx_hexagon_protos.h +0 -0
  167. /package/lib/clang/{18 → 19}/include/invpcidintrin.h +0 -0
  168. /package/lib/clang/{18 → 19}/include/larchintrin.h +0 -0
  169. /package/lib/clang/{18 → 19}/include/lasxintrin.h +0 -0
  170. /package/lib/clang/{18 → 19}/include/llvm_libc_wrappers/ctype.h +0 -0
  171. /package/lib/clang/{18 → 19}/include/llvm_libc_wrappers/inttypes.h +0 -0
  172. /package/lib/clang/{18 → 19}/include/llvm_libc_wrappers/stdio.h +0 -0
  173. /package/lib/clang/{18 → 19}/include/llvm_libc_wrappers/stdlib.h +0 -0
  174. /package/lib/clang/{18 → 19}/include/llvm_libc_wrappers/string.h +0 -0
  175. /package/lib/clang/{18 → 19}/include/llvm_libc_wrappers/time.h +0 -0
  176. /package/lib/clang/{18 → 19}/include/lsxintrin.h +0 -0
  177. /package/lib/clang/{18 → 19}/include/lwpintrin.h +0 -0
  178. /package/lib/clang/{18 → 19}/include/lzcntintrin.h +0 -0
  179. /package/lib/clang/{18 → 19}/include/mm_malloc.h +0 -0
  180. /package/lib/clang/{18 → 19}/include/movdirintrin.h +0 -0
  181. /package/lib/clang/{18 → 19}/include/msa.h +0 -0
  182. /package/lib/clang/{18 → 19}/include/mwaitxintrin.h +0 -0
  183. /package/lib/clang/{18 → 19}/include/nmmintrin.h +0 -0
  184. /package/lib/clang/{18 → 19}/include/openmp_wrappers/__clang_openmp_device_functions.h +0 -0
  185. /package/lib/clang/{18 → 19}/include/openmp_wrappers/cmath +0 -0
  186. /package/lib/clang/{18 → 19}/include/openmp_wrappers/complex +0 -0
  187. /package/lib/clang/{18 → 19}/include/openmp_wrappers/complex.h +0 -0
  188. /package/lib/clang/{18 → 19}/include/openmp_wrappers/complex_cmath.h +0 -0
  189. /package/lib/clang/{18 → 19}/include/openmp_wrappers/math.h +0 -0
  190. /package/lib/clang/{18 → 19}/include/openmp_wrappers/new +0 -0
  191. /package/lib/clang/{18 → 19}/include/pconfigintrin.h +0 -0
  192. /package/lib/clang/{18 → 19}/include/pkuintrin.h +0 -0
  193. /package/lib/clang/{18 → 19}/include/pmmintrin.h +0 -0
  194. /package/lib/clang/{18 → 19}/include/popcntintrin.h +0 -0
  195. /package/lib/clang/{18 → 19}/include/ppc_wrappers/bmi2intrin.h +0 -0
  196. /package/lib/clang/{18 → 19}/include/ppc_wrappers/bmiintrin.h +0 -0
  197. /package/lib/clang/{18 → 19}/include/ppc_wrappers/emmintrin.h +0 -0
  198. /package/lib/clang/{18 → 19}/include/ppc_wrappers/immintrin.h +0 -0
  199. /package/lib/clang/{18 → 19}/include/ppc_wrappers/mm_malloc.h +0 -0
  200. /package/lib/clang/{18 → 19}/include/ppc_wrappers/mmintrin.h +0 -0
  201. /package/lib/clang/{18 → 19}/include/ppc_wrappers/nmmintrin.h +0 -0
  202. /package/lib/clang/{18 → 19}/include/ppc_wrappers/pmmintrin.h +0 -0
  203. /package/lib/clang/{18 → 19}/include/ppc_wrappers/smmintrin.h +0 -0
  204. /package/lib/clang/{18 → 19}/include/ppc_wrappers/tmmintrin.h +0 -0
  205. /package/lib/clang/{18 → 19}/include/ppc_wrappers/x86gprintrin.h +0 -0
  206. /package/lib/clang/{18 → 19}/include/ppc_wrappers/x86intrin.h +0 -0
  207. /package/lib/clang/{18 → 19}/include/ppc_wrappers/xmmintrin.h +0 -0
  208. /package/lib/clang/{18 → 19}/include/prfchiintrin.h +0 -0
  209. /package/lib/clang/{18 → 19}/include/ptwriteintrin.h +0 -0
  210. /package/lib/clang/{18 → 19}/include/raointintrin.h +0 -0
  211. /package/lib/clang/{18 → 19}/include/rdpruintrin.h +0 -0
  212. /package/lib/clang/{18 → 19}/include/rdseedintrin.h +0 -0
  213. /package/lib/clang/{18 → 19}/include/riscv_bitmanip.h +0 -0
  214. /package/lib/clang/{18 → 19}/include/riscv_crypto.h +0 -0
  215. /package/lib/clang/{18 → 19}/include/riscv_ntlh.h +0 -0
  216. /package/lib/clang/{18 → 19}/include/rtmintrin.h +0 -0
  217. /package/lib/clang/{18 → 19}/include/s390intrin.h +0 -0
  218. /package/lib/clang/{18 → 19}/include/serializeintrin.h +0 -0
  219. /package/lib/clang/{18 → 19}/include/sgxintrin.h +0 -0
  220. /package/lib/clang/{18 → 19}/include/sha512intrin.h +0 -0
  221. /package/lib/clang/{18 → 19}/include/shaintrin.h +0 -0
  222. /package/lib/clang/{18 → 19}/include/sm3intrin.h +0 -0
  223. /package/lib/clang/{18 → 19}/include/sm4intrin.h +0 -0
  224. /package/lib/clang/{18 → 19}/include/stdckdint.h +0 -0
  225. /package/lib/clang/{18 → 19}/include/tbmintrin.h +0 -0
  226. /package/lib/clang/{18 → 19}/include/tgmath.h +0 -0
  227. /package/lib/clang/{18 → 19}/include/tsxldtrkintrin.h +0 -0
  228. /package/lib/clang/{18 → 19}/include/uintrintrin.h +0 -0
  229. /package/lib/clang/{18 → 19}/include/unwind.h +0 -0
  230. /package/lib/clang/{18 → 19}/include/usermsrintrin.h +0 -0
  231. /package/lib/clang/{18 → 19}/include/vadefs.h +0 -0
  232. /package/lib/clang/{18 → 19}/include/vaesintrin.h +0 -0
  233. /package/lib/clang/{18 → 19}/include/vecintrin.h +0 -0
  234. /package/lib/clang/{18 → 19}/include/velintrin.h +0 -0
  235. /package/lib/clang/{18 → 19}/include/velintrin_approx.h +0 -0
  236. /package/lib/clang/{18 → 19}/include/velintrin_gen.h +0 -0
  237. /package/lib/clang/{18 → 19}/include/vpclmulqdqintrin.h +0 -0
  238. /package/lib/clang/{18 → 19}/include/waitpkgintrin.h +0 -0
  239. /package/lib/clang/{18 → 19}/include/wasm_simd128.h +0 -0
  240. /package/lib/clang/{18 → 19}/include/wbnoinvdintrin.h +0 -0
  241. /package/lib/clang/{18 → 19}/include/wmmintrin.h +0 -0
  242. /package/lib/clang/{18 → 19}/include/xopintrin.h +0 -0
  243. /package/lib/clang/{18 → 19}/include/xsavecintrin.h +0 -0
  244. /package/lib/clang/{18 → 19}/include/xsaveintrin.h +0 -0
  245. /package/lib/clang/{18 → 19}/include/xsaveoptintrin.h +0 -0
  246. /package/lib/clang/{18 → 19}/include/xsavesintrin.h +0 -0
  247. /package/lib/clang/{18 → 19}/include/xtestintrin.h +0 -0
@@ -0,0 +1,330 @@
1
+ /*===---- ptrauth.h - Pointer authentication -------------------------------===
2
+ *
3
+ * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ * See https://llvm.org/LICENSE.txt for license information.
5
+ * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ *
7
+ *===-----------------------------------------------------------------------===
8
+ */
9
+
10
+ #ifndef __PTRAUTH_H
11
+ #define __PTRAUTH_H
12
+
13
+ typedef enum {
14
+ ptrauth_key_asia = 0,
15
+ ptrauth_key_asib = 1,
16
+ ptrauth_key_asda = 2,
17
+ ptrauth_key_asdb = 3,
18
+
19
+ /* A process-independent key which can be used to sign code pointers. */
20
+ ptrauth_key_process_independent_code = ptrauth_key_asia,
21
+
22
+ /* A process-specific key which can be used to sign code pointers. */
23
+ ptrauth_key_process_dependent_code = ptrauth_key_asib,
24
+
25
+ /* A process-independent key which can be used to sign data pointers. */
26
+ ptrauth_key_process_independent_data = ptrauth_key_asda,
27
+
28
+ /* A process-specific key which can be used to sign data pointers. */
29
+ ptrauth_key_process_dependent_data = ptrauth_key_asdb,
30
+
31
+ /* The key used to sign return addresses on the stack.
32
+ The extra data is based on the storage address of the return address.
33
+ On AArch64, that is always the storage address of the return address + 8
34
+ (or, in other words, the value of the stack pointer on function entry) */
35
+ ptrauth_key_return_address = ptrauth_key_process_dependent_code,
36
+
37
+ /* The key used to sign C function pointers.
38
+ The extra data is always 0. */
39
+ ptrauth_key_function_pointer = ptrauth_key_process_independent_code,
40
+
41
+ /* The key used to sign C++ v-table pointers.
42
+ The extra data is always 0. */
43
+ ptrauth_key_cxx_vtable_pointer = ptrauth_key_process_independent_data,
44
+
45
+ /* Other pointers signed under the ABI use private ABI rules. */
46
+
47
+ } ptrauth_key;
48
+
49
+ /* An integer type of the appropriate size for a discriminator argument. */
50
+ typedef __UINTPTR_TYPE__ ptrauth_extra_data_t;
51
+
52
+ /* An integer type of the appropriate size for a generic signature. */
53
+ typedef __UINTPTR_TYPE__ ptrauth_generic_signature_t;
54
+
55
+ /* A signed pointer value embeds the original pointer together with
56
+ a signature that attests to the validity of that pointer. Because
57
+ this signature must use only "spare" bits of the pointer, a
58
+ signature's validity is probabilistic in practice: it is unlikely
59
+ but still plausible that an invalidly-derived signature will
60
+ somehow equal the correct signature and therefore successfully
61
+ authenticate. Nonetheless, this scheme provides a strong degree
62
+ of protection against certain kinds of attacks. */
63
+
64
+ /* Authenticating a pointer that was not signed with the given key
65
+ and extra-data value will (likely) fail by trapping. */
66
+
67
+ /* The null function pointer is always the all-zero bit pattern.
68
+ Signing an all-zero bit pattern will embed a (likely) non-zero
69
+ signature in the result, and so the result will not seem to be
70
+ a null function pointer. Authenticating this value will yield
71
+ a null function pointer back. However, authenticating an
72
+ all-zero bit pattern will probably fail, because the
73
+ authentication will expect a (likely) non-zero signature to
74
+ embedded in the value.
75
+
76
+ Because of this, if a pointer may validly be null, you should
77
+ check for null before attempting to authenticate it with one
78
+ of these intrinsics. This is not necessary when using the
79
+ __ptrauth qualifier; the compiler will perform this check
80
+ automatically. */
81
+
82
+ #if __has_feature(ptrauth_intrinsics)
83
+
84
+ /* Strip the signature from a value without authenticating it.
85
+
86
+ If the value is a function pointer, the result will not be a
87
+ legal function pointer because of the missing signature, and
88
+ attempting to call it will result in an authentication failure.
89
+
90
+ The value must be an expression of pointer type.
91
+ The key must be a constant expression of type ptrauth_key.
92
+ The result will have the same type as the original value. */
93
+ #define ptrauth_strip(__value, __key) __builtin_ptrauth_strip(__value, __key)
94
+
95
+ /* Blend a constant discriminator into the given pointer-like value
96
+ to form a new discriminator. Not all bits of the inputs are
97
+ guaranteed to contribute to the result.
98
+
99
+ On arm64e, the integer must fall within the range of a uint16_t;
100
+ other bits may be ignored.
101
+
102
+ For the purposes of ptrauth_sign_constant, the result of calling
103
+ this function is considered a constant expression if the arguments
104
+ are constant. Some restrictions may be imposed on the pointer.
105
+
106
+ The first argument must be an expression of pointer type.
107
+ The second argument must be an expression of integer type.
108
+ The result will have type uintptr_t. */
109
+ #define ptrauth_blend_discriminator(__pointer, __integer) \
110
+ __builtin_ptrauth_blend_discriminator(__pointer, __integer)
111
+
112
+ /* Return a signed pointer for a constant address in a manner which guarantees
113
+ a non-attackable sequence.
114
+
115
+ The value must be a constant expression of pointer type which evaluates to
116
+ a non-null pointer.
117
+ The key must be a constant expression of type ptrauth_key.
118
+ The extra data must be a constant expression of pointer or integer type;
119
+ if an integer, it will be coerced to ptrauth_extra_data_t.
120
+ The result will have the same type as the original value.
121
+
122
+ This can be used in constant expressions. */
123
+ #define ptrauth_sign_constant(__value, __key, __data) \
124
+ __builtin_ptrauth_sign_constant(__value, __key, __data)
125
+
126
+ /* Add a signature to the given pointer value using a specific key,
127
+ using the given extra data as a salt to the signing process.
128
+
129
+ This operation does not authenticate the original value and is
130
+ therefore potentially insecure if an attacker could possibly
131
+ control that value.
132
+
133
+ The value must be an expression of pointer type.
134
+ The key must be a constant expression of type ptrauth_key.
135
+ The extra data must be an expression of pointer or integer type;
136
+ if an integer, it will be coerced to ptrauth_extra_data_t.
137
+ The result will have the same type as the original value. */
138
+ #define ptrauth_sign_unauthenticated(__value, __key, __data) \
139
+ __builtin_ptrauth_sign_unauthenticated(__value, __key, __data)
140
+
141
+ /* Authenticate a pointer using one scheme and resign it using another.
142
+
143
+ If the result is subsequently authenticated using the new scheme, that
144
+ authentication is guaranteed to fail if and only if the initial
145
+ authentication failed.
146
+
147
+ The value must be an expression of pointer type.
148
+ The key must be a constant expression of type ptrauth_key.
149
+ The extra data must be an expression of pointer or integer type;
150
+ if an integer, it will be coerced to ptrauth_extra_data_t.
151
+ The result will have the same type as the original value.
152
+
153
+ This operation is guaranteed to not leave the intermediate value
154
+ available for attack before it is re-signed.
155
+
156
+ Do not pass a null pointer to this function. A null pointer
157
+ will not successfully authenticate.
158
+
159
+ This operation traps if the authentication fails. */
160
+ #define ptrauth_auth_and_resign(__value, __old_key, __old_data, __new_key, \
161
+ __new_data) \
162
+ __builtin_ptrauth_auth_and_resign(__value, __old_key, __old_data, __new_key, \
163
+ __new_data)
164
+
165
+ /* Authenticate a pointer using one scheme and resign it as a C
166
+ function pointer.
167
+
168
+ If the result is subsequently authenticated using the new scheme, that
169
+ authentication is guaranteed to fail if and only if the initial
170
+ authentication failed.
171
+
172
+ The value must be an expression of function pointer type.
173
+ The key must be a constant expression of type ptrauth_key.
174
+ The extra data must be an expression of pointer or integer type;
175
+ if an integer, it will be coerced to ptrauth_extra_data_t.
176
+ The result will have the same type as the original value.
177
+
178
+ This operation is guaranteed to not leave the intermediate value
179
+ available for attack before it is re-signed. Additionally, if this
180
+ expression is used syntactically as the function expression in a
181
+ call, only a single authentication will be performed. */
182
+ #define ptrauth_auth_function(__value, __old_key, __old_data) \
183
+ ptrauth_auth_and_resign(__value, __old_key, __old_data, \
184
+ ptrauth_key_function_pointer, 0)
185
+
186
+ /* Authenticate a data pointer.
187
+
188
+ The value must be an expression of non-function pointer type.
189
+ The key must be a constant expression of type ptrauth_key.
190
+ The extra data must be an expression of pointer or integer type;
191
+ if an integer, it will be coerced to ptrauth_extra_data_t.
192
+ The result will have the same type as the original value.
193
+
194
+ This operation traps if the authentication fails. */
195
+ #define ptrauth_auth_data(__value, __old_key, __old_data) \
196
+ __builtin_ptrauth_auth(__value, __old_key, __old_data)
197
+
198
+ /* Compute a constant discriminator from the given string.
199
+
200
+ The argument must be a string literal of char character type. The result
201
+ has type ptrauth_extra_data_t.
202
+
203
+ The result value is never zero and always within range for both the
204
+ __ptrauth qualifier and ptrauth_blend_discriminator.
205
+
206
+ This can be used in constant expressions.
207
+ */
208
+ #define ptrauth_string_discriminator(__string) \
209
+ __builtin_ptrauth_string_discriminator(__string)
210
+
211
+ /* Compute a constant discriminator from the given type.
212
+
213
+ The result can be used as the second argument to
214
+ ptrauth_blend_discriminator or the third argument to the
215
+ __ptrauth qualifier. It has type size_t.
216
+
217
+ If the type is a C++ member function pointer type, the result is
218
+ the discriminator used to signed member function pointers of that
219
+ type. If the type is a function, function pointer, or function
220
+ reference type, the result is the discriminator used to sign
221
+ functions of that type. It is ill-formed to use this macro with any
222
+ other type.
223
+
224
+ A call to this function is an integer constant expression. */
225
+ #define ptrauth_type_discriminator(__type) \
226
+ __builtin_ptrauth_type_discriminator(__type)
227
+
228
+ /* Compute a signature for the given pair of pointer-sized values.
229
+ The order of the arguments is significant.
230
+
231
+ Like a pointer signature, the resulting signature depends on
232
+ private key data and therefore should not be reliably reproducible
233
+ by attackers. That means that this can be used to validate the
234
+ integrity of arbitrary data by storing a signature for that data
235
+ alongside it, then checking that the signature is still valid later.
236
+ Data which exceeds two pointers in size can be signed by either
237
+ computing a tree of generic signatures or just signing an ordinary
238
+ cryptographic hash of the data.
239
+
240
+ The result has type ptrauth_generic_signature_t. However, it may
241
+ not have as many bits of entropy as that type's width would suggest;
242
+ some implementations are known to compute a compressed signature as
243
+ if the arguments were a pointer and a discriminator.
244
+
245
+ The arguments must be either pointers or integers; if integers, they
246
+ will be coerce to uintptr_t. */
247
+ #define ptrauth_sign_generic_data(__value, __data) \
248
+ __builtin_ptrauth_sign_generic_data(__value, __data)
249
+
250
+ /* C++ vtable pointer signing class attribute */
251
+ #define ptrauth_cxx_vtable_pointer(key, address_discrimination, \
252
+ extra_discrimination...) \
253
+ [[clang::ptrauth_vtable_pointer(key, address_discrimination, \
254
+ extra_discrimination)]]
255
+
256
+ #else
257
+
258
+ #define ptrauth_strip(__value, __key) \
259
+ ({ \
260
+ (void)__key; \
261
+ __value; \
262
+ })
263
+
264
+ #define ptrauth_blend_discriminator(__pointer, __integer) \
265
+ ({ \
266
+ (void)__pointer; \
267
+ (void)__integer; \
268
+ ((ptrauth_extra_data_t)0); \
269
+ })
270
+
271
+ #define ptrauth_sign_constant(__value, __key, __data) \
272
+ ({ \
273
+ (void)__key; \
274
+ (void)__data; \
275
+ __value; \
276
+ })
277
+
278
+ #define ptrauth_sign_unauthenticated(__value, __key, __data) \
279
+ ({ \
280
+ (void)__key; \
281
+ (void)__data; \
282
+ __value; \
283
+ })
284
+
285
+ #define ptrauth_auth_and_resign(__value, __old_key, __old_data, __new_key, \
286
+ __new_data) \
287
+ ({ \
288
+ (void)__old_key; \
289
+ (void)__old_data; \
290
+ (void)__new_key; \
291
+ (void)__new_data; \
292
+ __value; \
293
+ })
294
+
295
+ #define ptrauth_auth_function(__value, __old_key, __old_data) \
296
+ ({ \
297
+ (void)__old_key; \
298
+ (void)__old_data; \
299
+ __value; \
300
+ })
301
+
302
+ #define ptrauth_auth_data(__value, __old_key, __old_data) \
303
+ ({ \
304
+ (void)__old_key; \
305
+ (void)__old_data; \
306
+ __value; \
307
+ })
308
+
309
+ #define ptrauth_string_discriminator(__string) \
310
+ ({ \
311
+ (void)__string; \
312
+ ((ptrauth_extra_data_t)0); \
313
+ })
314
+
315
+ #define ptrauth_type_discriminator(__type) ((ptrauth_extra_data_t)0)
316
+
317
+ #define ptrauth_sign_generic_data(__value, __data) \
318
+ ({ \
319
+ (void)__value; \
320
+ (void)__data; \
321
+ ((ptrauth_generic_signature_t)0); \
322
+ })
323
+
324
+
325
+ #define ptrauth_cxx_vtable_pointer(key, address_discrimination, \
326
+ extra_discrimination...)
327
+
328
+ #endif /* __has_feature(ptrauth_intrinsics) */
329
+
330
+ #endif /* __PTRAUTH_H */
@@ -14,10 +14,6 @@
14
14
  #include <stdint.h>
15
15
  #include <stddef.h>
16
16
 
17
- #ifndef __riscv_vector
18
- #error "Vector intrinsics require the vector extension."
19
- #endif
20
-
21
17
  #ifdef __cplusplus
22
18
  extern "C" {
23
19
  #endif
@@ -0,0 +1,118 @@
1
+ //===----- sifive_vector.h - SiFive Vector definitions --------------------===//
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
+ #ifndef _SIFIVE_VECTOR_H_
10
+ #define _SIFIVE_VECTOR_H_
11
+
12
+ #include "riscv_vector.h"
13
+
14
+ #pragma clang riscv intrinsic sifive_vector
15
+
16
+ #define __riscv_sf_vc_x_se_u8mf4(p27_26, p24_20, p11_7, rs1, vl) \
17
+ __riscv_sf_vc_x_se(p27_26, p24_20, p11_7, (uint8_t)rs1, 8, 6, vl)
18
+ #define __riscv_sf_vc_x_se_u8mf2(p27_26, p24_20, p11_7, rs1, vl) \
19
+ __riscv_sf_vc_x_se(p27_26, p24_20, p11_7, (uint8_t)rs1, 8, 7, vl)
20
+ #define __riscv_sf_vc_x_se_u8m1(p27_26, p24_20, p11_7, rs1, vl) \
21
+ __riscv_sf_vc_x_se(p27_26, p24_20, p11_7, (uint8_t)rs1, 8, 0, vl)
22
+ #define __riscv_sf_vc_x_se_u8m2(p27_26, p24_20, p11_7, rs1, vl) \
23
+ __riscv_sf_vc_x_se(p27_26, p24_20, p11_7, (uint8_t)rs1, 8, 1, vl)
24
+ #define __riscv_sf_vc_x_se_u8m4(p27_26, p24_20, p11_7, rs1, vl) \
25
+ __riscv_sf_vc_x_se(p27_26, p24_20, p11_7, (uint8_t)rs1, 8, 2, vl)
26
+ #define __riscv_sf_vc_x_se_u8m8(p27_26, p24_20, p11_7, rs1, vl) \
27
+ __riscv_sf_vc_x_se(p27_26, p24_20, p11_7, (uint8_t)rs1, 8, 3, vl)
28
+
29
+ #define __riscv_sf_vc_x_se_u16mf2(p27_26, p24_20, p11_7, rs1, vl) \
30
+ __riscv_sf_vc_x_se(p27_26, p24_20, p11_7, (uint16_t)rs1, 16, 7, vl)
31
+ #define __riscv_sf_vc_x_se_u16m1(p27_26, p24_20, p11_7, rs1, vl) \
32
+ __riscv_sf_vc_x_se(p27_26, p24_20, p11_7, (uint16_t)rs1, 16, 0, vl)
33
+ #define __riscv_sf_vc_x_se_u16m2(p27_26, p24_20, p11_7, rs1, vl) \
34
+ __riscv_sf_vc_x_se(p27_26, p24_20, p11_7, (uint16_t)rs1, 16, 1, vl)
35
+ #define __riscv_sf_vc_x_se_u16m4(p27_26, p24_20, p11_7, rs1, vl) \
36
+ __riscv_sf_vc_x_se(p27_26, p24_20, p11_7, (uint16_t)rs1, 16, 2, vl)
37
+ #define __riscv_sf_vc_x_se_u16m8(p27_26, p24_20, p11_7, rs1, vl) \
38
+ __riscv_sf_vc_x_se(p27_26, p24_20, p11_7, (uint16_t)rs1, 16, 3, vl)
39
+
40
+ #define __riscv_sf_vc_x_se_u32m1(p27_26, p24_20, p11_7, rs1, vl) \
41
+ __riscv_sf_vc_x_se(p27_26, p24_20, p11_7, (uint32_t)rs1, 32, 0, vl)
42
+ #define __riscv_sf_vc_x_se_u32m2(p27_26, p24_20, p11_7, rs1, vl) \
43
+ __riscv_sf_vc_x_se(p27_26, p24_20, p11_7, (uint32_t)rs1, 32, 1, vl)
44
+ #define __riscv_sf_vc_x_se_u32m4(p27_26, p24_20, p11_7, rs1, vl) \
45
+ __riscv_sf_vc_x_se(p27_26, p24_20, p11_7, (uint32_t)rs1, 32, 2, vl)
46
+ #define __riscv_sf_vc_x_se_u32m8(p27_26, p24_20, p11_7, rs1, vl) \
47
+ __riscv_sf_vc_x_se(p27_26, p24_20, p11_7, (uint32_t)rs1, 32, 3, vl)
48
+
49
+ #define __riscv_sf_vc_i_se_u8mf4(p27_26, p24_20, p11_7, simm5, vl) \
50
+ __riscv_sf_vc_i_se(p27_26, p24_20, p11_7, simm5, 8, 7, vl)
51
+ #define __riscv_sf_vc_i_se_u8mf2(p27_26, p24_20, p11_7, simm5, vl) \
52
+ __riscv_sf_vc_i_se(p27_26, p24_20, p11_7, simm5, 8, 6, vl)
53
+ #define __riscv_sf_vc_i_se_u8m1(p27_26, p24_20, p11_7, simm5, vl) \
54
+ __riscv_sf_vc_i_se(p27_26, p24_20, p11_7, simm5, 8, 0, vl)
55
+ #define __riscv_sf_vc_i_se_u8m2(p27_26, p24_20, p11_7, simm5, vl) \
56
+ __riscv_sf_vc_i_se(p27_26, p24_20, p11_7, simm5, 8, 1, vl)
57
+ #define __riscv_sf_vc_i_se_u8m4(p27_26, p24_20, p11_7, simm5, vl) \
58
+ __riscv_sf_vc_i_se(p27_26, p24_20, p11_7, simm5, 8, 2, vl)
59
+ #define __riscv_sf_vc_i_se_u8m8(p27_26, p24_20, p11_7, simm5, vl) \
60
+ __riscv_sf_vc_i_se(p27_26, p24_20, p11_7, simm5, 8, 3, vl)
61
+
62
+ #define __riscv_sf_vc_i_se_u16mf2(p27_26, p24_20, p11_7, simm5, vl) \
63
+ __riscv_sf_vc_i_se(p27_26, p24_20, p11_7, simm5, 16, 7, vl)
64
+ #define __riscv_sf_vc_i_se_u16m1(p27_26, p24_20, p11_7, simm5, vl) \
65
+ __riscv_sf_vc_i_se(p27_26, p24_20, p11_7, simm5, 16, 0, vl)
66
+ #define __riscv_sf_vc_i_se_u16m2(p27_26, p24_20, p11_7, simm5, vl) \
67
+ __riscv_sf_vc_i_se(p27_26, p24_20, p11_7, simm5, 16, 1, vl)
68
+ #define __riscv_sf_vc_i_se_u16m4(p27_26, p24_20, p11_7, simm5, vl) \
69
+ __riscv_sf_vc_i_se(p27_26, p24_20, p11_7, simm5, 16, 2, vl)
70
+ #define __riscv_sf_vc_i_se_u16m8(p27_26, p24_20, p11_7, simm5, vl) \
71
+ __riscv_sf_vc_i_se(p27_26, p24_20, p11_7, simm5, 16, 3, vl)
72
+
73
+ #define __riscv_sf_vc_i_se_u32m1(p27_26, p24_20, p11_7, simm5, vl) \
74
+ __riscv_sf_vc_i_se(p27_26, p24_20, p11_7, simm5, 32, 0, vl)
75
+ #define __riscv_sf_vc_i_se_u32m2(p27_26, p24_20, p11_7, simm5, vl) \
76
+ __riscv_sf_vc_i_se(p27_26, p24_20, p11_7, simm5, 32, 1, vl)
77
+ #define __riscv_sf_vc_i_se_u32m4(p27_26, p24_20, p11_7, simm5, vl) \
78
+ __riscv_sf_vc_i_se(p27_26, p24_20, p11_7, simm5, 32, 2, vl)
79
+ #define __riscv_sf_vc_i_se_u32m8(p27_26, p24_20, p11_7, simm5, vl) \
80
+ __riscv_sf_vc_i_se(p27_26, p24_20, p11_7, simm5, 32, 3, vl)
81
+
82
+ #if __riscv_v_elen >= 64
83
+ #define __riscv_sf_vc_x_se_u8mf8(p27_26, p24_20, p11_7, rs1, vl) \
84
+ __riscv_sf_vc_x_se(p27_26, p24_20, p11_7, (uint8_t)rs1, 8, 5, vl)
85
+ #define __riscv_sf_vc_x_se_u16mf4(p27_26, p24_20, p11_7, rs1, vl) \
86
+ __riscv_sf_vc_x_se(p27_26, p24_20, p11_7, (uint16_t)rs1, 16, 6, vl)
87
+ #define __riscv_sf_vc_x_se_u32mf2(p27_26, p24_20, p11_7, rs1, vl) \
88
+ __riscv_sf_vc_x_se(p27_26, p24_20, p11_7, (uint32_t)rs1, 32, 7, vl)
89
+
90
+ #define __riscv_sf_vc_i_se_u8mf8(p27_26, p24_20, p11_7, simm5, vl) \
91
+ __riscv_sf_vc_i_se(p27_26, p24_20, p11_7, simm5, 8, 5, vl)
92
+ #define __riscv_sf_vc_i_se_u16mf4(p27_26, p24_20, p11_7, simm5, vl) \
93
+ __riscv_sf_vc_i_se(p27_26, p24_20, p11_7, simm5, 16, 6, vl)
94
+ #define __riscv_sf_vc_i_se_u32mf2(p27_26, p24_20, p11_7, simm5, vl) \
95
+ __riscv_sf_vc_i_se(p27_26, p24_20, p11_7, simm5, 32, 7, vl)
96
+
97
+ #define __riscv_sf_vc_i_se_u64m1(p27_26, p24_20, p11_7, simm5, vl) \
98
+ __riscv_sf_vc_i_se(p27_26, p24_20, p11_7, simm5, 64, 0, vl)
99
+ #define __riscv_sf_vc_i_se_u64m2(p27_26, p24_20, p11_7, simm5, vl) \
100
+ __riscv_sf_vc_i_se(p27_26, p24_20, p11_7, simm5, 64, 1, vl)
101
+ #define __riscv_sf_vc_i_se_u64m4(p27_26, p24_20, p11_7, simm5, vl) \
102
+ __riscv_sf_vc_i_se(p27_26, p24_20, p11_7, simm5, 64, 2, vl)
103
+ #define __riscv_sf_vc_i_se_u64m8(p27_26, p24_20, p11_7, simm5, vl) \
104
+ __riscv_sf_vc_i_se(p27_26, p24_20, p11_7, simm5, 64, 3, vl)
105
+
106
+ #if __riscv_xlen >= 64
107
+ #define __riscv_sf_vc_x_se_u64m1(p27_26, p24_20, p11_7, rs1, vl) \
108
+ __riscv_sf_vc_x_se(p27_26, p24_20, p11_7, (uint64_t)rs1, 64, 0, vl)
109
+ #define __riscv_sf_vc_x_se_u64m2(p27_26, p24_20, p11_7, rs1, vl) \
110
+ __riscv_sf_vc_x_se(p27_26, p24_20, p11_7, (uint64_t)rs1, 64, 1, vl)
111
+ #define __riscv_sf_vc_x_se_u64m4(p27_26, p24_20, p11_7, rs1, vl) \
112
+ __riscv_sf_vc_x_se(p27_26, p24_20, p11_7, (uint64_t)rs1, 64, 2, vl)
113
+ #define __riscv_sf_vc_x_se_u64m8(p27_26, p24_20, p11_7, rs1, vl) \
114
+ __riscv_sf_vc_x_se(p27_26, p24_20, p11_7, (uint64_t)rs1, 64, 3, vl)
115
+ #endif
116
+ #endif
117
+
118
+ #endif //_SIFIVE_VECTOR_H_
@@ -1188,6 +1188,8 @@ static __inline__ int __DEFAULT_FN_ATTRS _mm_testnzc_si128(__m128i __M,
1188
1188
  /// Compares each of the corresponding 64-bit values of the 128-bit
1189
1189
  /// integer vectors for equality.
1190
1190
  ///
1191
+ /// Each comparison returns 0x0 for false, 0xFFFFFFFFFFFFFFFF for true.
1192
+ ///
1191
1193
  /// \headerfile <x86intrin.h>
1192
1194
  ///
1193
1195
  /// This intrinsic corresponds to the <c> VPCMPEQQ / PCMPEQQ </c> instruction.
@@ -1431,8 +1433,10 @@ static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_cvtepu32_epi64(__m128i __V) {
1431
1433
  }
1432
1434
 
1433
1435
  /* SSE4 Pack with Unsigned Saturation. */
1434
- /// Converts 32-bit signed integers from both 128-bit integer vector
1435
- /// operands into 16-bit unsigned integers, and returns the packed result.
1436
+ /// Converts, with saturation, 32-bit signed integers from both 128-bit integer
1437
+ /// vector operands into 16-bit unsigned integers, and returns the packed
1438
+ /// result.
1439
+ ///
1436
1440
  /// Values greater than 0xFFFF are saturated to 0xFFFF. Values less than
1437
1441
  /// 0x0000 are saturated to 0x0000.
1438
1442
  ///
@@ -1441,17 +1445,11 @@ static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_cvtepu32_epi64(__m128i __V) {
1441
1445
  /// This intrinsic corresponds to the <c> VPACKUSDW / PACKUSDW </c> instruction.
1442
1446
  ///
1443
1447
  /// \param __V1
1444
- /// A 128-bit vector of [4 x i32]. Each 32-bit element is treated as a
1445
- /// signed integer and is converted to a 16-bit unsigned integer with
1446
- /// saturation. Values greater than 0xFFFF are saturated to 0xFFFF. Values
1447
- /// less than 0x0000 are saturated to 0x0000. The converted [4 x i16] values
1448
- /// are written to the lower 64 bits of the result.
1448
+ /// A 128-bit vector of [4 x i32]. The converted [4 x i16] values are
1449
+ /// written to the lower 64 bits of the result.
1449
1450
  /// \param __V2
1450
- /// A 128-bit vector of [4 x i32]. Each 32-bit element is treated as a
1451
- /// signed integer and is converted to a 16-bit unsigned integer with
1452
- /// saturation. Values greater than 0xFFFF are saturated to 0xFFFF. Values
1453
- /// less than 0x0000 are saturated to 0x0000. The converted [4 x i16] values
1454
- /// are written to the higher 64 bits of the result.
1451
+ /// A 128-bit vector of [4 x i32]. The converted [4 x i16] values are
1452
+ /// written to the higher 64 bits of the result.
1455
1453
  /// \returns A 128-bit vector of [8 x i16] containing the converted values.
1456
1454
  static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_packus_epi32(__m128i __V1,
1457
1455
  __m128i __V2) {
@@ -2305,6 +2303,8 @@ static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_minpos_epu16(__m128i __V) {
2305
2303
  /// integer vectors to determine if the values in the first operand are
2306
2304
  /// greater than those in the second operand.
2307
2305
  ///
2306
+ /// Each comparison returns 0x0 for false, 0xFFFFFFFFFFFFFFFF for true.
2307
+ ///
2308
2308
  /// \headerfile <x86intrin.h>
2309
2309
  ///
2310
2310
  /// This intrinsic corresponds to the <c> VPCMPGTQ / PCMPGTQ </c> instruction.
@@ -10,6 +10,10 @@
10
10
  #ifndef __STDALIGN_H
11
11
  #define __STDALIGN_H
12
12
 
13
+ #if defined(__MVS__) && __has_include_next(<stdalign.h>)
14
+ #include_next <stdalign.h>
15
+ #else
16
+
13
17
  #if defined(__cplusplus) || \
14
18
  (defined(__STDC_VERSION__) && __STDC_VERSION__ < 202311L)
15
19
  #ifndef __cplusplus
@@ -21,4 +25,5 @@
21
25
  #define __alignof_is_defined 1
22
26
  #endif /* __STDC_VERSION__ */
23
27
 
28
+ #endif /* __MVS__ */
24
29
  #endif /* __STDALIGN_H */
@@ -14,29 +14,24 @@
14
14
  * need to use some of its interfaces. Otherwise this header provides all of
15
15
  * the expected interfaces.
16
16
  *
17
- * When clang modules are enabled, this header is a textual header. It ignores
18
- * its header guard so that multiple submodules can export its interfaces.
19
- * Take module SM with submodules A and B, whose headers both include stdarg.h
20
- * When SM.A builds, __STDARG_H will be defined. When SM.B builds, the
21
- * definition from SM.A will leak when building without local submodule
22
- * visibility. stdarg.h wouldn't include any of its implementation headers, and
23
- * SM.B wouldn't import any of the stdarg modules, and SM.B's `export *`
24
- * wouldn't export any stdarg interfaces as expected. However, since stdarg.h
25
- * ignores its header guard when building with modules, it all works as
26
- * expected.
27
- *
28
- * When clang modules are not enabled, the header guards can function in the
29
- * normal simple fashion.
17
+ * When clang modules are enabled, this header is a textual header to support
18
+ * the multiple include behavior. As such, it doesn't directly declare anything
19
+ * so that it doesn't add duplicate declarations to all of its includers'
20
+ * modules.
30
21
  */
31
- #if !defined(__STDARG_H) || __has_feature(modules) || \
32
- defined(__need___va_list) || defined(__need_va_list) || \
33
- defined(__need_va_arg) || defined(__need___va_copy) || \
34
- defined(__need_va_copy)
22
+ #if defined(__MVS__) && __has_include_next(<stdarg.h>)
23
+ #undef __need___va_list
24
+ #undef __need_va_list
25
+ #undef __need_va_arg
26
+ #undef __need___va_copy
27
+ #undef __need_va_copy
28
+ #include <__stdarg_header_macro.h>
29
+ #include_next <stdarg.h>
35
30
 
31
+ #else
36
32
  #if !defined(__need___va_list) && !defined(__need_va_list) && \
37
33
  !defined(__need_va_arg) && !defined(__need___va_copy) && \
38
34
  !defined(__need_va_copy)
39
- #define __STDARG_H
40
35
  #define __need___va_list
41
36
  #define __need_va_list
42
37
  #define __need_va_arg
@@ -49,6 +44,7 @@
49
44
  !defined(__STRICT_ANSI__)
50
45
  #define __need_va_copy
51
46
  #endif
47
+ #include <__stdarg_header_macro.h>
52
48
  #endif
53
49
 
54
50
  #ifdef __need___va_list
@@ -76,4 +72,4 @@
76
72
  #undef __need_va_copy
77
73
  #endif /* defined(__need_va_copy) */
78
74
 
79
- #endif
75
+ #endif /* __MVS__ */
@@ -16,7 +16,7 @@
16
16
  * Exclude the MSVC path as well as the MSVC header as of the 14.31.30818
17
17
  * explicitly disallows `stdatomic.h` in the C mode via an `#error`. Fallback
18
18
  * to the clang resource header until that is fully supported. The
19
- * `stdatomic.h` header requires C++ 23 or newer.
19
+ * `stdatomic.h` header requires C++23 or newer.
20
20
  */
21
21
  #if __STDC_HOSTED__ && \
22
22
  __has_include_next(<stdatomic.h>) && \
@@ -35,6 +35,9 @@ extern "C" {
35
35
 
36
36
  #define ATOMIC_BOOL_LOCK_FREE __CLANG_ATOMIC_BOOL_LOCK_FREE
37
37
  #define ATOMIC_CHAR_LOCK_FREE __CLANG_ATOMIC_CHAR_LOCK_FREE
38
+ #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
39
+ #define ATOMIC_CHAR8_T_LOCK_FREE __CLANG_ATOMIC_CHAR8_T_LOCK_FREE
40
+ #endif
38
41
  #define ATOMIC_CHAR16_T_LOCK_FREE __CLANG_ATOMIC_CHAR16_T_LOCK_FREE
39
42
  #define ATOMIC_CHAR32_T_LOCK_FREE __CLANG_ATOMIC_CHAR32_T_LOCK_FREE
40
43
  #define ATOMIC_WCHAR_T_LOCK_FREE __CLANG_ATOMIC_WCHAR_T_LOCK_FREE
@@ -104,6 +107,9 @@ typedef _Atomic(long) atomic_long;
104
107
  typedef _Atomic(unsigned long) atomic_ulong;
105
108
  typedef _Atomic(long long) atomic_llong;
106
109
  typedef _Atomic(unsigned long long) atomic_ullong;
110
+ #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
111
+ typedef _Atomic(unsigned char) atomic_char8_t;
112
+ #endif
107
113
  typedef _Atomic(uint_least16_t) atomic_char16_t;
108
114
  typedef _Atomic(uint_least32_t) atomic_char32_t;
109
115
  typedef _Atomic(wchar_t) atomic_wchar_t;
@@ -166,7 +172,11 @@ typedef _Atomic(uintmax_t) atomic_uintmax_t;
166
172
 
167
173
  typedef struct atomic_flag { atomic_bool _Value; } atomic_flag;
168
174
 
175
+ #ifdef __cplusplus
176
+ #define ATOMIC_FLAG_INIT {false}
177
+ #else
169
178
  #define ATOMIC_FLAG_INIT { 0 }
179
+ #endif
170
180
 
171
181
  /* These should be provided by the libc implementation. */
172
182
  #ifdef __cplusplus
@@ -12,6 +12,10 @@
12
12
 
13
13
  #define __bool_true_false_are_defined 1
14
14
 
15
+ #if defined(__MVS__) && __has_include_next(<stdbool.h>)
16
+ #include_next <stdbool.h>
17
+ #else
18
+
15
19
  #if defined(__STDC_VERSION__) && __STDC_VERSION__ > 201710L
16
20
  /* FIXME: We should be issuing a deprecation warning here, but cannot yet due
17
21
  * to system headers which include this header file unconditionally.
@@ -31,4 +35,5 @@
31
35
  #endif
32
36
  #endif
33
37
 
38
+ #endif /* __MVS__ */
34
39
  #endif /* __STDBOOL_H */