llvm-runtime-resources-darwin 22.1.8 → 23.1.1

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 (136) hide show
  1. package/include/__clang_cuda_complex_builtins.h +10 -3
  2. package/include/__clang_cuda_intrinsics.h +207 -226
  3. package/include/__clang_cuda_math_forward_declares.h +5 -0
  4. package/include/__clang_cuda_runtime_wrapper.h +9 -5
  5. package/include/__clang_gpu_builtin_vars.h +71 -0
  6. package/include/__clang_gpu_device_functions.h +411 -0
  7. package/include/__clang_gpu_intrinsics.h +242 -0
  8. package/include/__clang_hip_libdevice_declares.h +0 -102
  9. package/include/__clang_hip_math.h +3 -3
  10. package/include/__clang_hip_runtime_wrapper.h +6 -1
  11. package/include/__clang_spirv_libdevice_declares.h +170 -0
  12. package/include/__clang_spirv_math.h +719 -0
  13. package/include/altivec.h +79 -9
  14. package/include/amdgpuintrin.h +2 -29
  15. package/include/amdhsa_abi.h +83 -0
  16. package/include/amo.h +89 -0
  17. package/include/andes_vector.h +5 -0
  18. package/include/arm64_neon.h +21 -0
  19. package/include/arm64intr.h +10 -0
  20. package/include/arm_acle.h +1 -0
  21. package/include/arm_neon.h +3922 -3754
  22. package/include/arm_sme.h +12 -0
  23. package/include/arm_sve.h +420 -0
  24. package/include/avx2intrin.h +4 -5
  25. package/include/avx512bmmintrin.h +174 -0
  26. package/include/avx512bmmvlintrin.h +245 -0
  27. package/include/avx512bwintrin.h +19 -29
  28. package/include/avx512fintrin.h +62 -89
  29. package/include/avx512fp16intrin.h +12 -18
  30. package/include/avx512vbmi2intrin.h +12 -16
  31. package/include/avx512vlbwintrin.h +24 -36
  32. package/include/avx512vlintrin.h +80 -96
  33. package/include/avx512vlvbmi2intrin.h +24 -32
  34. package/include/avx512vlvnniintrin.h +29 -34
  35. package/include/avx512vnniintrin.h +32 -35
  36. package/include/avx512vp2intersectintrin.h +1 -1
  37. package/include/avxvnniintrin.h +23 -18
  38. package/include/crc32intrin.h +10 -8
  39. package/include/emmintrin.h +8 -8
  40. package/include/endian.h +91 -0
  41. package/include/fuzzer/FuzzedDataProvider.h +3 -3
  42. package/include/gpuintrin.h +123 -105
  43. package/include/hlsl_alias_intrinsics_gen.inc +3869 -0
  44. package/include/hlsl_inline_intrinsics_gen.inc +546 -0
  45. package/include/hvx_hexagon_protos.h +102 -80
  46. package/include/immintrin.h +4 -2
  47. package/include/intrin.h +20 -10
  48. package/include/larchintrin.h +2 -0
  49. package/include/llvm_libc_wrappers/ctype.h +3 -2
  50. package/include/llvm_libc_wrappers/string.h +3 -2
  51. package/include/module.modulemap +16 -1
  52. package/include/nvptxintrin.h +15 -26
  53. package/include/opencl-c-base.h +7 -0
  54. package/include/opencl-c.h +163 -102
  55. package/include/openmp_wrappers/__clang_openmp_device_functions.h +14 -0
  56. package/include/openmp_wrappers/complex +7 -1
  57. package/include/openmp_wrappers/complex.h +6 -0
  58. package/include/openmp_wrappers/math.h +10 -0
  59. package/include/profile/InstrProfData.inc +65 -3
  60. package/include/ptrauth.h +90 -12
  61. package/include/riscv_bitmanip.h +7 -0
  62. package/include/riscv_corev_alu.h +2 -0
  63. package/include/riscv_crypto.h +8 -0
  64. package/include/riscv_mips.h +2 -0
  65. package/include/riscv_nds.h +3 -0
  66. package/include/riscv_ntlh.h +2 -0
  67. package/include/riscv_packed_simd.h +644 -0
  68. package/include/riscv_vector.h +43 -0
  69. package/include/sanitizer/asan_interface.h +51 -1
  70. package/include/sanitizer/common_interface_defs.h +12 -49
  71. package/include/sanitizer/safestack_interface.h +50 -0
  72. package/include/sanitizer/tysan_interface.h +36 -0
  73. package/include/sanitizer/ubsan_interface.h +30 -0
  74. package/include/sifive_vector.h +18 -0
  75. package/include/spirvintrin.h +2 -29
  76. package/include/stdint.h +5 -14
  77. package/include/vecintrin.h +1 -1
  78. package/include/wasm_simd128.h +17 -0
  79. package/include/xmmintrin.h +8 -7
  80. package/include/zos_wrappers/grp.h +19 -0
  81. package/include/zos_wrappers/locale.h +19 -0
  82. package/include/zos_wrappers/math.h +31 -0
  83. package/include/zos_wrappers/poll.h +19 -0
  84. package/include/zos_wrappers/stdlib.h +20 -0
  85. package/include/zos_wrappers/string.h +19 -0
  86. package/include/zos_wrappers/time.h +19 -0
  87. package/include/zos_wrappers/variant.h +19 -0
  88. package/lib/darwin/libclang_rt.asan_abi_ios.a +0 -0
  89. package/lib/darwin/libclang_rt.asan_abi_iossim.a +0 -0
  90. package/lib/darwin/libclang_rt.asan_abi_osx.a +0 -0
  91. package/lib/darwin/libclang_rt.asan_ios_dynamic.dylib +0 -0
  92. package/lib/darwin/libclang_rt.asan_iossim_dynamic.dylib +0 -0
  93. package/lib/darwin/libclang_rt.asan_osx_dynamic.dylib +0 -0
  94. package/lib/darwin/libclang_rt.cc_kext.a +0 -0
  95. package/lib/darwin/libclang_rt.cc_kext_ios.a +0 -0
  96. package/lib/darwin/libclang_rt.fuzzer_ios.a +0 -0
  97. package/lib/darwin/libclang_rt.fuzzer_iossim.a +0 -0
  98. package/lib/darwin/libclang_rt.fuzzer_no_main_ios.a +0 -0
  99. package/lib/darwin/libclang_rt.fuzzer_no_main_iossim.a +0 -0
  100. package/lib/darwin/libclang_rt.fuzzer_no_main_osx.a +0 -0
  101. package/lib/darwin/libclang_rt.fuzzer_osx.a +0 -0
  102. package/lib/darwin/libclang_rt.ios.a +0 -0
  103. package/lib/darwin/libclang_rt.iossim.a +0 -0
  104. package/lib/darwin/libclang_rt.lsan_ios_dynamic.dylib +0 -0
  105. package/lib/darwin/libclang_rt.lsan_iossim_dynamic.dylib +0 -0
  106. package/lib/darwin/libclang_rt.lsan_osx_dynamic.dylib +0 -0
  107. package/lib/darwin/libclang_rt.osx.a +0 -0
  108. package/lib/darwin/libclang_rt.profile_ios.a +0 -0
  109. package/lib/darwin/libclang_rt.profile_iossim.a +0 -0
  110. package/lib/darwin/libclang_rt.profile_osx.a +0 -0
  111. package/lib/darwin/libclang_rt.rtsan_ios_dynamic.dylib +0 -0
  112. package/lib/darwin/libclang_rt.rtsan_iossim_dynamic.dylib +0 -0
  113. package/lib/darwin/libclang_rt.rtsan_osx_dynamic.dylib +0 -0
  114. package/lib/darwin/libclang_rt.stats_client_ios.a +0 -0
  115. package/lib/darwin/libclang_rt.stats_client_iossim.a +0 -0
  116. package/lib/darwin/libclang_rt.stats_client_osx.a +0 -0
  117. package/lib/darwin/libclang_rt.stats_ios_dynamic.dylib +0 -0
  118. package/lib/darwin/libclang_rt.stats_iossim_dynamic.dylib +0 -0
  119. package/lib/darwin/libclang_rt.stats_osx_dynamic.dylib +0 -0
  120. package/lib/darwin/libclang_rt.tsan_ios_dynamic.dylib +0 -0
  121. package/lib/darwin/libclang_rt.tsan_iossim_dynamic.dylib +0 -0
  122. package/lib/darwin/libclang_rt.tsan_osx_dynamic.dylib +0 -0
  123. package/lib/darwin/libclang_rt.tysan_ios_dynamic.dylib +0 -0
  124. package/lib/darwin/libclang_rt.tysan_iossim_dynamic.dylib +0 -0
  125. package/lib/darwin/libclang_rt.tysan_osx_dynamic.dylib +0 -0
  126. package/lib/darwin/libclang_rt.ubsan_ios_dynamic.dylib +0 -0
  127. package/lib/darwin/libclang_rt.ubsan_iossim_dynamic.dylib +0 -0
  128. package/lib/darwin/libclang_rt.ubsan_minimal_ios.a +0 -0
  129. package/lib/darwin/libclang_rt.ubsan_minimal_ios_dynamic.dylib +0 -0
  130. package/lib/darwin/libclang_rt.ubsan_minimal_iossim.a +0 -0
  131. package/lib/darwin/libclang_rt.ubsan_minimal_iossim_dynamic.dylib +0 -0
  132. package/lib/darwin/libclang_rt.ubsan_minimal_osx.a +0 -0
  133. package/lib/darwin/libclang_rt.ubsan_minimal_osx_dynamic.dylib +0 -0
  134. package/lib/darwin/libclang_rt.ubsan_osx_dynamic.dylib +0 -0
  135. package/package.json +1 -1
  136. package/include/amxtf32intrin.h +0 -108
@@ -20,6 +20,35 @@ extern "C" {
20
20
 
21
21
  #pragma clang riscv intrinsic vector
22
22
 
23
+ #define __riscv_intrinsic_v 1
24
+ #define __riscv_intrinsic_zvabd 1
25
+ #define __riscv_intrinsic_zvbb 1
26
+ #define __riscv_intrinsic_zvbc 1
27
+ #define __riscv_intrinsic_zvdot4a8i 1
28
+ #define __riscv_intrinsic_zve32f 1
29
+ #define __riscv_intrinsic_zve32x 1
30
+ #define __riscv_intrinsic_zve64d 1
31
+ #define __riscv_intrinsic_zve64f 1
32
+ #define __riscv_intrinsic_zve64x 1
33
+ #define __riscv_intrinsic_zvfbfa 1
34
+ #define __riscv_intrinsic_zvfbfmin 1
35
+ #define __riscv_intrinsic_zvfbfwma 1
36
+ #define __riscv_intrinsic_zvfh 1
37
+ #define __riscv_intrinsic_zvfhmin 1
38
+ #define __riscv_intrinsic_zvfofp8min 1
39
+ #define __riscv_intrinsic_zvkb 1
40
+ #define __riscv_intrinsic_zvkg 1
41
+ #define __riscv_intrinsic_zvkn 1
42
+ #define __riscv_intrinsic_zvknc 1
43
+ #define __riscv_intrinsic_zvkned 1
44
+ #define __riscv_intrinsic_zvkng 1
45
+ #define __riscv_intrinsic_zvknha 1
46
+ #define __riscv_intrinsic_zvknhb 1
47
+ #define __riscv_intrinsic_zvks 1
48
+ #define __riscv_intrinsic_zvksc 1
49
+ #define __riscv_intrinsic_zvksed 1
50
+ #define __riscv_intrinsic_zvksg 1
51
+ #define __riscv_intrinsic_zvksh 1
23
52
 
24
53
  enum __RISCV_FRM {
25
54
  __RISCV_FRM_RNE = 0,
@@ -415,6 +444,20 @@ typedef __rvv_bfloat16m2x4_t vbfloat16m2x4_t;
415
444
  typedef __rvv_bfloat16m4_t vbfloat16m4_t;
416
445
  typedef __rvv_bfloat16m4x2_t vbfloat16m4x2_t;
417
446
  typedef __rvv_bfloat16m8_t vbfloat16m8_t;
447
+ typedef __rvv_float8e4m3mf8_t vfloat8e4m3mf8_t;
448
+ typedef __rvv_float8e4m3mf4_t vfloat8e4m3mf4_t;
449
+ typedef __rvv_float8e4m3mf2_t vfloat8e4m3mf2_t;
450
+ typedef __rvv_float8e4m3m1_t vfloat8e4m3m1_t;
451
+ typedef __rvv_float8e4m3m2_t vfloat8e4m3m2_t;
452
+ typedef __rvv_float8e4m3m4_t vfloat8e4m3m4_t;
453
+ typedef __rvv_float8e4m3m8_t vfloat8e4m3m8_t;
454
+ typedef __rvv_float8e5m2mf8_t vfloat8e5m2mf8_t;
455
+ typedef __rvv_float8e5m2mf4_t vfloat8e5m2mf4_t;
456
+ typedef __rvv_float8e5m2mf2_t vfloat8e5m2mf2_t;
457
+ typedef __rvv_float8e5m2m1_t vfloat8e5m2m1_t;
458
+ typedef __rvv_float8e5m2m2_t vfloat8e5m2m2_t;
459
+ typedef __rvv_float8e5m2m4_t vfloat8e5m2m4_t;
460
+ typedef __rvv_float8e5m2m8_t vfloat8e5m2m8_t;
418
461
 
419
462
  #ifdef __cplusplus
420
463
  }
@@ -102,7 +102,7 @@ int SANITIZER_CDECL __asan_address_is_poisoned(void const volatile *addr);
102
102
  /// address of the first such byte. Otherwise returns 0.
103
103
  ///
104
104
  /// \param beg Start of memory region.
105
- /// \param size Start of memory region.
105
+ /// \param size Size of memory region.
106
106
  /// \returns Address of first poisoned byte.
107
107
  void *SANITIZER_CDECL __asan_region_is_poisoned(void *beg, size_t size);
108
108
 
@@ -174,6 +174,56 @@ int SANITIZER_CDECL __asan_get_report_access_type(void);
174
174
  /// \returns Access size in bytes.
175
175
  size_t SANITIZER_CDECL __asan_get_report_access_size(void);
176
176
 
177
+ /// Gets the source address or address range involved in the current error
178
+ /// (e.g., memcpy source, or the address being read from).
179
+ ///
180
+ /// \param out_addr [out] Storage for the address.
181
+ /// \param out_size [out] Storage for the range size.
182
+ ///
183
+ /// \returns 1 if found, 0 otherwise.
184
+ int SANITIZER_CDECL __asan_get_report_src_address(const void **out_addr,
185
+ size_t *out_size);
186
+
187
+ /// Gets the destination address or address range involved in the current error
188
+ /// (e.g., memcpy dest, or the address being written to).
189
+ ///
190
+ /// \param out_addr [out] Storage for the address.
191
+ /// \param out_size [out] Storage for the range size.
192
+ ///
193
+ /// \returns 1 if found, 0 otherwise.
194
+ int SANITIZER_CDECL __asan_get_report_dest_address(const void **out_addr,
195
+ size_t *out_size);
196
+
197
+ /// Gets the address or address range being deallocated in the current error
198
+ /// (lifetime is terminated).
199
+ ///
200
+ /// \param out_addr [out] Storage for the address.
201
+ /// \param out_size [out] Storage for the range size.
202
+ ///
203
+ /// \returns 1 if found, 0 otherwise.
204
+ int SANITIZER_CDECL __asan_get_report_dealloc_address(const void **out_addr,
205
+ size_t *out_size);
206
+
207
+ /// Gets the first non-dereferenced operand address involved in the current
208
+ /// error (e.g., pointer comparison or ODR violation).
209
+ ///
210
+ /// \param out_addr [out] Storage for the address.
211
+ /// \param out_size [out] Storage for the range size. Zero may be reported.
212
+ ///
213
+ /// \returns 1 if found, 0 otherwise.
214
+ int SANITIZER_CDECL __asan_get_report_first_address(const void **out_addr,
215
+ size_t *out_size);
216
+
217
+ /// Gets the second non-dereferenced operand address involved in the current
218
+ /// error (e.g., pointer comparison or ODR violation).
219
+ ///
220
+ /// \param out_addr [out] Storage for the address.
221
+ /// \param out_size [out] Storage for the range size. Zero may be reported.
222
+ ///
223
+ /// \returns 1 if found, 0 otherwise.
224
+ int SANITIZER_CDECL __asan_get_report_second_address(const void **out_addr,
225
+ size_t *out_size);
226
+
177
227
  /// Gets the bug description of an ASan error (useful for calling from a
178
228
  /// debugger).
179
229
  ///
@@ -208,51 +208,6 @@ void SANITIZER_CDECL __sanitizer_annotate_double_ended_contiguous_container(
208
208
  const void *new_container_beg, const void *new_container_end);
209
209
  #endif
210
210
 
211
- /// Copies memory annotations from a source storage region to a destination
212
- /// storage region. After the operation, the destination region has the same
213
- /// memory annotations as the source region, as long as sanitizer limitations
214
- /// allow it (more bytes may be unpoisoned than in the source region, resulting
215
- /// in more false negatives, but never false positives). If the source and
216
- /// destination regions overlap, only the minimal required changes are made to
217
- /// preserve the correct annotations. Old storage bytes that are not in the new
218
- /// storage should have the same annotations, as long as sanitizer limitations
219
- /// allow it.
220
- ///
221
- /// This function is primarily designed to be used when moving trivially
222
- /// relocatable objects that may have poisoned memory, making direct copying
223
- /// problematic under sanitizer. However, this function does not move memory
224
- /// content itself, only annotations.
225
- ///
226
- /// A contiguous container is a container that keeps all of its elements in a
227
- /// contiguous region of memory. The container owns the region of memory
228
- /// <c>[src_begin, src_end)</c> and <c>[dst_begin, dst_end)</c>. The memory
229
- /// within these regions may be alternately poisoned and non-poisoned, with
230
- /// possibly smaller poisoned and unpoisoned regions.
231
- ///
232
- /// If this function fully poisons a granule, it is marked as "container
233
- /// overflow".
234
- ///
235
- /// Argument requirements: The destination container must have the same size as
236
- /// the source container, which is inferred from the beginning and end of the
237
- /// source region. Addresses may be granule-unaligned, but this may affect
238
- /// performance.
239
- ///
240
- /// \param src_begin Begin of the source container region.
241
- /// \param src_end End of the source container region.
242
- /// \param dst_begin Begin of the destination container region.
243
- /// \param dst_end End of the destination container region.
244
- #ifdef __SANITIZER_DISABLE_CONTAINER_OVERFLOW__
245
- __attribute__((__internal_linkage__)) inline void SANITIZER_CDECL
246
- __sanitizer_copy_contiguous_container_annotations(const void *src_begin,
247
- const void *src_end,
248
- const void *dst_begin,
249
- const void *dst_end) {}
250
- #else
251
- void SANITIZER_CDECL __sanitizer_copy_contiguous_container_annotations(
252
- const void *src_begin, const void *src_end, const void *dst_begin,
253
- const void *dst_end);
254
- #endif
255
-
256
211
  /// Returns true if the contiguous container <c>[beg, end)</c> is properly
257
212
  /// poisoned.
258
213
  ///
@@ -273,7 +228,9 @@ void SANITIZER_CDECL __sanitizer_copy_contiguous_container_annotations(
273
228
  __attribute__((__internal_linkage__)) inline int
274
229
  SANITIZER_CDECL __sanitizer_verify_contiguous_container(const void *beg,
275
230
  const void *mid,
276
- const void *end) {}
231
+ const void *end) {
232
+ return 1;
233
+ }
277
234
  #else
278
235
  int SANITIZER_CDECL __sanitizer_verify_contiguous_container(const void *beg,
279
236
  const void *mid,
@@ -306,7 +263,9 @@ __attribute__((__internal_linkage__)) inline int SANITIZER_CDECL
306
263
  __sanitizer_verify_double_ended_contiguous_container(const void *storage_beg,
307
264
  const void *container_beg,
308
265
  const void *container_end,
309
- const void *storage_end) {}
266
+ const void *storage_end) {
267
+ return 1;
268
+ }
310
269
  #else
311
270
  int SANITIZER_CDECL __sanitizer_verify_double_ended_contiguous_container(
312
271
  const void *storage_beg, const void *container_beg,
@@ -327,7 +286,9 @@ int SANITIZER_CDECL __sanitizer_verify_double_ended_contiguous_container(
327
286
  __attribute__((__internal_linkage__)) inline const void *SANITIZER_CDECL
328
287
  __sanitizer_contiguous_container_find_bad_address(const void *beg,
329
288
  const void *mid,
330
- const void *end) {}
289
+ const void *end) {
290
+ return NULL;
291
+ }
331
292
  #else
332
293
  const void *SANITIZER_CDECL __sanitizer_contiguous_container_find_bad_address(
333
294
  const void *beg, const void *mid, const void *end);
@@ -347,7 +308,9 @@ const void *SANITIZER_CDECL __sanitizer_contiguous_container_find_bad_address(
347
308
  __attribute__((__internal_linkage__)) inline const void *SANITIZER_CDECL
348
309
  __sanitizer_double_ended_contiguous_container_find_bad_address(
349
310
  const void *storage_beg, const void *container_beg,
350
- const void *container_end, const void *storage_end) {}
311
+ const void *container_end, const void *storage_end) {
312
+ return NULL;
313
+ }
351
314
  #else
352
315
  const void *SANITIZER_CDECL
353
316
  __sanitizer_double_ended_contiguous_container_find_bad_address(
@@ -0,0 +1,50 @@
1
+ //===-- sanitizer/safestack_interface.h -------------------------*- C++ -*-===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ //
7
+ //===----------------------------------------------------------------------===//
8
+ //
9
+ // This file is a part of SafeStack.
10
+ //
11
+ // Public interface header.
12
+ //===----------------------------------------------------------------------===//
13
+ #ifndef SANITIZER_SAFESTACK_INTERFACE_H
14
+ #define SANITIZER_SAFESTACK_INTERFACE_H
15
+
16
+ #include <sanitizer/common_interface_defs.h>
17
+
18
+ #ifdef __cplusplus
19
+ extern "C" {
20
+ #endif
21
+
22
+ /// Returns the current unsafe stack pointer of the current thread.
23
+ const void *SANITIZER_CDECL __safestack_get_unsafe_stack_ptr(void);
24
+
25
+ /// Returns a pointer to the bottom of the unsafe stack of the current thread.
26
+ const void *SANITIZER_CDECL __safestack_get_unsafe_stack_bottom(void);
27
+
28
+ /// Returns a pointer to the top of the unsafe stack of the current thread.
29
+ const void *SANITIZER_CDECL __safestack_get_unsafe_stack_top(void);
30
+
31
+ /// Returns a pointer to the top of the unsafe sigalt stack of the current
32
+ /// thread.
33
+ const void *SANITIZER_CDECL __safestack_get_unsafe_sigalt_stack_ptr(void);
34
+
35
+ /// Returns a pointer to the bottom of the unsafe sigalt stack of the current
36
+ /// thread.
37
+ const void *SANITIZER_CDECL __safestack_get_unsafe_sigalt_stack_bottom(void);
38
+
39
+ /// Returns a pointer to the top of the unsafe sigalt stack of the current
40
+ /// thread.
41
+ const void *SANITIZER_CDECL __safestack_get_unsafe_sigalt_stack_top(void);
42
+
43
+ /// Set a new unsafe signal stack context to be used if SA_ONSTACK is set.
44
+ int SANITIZER_CDECL __safestack_unsafe_sigaltstack(size_t ss_size);
45
+
46
+ #ifdef __cplusplus
47
+ } // extern "C"
48
+ #endif
49
+
50
+ #endif // SANITIZER_SAFESTACK_INTERFACE_H
@@ -0,0 +1,36 @@
1
+ //===-- tysan_interface.h ---------------------------------------*- C++ -*-===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ //
7
+ //===----------------------------------------------------------------------===//
8
+ //
9
+ // This file is a part of TypeSanitizer.
10
+ //
11
+ // Public interface header for TySan.
12
+ //===----------------------------------------------------------------------===//
13
+ #ifndef SANITIZER_TYSAN_INTERFACE_H
14
+ #define SANITIZER_TYSAN_INTERFACE_H
15
+
16
+ #include <sanitizer/common_interface_defs.h>
17
+ #include <stdlib.h>
18
+
19
+ #ifdef __cplusplus
20
+ extern "C" {
21
+ #endif
22
+
23
+ /// Marks a memory region (<c>[addr, addr+size)</c>) as not yet having a type.
24
+ ///
25
+ /// TySan will take the next read/write to the memory region to be the correct
26
+ /// type for the memory, and use that for its checks from then on.
27
+ ///
28
+ /// \param addr Start of memory region.
29
+ /// \param size Size of memory region.
30
+ void SANITIZER_CDECL __tysan_set_type_unknown(void const *addr, size_t size);
31
+
32
+ #ifdef __cplusplus
33
+ }
34
+ #endif
35
+
36
+ #endif
@@ -27,6 +27,36 @@ extern "C" {
27
27
  /// \returns Default options string.
28
28
  const char *SANITIZER_CDECL __ubsan_default_options(void);
29
29
 
30
+ /// User-provided default suppressions.
31
+ ///
32
+ /// You can provide your own implementation of this function to return a string
33
+ /// containing UBSan suppressions.
34
+ ///
35
+ /// \returns Default suppressions string.
36
+ const char *SANITIZER_CDECL __ubsan_default_suppressions(void);
37
+
38
+ /// Set up an interval timer and install a SIGPROF signal handler that crashes
39
+ /// the program if it is stuck in a trap loop generated by -fsanitize-trap-loop.
40
+ ///
41
+ /// This function is only intended to be called by single-threaded programs.
42
+ /// Because interval timers are delivered to an arbitrary thread in the process,
43
+ /// it is possible that a thread in a trap loop will never have the signal
44
+ /// delivered to it. For multi-threaded programs, it is recommended to call
45
+ /// OS-specific APIs such as timer_create(CLOCK_THREAD_CPUTIME_ID) on Linux to
46
+ /// install a timer on each thread.
47
+ ///
48
+ /// Programs with their own signal handlers can call __ubsan_is_trap_loop from
49
+ /// the signal handler to implement trap loop handling.
50
+ ///
51
+ /// This function is currently only supported on Linux/x86.
52
+ void __ubsan_install_trap_loop_detection(void);
53
+
54
+ /// Returns whether uc (actually a pointer to ucontext_t) indicates that the
55
+ /// thread is stuck in a trap loop generated by -fsanitize-trap-loop.
56
+ ///
57
+ /// This function is currently only supported on Linux/x86.
58
+ int __ubsan_is_trap_loop(void *uc);
59
+
30
60
  #ifdef __cplusplus
31
61
  } // extern "C"
32
62
  #endif
@@ -13,6 +13,24 @@
13
13
 
14
14
  #pragma clang riscv intrinsic sifive_vector
15
15
 
16
+ #define __riscv_intrinsic_xsfmm32a16f 1
17
+ #define __riscv_intrinsic_xsfmm32a32f 1
18
+ #define __riscv_intrinsic_xsfmm32a8f 1
19
+ #define __riscv_intrinsic_xsfmm32a8i 1
20
+ #define __riscv_intrinsic_xsfmm32a 1
21
+ #define __riscv_intrinsic_xsfmm64a64f 1
22
+ #define __riscv_intrinsic_xsfmmbase 1
23
+ #define __riscv_intrinsic_xsfvcp 1
24
+ #define __riscv_intrinsic_xsfvfbfexp16e 1
25
+ #define __riscv_intrinsic_xsfvfexp16e 1
26
+ #define __riscv_intrinsic_xsfvfexp32e 1
27
+ #define __riscv_intrinsic_xsfvfexpa 1
28
+ #define __riscv_intrinsic_xsfvfexpa64e 1
29
+ #define __riscv_intrinsic_xsfvfnrclipxfqf 1
30
+ #define __riscv_intrinsic_xsfvfwmaccqqq 1
31
+ #define __riscv_intrinsic_xsfvqmaccdod 1
32
+ #define __riscv_intrinsic_xsfvqmaccqoq 1
33
+
16
34
  #define __riscv_sf_vc_x_se_u8mf4(p27_26, p24_20, p11_7, rs1, vl) \
17
35
  __riscv_sf_vc_x_se(p27_26, p24_20, p11_7, (uint8_t)rs1, 8, 6, vl)
18
36
  #define __riscv_sf_vc_x_se_u8mf2(p27_26, p24_20, p11_7, rs1, vl) \
@@ -27,9 +27,6 @@ _Pragma("omp begin declare variant match(device = {arch(spirv64)})");
27
27
  #define __gpu_global __attribute__((address_space(1)))
28
28
  #define __gpu_generic __attribute__((address_space(4)))
29
29
 
30
- // Attribute to declare a function as a kernel.
31
- #define __gpu_kernel __attribute__((device_kernel, visibility("protected")))
32
-
33
30
  // Returns the number of workgroups in the 'x' dimension of the grid.
34
31
  _DEFAULT_FN_ATTRS static __inline__ uint32_t __gpu_num_blocks_x(void) {
35
32
  return __builtin_spirv_num_workgroups(0);
@@ -146,37 +143,13 @@ __gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
146
143
  return __builtin_spirv_subgroup_shuffle(__x, __lane);
147
144
  }
148
145
 
149
- // Returns a bitmask marking all lanes that have the same value of __x.
150
- _DEFAULT_FN_ATTRS static __inline__ uint64_t
151
- __gpu_match_any_u32(uint64_t __lane_mask, uint32_t __x) {
152
- return __gpu_match_any_u32_impl(__lane_mask, __x);
153
- }
154
-
155
- // Returns a bitmask marking all lanes that have the same value of __x.
156
- _DEFAULT_FN_ATTRS static __inline__ uint64_t
157
- __gpu_match_any_u64(uint64_t __lane_mask, uint64_t __x) {
158
- return __gpu_match_any_u64_impl(__lane_mask, __x);
159
- }
160
-
161
- // Returns the current lane mask if every lane contains __x.
162
- _DEFAULT_FN_ATTRS static __inline__ uint64_t
163
- __gpu_match_all_u32(uint64_t __lane_mask, uint32_t __x) {
164
- return __gpu_match_all_u32_impl(__lane_mask, __x);
165
- }
166
-
167
- // Returns the current lane mask if every lane contains __x.
168
- _DEFAULT_FN_ATTRS static __inline__ uint64_t
169
- __gpu_match_all_u64(uint64_t __lane_mask, uint64_t __x) {
170
- return __gpu_match_all_u64_impl(__lane_mask, __x);
171
- }
172
-
173
146
  // SPIR-V does not expose this, always return false.
174
- _DEFAULT_FN_ATTRS static __inline__ bool __gpu_is_ptr_local(void *ptr) {
147
+ _DEFAULT_FN_ATTRS static __inline__ bool __gpu_is_ptr_local(const void *ptr) {
175
148
  return 0;
176
149
  }
177
150
 
178
151
  // SPIR-V does not expose this, always return false.
179
- _DEFAULT_FN_ATTRS static __inline__ bool __gpu_is_ptr_private(void *ptr) {
152
+ _DEFAULT_FN_ATTRS static __inline__ bool __gpu_is_ptr_private(const void *ptr) {
180
153
  return 0;
181
154
  }
182
155
 
package/include/stdint.h CHANGED
@@ -805,25 +805,16 @@ typedef __UINTMAX_TYPE__ uintmax_t;
805
805
  #endif
806
806
 
807
807
  /* C99 7.18.3 Limits of other integer types. */
808
- #define SIG_ATOMIC_MIN __INTN_MIN(__SIG_ATOMIC_WIDTH__)
809
- #define SIG_ATOMIC_MAX __INTN_MAX(__SIG_ATOMIC_WIDTH__)
810
- #ifdef __WINT_UNSIGNED__
811
- # define WINT_MIN __UINTN_C(__WINT_WIDTH__, 0)
812
- # define WINT_MAX __UINTN_MAX(__WINT_WIDTH__)
813
- #else
814
- # define WINT_MIN __INTN_MIN(__WINT_WIDTH__)
815
- # define WINT_MAX __INTN_MAX(__WINT_WIDTH__)
816
- #endif
808
+ #define SIG_ATOMIC_MIN __SIG_ATOMIC_MIN__
809
+ #define SIG_ATOMIC_MAX __SIG_ATOMIC_MAX__
810
+ #define WINT_MIN __WINT_MIN__
811
+ #define WINT_MAX __WINT_MAX__
817
812
 
818
813
  #ifndef WCHAR_MAX
819
814
  # define WCHAR_MAX __WCHAR_MAX__
820
815
  #endif
821
816
  #ifndef WCHAR_MIN
822
- # if __WCHAR_MAX__ == __INTN_MAX(__WCHAR_WIDTH__)
823
- # define WCHAR_MIN __INTN_MIN(__WCHAR_WIDTH__)
824
- # else
825
- # define WCHAR_MIN __UINTN_C(__WCHAR_WIDTH__, 0)
826
- # endif
817
+ #define WCHAR_MIN __WCHAR_MIN__
827
818
  #endif
828
819
 
829
820
  /* 7.18.4.2 Macros for greatest-width integer constants. */
@@ -207,7 +207,7 @@ vec_insert(unsigned long long __scalar, __vector unsigned long long __vec,
207
207
  #if __ARCH__ >= 12
208
208
  static inline __ATTRS_o_ai __vector float
209
209
  vec_insert(float __scalar, __vector float __vec, int __index) {
210
- __vec[__index & 1] = __scalar;
210
+ __vec[__index & 3] = __scalar;
211
211
  return __vec;
212
212
  }
213
213
  #endif
@@ -45,6 +45,7 @@ typedef int __i32x2 __attribute__((__vector_size__(8), __aligned__(8)));
45
45
  typedef unsigned int __u32x2
46
46
  __attribute__((__vector_size__(8), __aligned__(8)));
47
47
  typedef float __f32x2 __attribute__((__vector_size__(8), __aligned__(8)));
48
+ typedef __fp16 __f16x4 __attribute__((__vector_size__(8), __aligned__(8)));
48
49
 
49
50
  #define __DEFAULT_FN_ATTRS \
50
51
  __attribute__((__always_inline__, __nodebug__, __target__("simd128"), \
@@ -2010,6 +2011,22 @@ static __inline__ v128_t __FP16_FN_ATTRS wasm_f16x8_convert_u16x8(v128_t __a) {
2010
2011
  return (v128_t) __builtin_convertvector((__u16x8)__a, __f16x8);
2011
2012
  }
2012
2013
 
2014
+ static __inline__ v128_t __FP16_FN_ATTRS
2015
+ wasm_f32x4_promote_low_f16x8(v128_t __a) {
2016
+ return (v128_t) __builtin_convertvector(
2017
+ (__f16x4){((__f16x8)__a)[0], ((__f16x8)__a)[1], ((__f16x8)__a)[2],
2018
+ ((__f16x8)__a)[3]},
2019
+ __f32x4);
2020
+ }
2021
+
2022
+ static __inline__ v128_t __FP16_FN_ATTRS
2023
+ wasm_f16x8_demote_f32x4_zero(v128_t __a) {
2024
+ return (v128_t) __builtin_convertvector(
2025
+ __builtin_shufflevector((__f32x4)__a, (__f32x4){0, 0, 0, 0}, 0, 1, 2, 3,
2026
+ 4, 5, 6, 7),
2027
+ __f16x8);
2028
+ }
2029
+
2013
2030
  static __inline__ v128_t __FP16_FN_ATTRS wasm_f16x8_relaxed_madd(v128_t __a,
2014
2031
  v128_t __b,
2015
2032
  v128_t __c) {
@@ -341,7 +341,8 @@ _mm_rsqrt_ps(__m128 __a)
341
341
  /// \returns A 128-bit vector of [4 x float] whose lower 32 bits contain the
342
342
  /// minimum value between both operands. The upper 96 bits are copied from
343
343
  /// the upper 96 bits of the first source operand.
344
- static __inline__ __m128 __DEFAULT_FN_ATTRS _mm_min_ss(__m128 __a, __m128 __b) {
344
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_CONSTEXPR _mm_min_ss(__m128 __a,
345
+ __m128 __b) {
345
346
  return __builtin_ia32_minss((__v4sf)__a, (__v4sf)__b);
346
347
  }
347
348
 
@@ -384,7 +385,8 @@ static __inline__ __m128 __DEFAULT_FN_ATTRS_CONSTEXPR _mm_min_ps(__m128 __a,
384
385
  /// \returns A 128-bit vector of [4 x float] whose lower 32 bits contain the
385
386
  /// maximum value between both operands. The upper 96 bits are copied from
386
387
  /// the upper 96 bits of the first source operand.
387
- static __inline__ __m128 __DEFAULT_FN_ATTRS _mm_max_ss(__m128 __a, __m128 __b) {
388
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_CONSTEXPR _mm_max_ss(__m128 __a,
389
+ __m128 __b) {
388
390
  return __builtin_ia32_maxss((__v4sf)__a, (__v4sf)__b);
389
391
  }
390
392
 
@@ -2569,11 +2571,10 @@ _mm_avg_pu16(__m64 __a, __m64 __b) {
2569
2571
  /// \returns A 64-bit integer vector whose lower 16 bits contain the sums of the
2570
2572
  /// sets of absolute differences between both operands. The upper bits are
2571
2573
  /// cleared.
2572
- static __inline__ __m64 __DEFAULT_FN_ATTRS_SSE2
2573
- _mm_sad_pu8(__m64 __a, __m64 __b)
2574
- {
2575
- return __trunc64(__builtin_ia32_psadbw128((__v16qi)__zext128(__a),
2576
- (__v16qi)__zext128(__b)));
2574
+ static __inline__ __m64 __DEFAULT_FN_ATTRS_SSE2_CONSTEXPR
2575
+ _mm_sad_pu8(__m64 __a, __m64 __b) {
2576
+ return __trunc64(__builtin_ia32_psadbw128((__v16qu)__zext128(__a),
2577
+ (__v16qu)__zext128(__b)));
2577
2578
  }
2578
2579
 
2579
2580
  #if defined(__cplusplus)
@@ -0,0 +1,19 @@
1
+ /*===----------------------------- grp.h ----------------------------------===
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 __ZOS_WRAPPERS_GRP_H
11
+ #define __ZOS_WRAPPERS_GRP_H
12
+ #if __has_include_next(<grp.h>)
13
+ #include_next <grp.h>
14
+ #ifdef __grp
15
+ #undef __grp
16
+ #define __grp __grp
17
+ #endif
18
+ #endif /* __has_include_next(<grp.h>) */
19
+ #endif /* __ZOS_WRAPPERS_GRP_H */
@@ -0,0 +1,19 @@
1
+ /*===----------------------------- locale.h ---------------------------------===
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 __ZOS_WRAPPERS_LOCALE_H
11
+ #define __ZOS_WRAPPERS_LOCALE_H
12
+ #if __has_include_next(<locale.h>)
13
+ #include_next <locale.h>
14
+ #ifdef __locale
15
+ #undef __locale
16
+ #define __locale __locale
17
+ #endif
18
+ #endif /* __has_include_next(<locale.h>) */
19
+ #endif /* __ZOS_WRAPPERS_LOCALE_H */
@@ -0,0 +1,31 @@
1
+ /*===----------------------------- math.h ----------------------------------===
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 __ZOS_WRAPPERS_MATH_H
11
+ #define __ZOS_WRAPPERS_MATH_H
12
+ #if __has_include_next(<math.h>)
13
+ #include_next <math.h>
14
+ #ifdef __math
15
+ #undef __math
16
+ #define __math __math
17
+ #endif
18
+ #ifndef __BFP__
19
+ #ifdef __cplusplus
20
+ extern "C"
21
+ #endif
22
+ double fabs(double x) __THROW;
23
+ #endif
24
+ #if !defined(__LP64__) && !defined(__BFP__)
25
+ #ifdef __C99
26
+ #pragma map(tgammaf, "\174\174TGMFH9")
27
+ #pragma map(tgamma, "\174\174TGMAH9")
28
+ #endif
29
+ #endif
30
+ #endif /* __has_include_next(<math.h>) */
31
+ #endif /* __ZOS_WRAPPERS_MATH_H */
@@ -0,0 +1,19 @@
1
+ /*===----------------------------- poll.h ----------------------------------===
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 __ZOS_WRAPPERS_POLL_H
11
+ #define __ZOS_WRAPPERS_POLL_H
12
+ #if __has_include_next(<poll.h>)
13
+ #include_next <poll.h>
14
+ #ifdef __poll
15
+ #undef __poll
16
+ #define __poll __poll
17
+ #endif
18
+ #endif /* __has_include_next(<poll.h>) */
19
+ #endif /* __ZOS_WRAPPERS_POLL_H */
@@ -0,0 +1,20 @@
1
+ /*===----------------------------- stdlib.h --------------------------------===
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 __ZOS_WRAPPERS_STDLIB_H
11
+ #define __ZOS_WRAPPERS_STDLIB_H
12
+ #if __has_include_next(<stdlib.h>)
13
+ #include_next <stdlib.h>
14
+ #ifdef _EXT
15
+ #ifndef __CS1
16
+ #undef __cs
17
+ #endif
18
+ #endif /* _EXT */
19
+ #endif /* __has_include_next(<stdlib.h>) */
20
+ #endif /* __ZOS_WRAPPERS_STDLIB_H */
@@ -0,0 +1,19 @@
1
+ /*===--------------------------- string.h ----------------------------------===
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 __ZOS_WRAPPERS_STRING_H
11
+ #define __ZOS_WRAPPERS_STRING_H
12
+ #if __has_include_next(<string.h>)
13
+ #include_next <string.h>
14
+ #ifdef __string
15
+ #undef __string
16
+ #define __string __string
17
+ #endif
18
+ #endif /* __has_include_next(<string.h>) */
19
+ #endif /* __ZOS_WRAPPERS_STRING_H */