@cpp-linter/clang-tidy-darwin-x64 14.0.0 → 17.0.6
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.
- package/README.md +2 -2
- package/bin/clang-tidy +2 -2
- package/lib/clang/{14.0.0 → 17}/include/__clang_cuda_intrinsics.h +198 -7
- package/lib/clang/{14.0.0 → 17}/include/__clang_cuda_math.h +1 -1
- package/lib/clang/{14.0.0 → 17}/include/__clang_cuda_texture_intrinsics.h +2 -0
- package/lib/clang/{14.0.0 → 17}/include/__clang_hip_cmath.h +1 -1
- package/lib/clang/{14.0.0 → 17}/include/__clang_hip_libdevice_declares.h +37 -30
- package/lib/clang/{14.0.0 → 17}/include/__clang_hip_math.h +66 -84
- package/lib/clang/{14.0.0 → 17}/include/__clang_hip_runtime_wrapper.h +14 -0
- package/lib/clang/17/include/__clang_hip_stdlib.h +43 -0
- package/lib/clang/{14.0.0 → 17}/include/__wmmintrin_pclmul.h +10 -10
- package/lib/clang/17/include/adxintrin.h +227 -0
- package/lib/clang/{14.0.0 → 17}/include/altivec.h +597 -346
- package/lib/clang/17/include/amxcomplexintrin.h +169 -0
- package/lib/clang/17/include/amxfp16intrin.h +58 -0
- package/lib/clang/{14.0.0 → 17}/include/amxintrin.h +32 -2
- package/lib/clang/{14.0.0 → 17}/include/arm_acle.h +86 -81
- package/lib/clang/{14.0.0 → 17}/include/arm_fp16.h +90 -90
- package/lib/clang/{14.0.0 → 17}/include/arm_neon.h +28567 -28574
- package/lib/clang/{14.0.0 → 17}/include/arm_neon_sve_bridge.h +0 -2
- package/lib/clang/17/include/arm_sme_draft_spec_subject_to_change.h +642 -0
- package/lib/clang/{14.0.0 → 17}/include/arm_sve.h +7916 -8009
- package/lib/clang/17/include/avx2intrin.h +5263 -0
- package/lib/clang/{14.0.0 → 17}/include/avx512bf16intrin.h +18 -15
- package/lib/clang/{14.0.0 → 17}/include/avx512bwintrin.h +12 -12
- package/lib/clang/{14.0.0 → 17}/include/avx512fintrin.h +95 -82
- package/lib/clang/{14.0.0 → 17}/include/avx512fp16intrin.h +18 -17
- package/lib/clang/{14.0.0 → 17}/include/avx512ifmavlintrin.h +13 -27
- package/lib/clang/{14.0.0 → 17}/include/avx512vlbf16intrin.h +31 -38
- package/lib/clang/{14.0.0 → 17}/include/avx512vlbwintrin.h +360 -8
- package/lib/clang/{14.0.0 → 17}/include/avx512vlfp16intrin.h +3 -0
- package/lib/clang/{14.0.0 → 17}/include/avx512vlintrin.h +81 -95
- package/lib/clang/{14.0.0 → 17}/include/avx512vlvnniintrin.h +16 -16
- package/lib/clang/17/include/avxifmaintrin.h +177 -0
- package/lib/clang/{14.0.0 → 17}/include/avxintrin.h +97 -39
- package/lib/clang/17/include/avxneconvertintrin.h +484 -0
- package/lib/clang/17/include/avxvnniint16intrin.h +473 -0
- package/lib/clang/17/include/avxvnniint8intrin.h +471 -0
- package/lib/clang/{14.0.0 → 17}/include/avxvnniintrin.h +16 -16
- package/lib/clang/17/include/bmi2intrin.h +255 -0
- package/lib/clang/{14.0.0 → 17}/include/bmiintrin.h +6 -2
- package/lib/clang/{14.0.0 → 17}/include/cetintrin.h +12 -6
- package/lib/clang/{14.0.0 → 17}/include/clflushoptintrin.h +9 -0
- package/lib/clang/{14.0.0 → 17}/include/clzerointrin.h +7 -5
- package/lib/clang/17/include/cmpccxaddintrin.h +70 -0
- package/lib/clang/{14.0.0 → 17}/include/cpuid.h +12 -1
- package/lib/clang/17/include/cuda_wrappers/bits/basic_string.h +9 -0
- package/lib/clang/17/include/cuda_wrappers/bits/basic_string.tcc +9 -0
- package/lib/clang/17/include/cuda_wrappers/bits/shared_ptr_base.h +9 -0
- package/lib/clang/17/include/cuda_wrappers/cmath +90 -0
- package/lib/clang/{14.0.0 → 17}/include/emmintrin.h +559 -769
- package/lib/clang/{14.0.0 → 17}/include/f16cintrin.h +3 -3
- package/lib/clang/{14.0.0 → 17}/include/float.h +17 -10
- package/lib/clang/17/include/fmaintrin.h +780 -0
- package/lib/clang/{14.0.0 → 17}/include/gfniintrin.h +7 -5
- package/lib/clang/17/include/hlsl/hlsl_basic_types.h +67 -0
- package/lib/clang/17/include/hlsl/hlsl_intrinsics.h +480 -0
- package/lib/clang/17/include/hlsl.h +15 -0
- package/lib/clang/{14.0.0 → 17}/include/hresetintrin.h +2 -2
- package/lib/clang/{14.0.0 → 17}/include/ia32intrin.h +11 -11
- package/lib/clang/{14.0.0 → 17}/include/immintrin.h +166 -26
- package/lib/clang/{14.0.0 → 17}/include/intrin.h +12 -21
- package/lib/clang/{14.0.0 → 17}/include/keylockerintrin.h +22 -22
- package/lib/clang/17/include/larchintrin.h +234 -0
- package/lib/clang/{14.0.0 → 17}/include/limits.h +8 -3
- package/lib/clang/17/include/llvm_libc_wrappers/ctype.h +85 -0
- package/lib/clang/17/include/llvm_libc_wrappers/inttypes.h +34 -0
- package/lib/clang/17/include/llvm_libc_wrappers/stdio.h +34 -0
- package/lib/clang/17/include/llvm_libc_wrappers/stdlib.h +42 -0
- package/lib/clang/17/include/llvm_libc_wrappers/string.h +37 -0
- package/lib/clang/{14.0.0 → 17}/include/mm_malloc.h +3 -3
- package/lib/clang/17/include/mwaitxintrin.h +62 -0
- package/lib/clang/{14.0.0 → 17}/include/opencl-c-base.h +32 -0
- package/lib/clang/{14.0.0 → 17}/include/opencl-c.h +6904 -7100
- package/lib/clang/{14.0.0 → 17}/include/openmp_wrappers/__clang_openmp_device_functions.h +0 -1
- package/lib/clang/{14.0.0 → 17}/include/openmp_wrappers/new +1 -1
- package/lib/clang/{14.0.0 → 17}/include/pmmintrin.h +13 -7
- package/lib/clang/17/include/ppc_wrappers/bmi2intrin.h +134 -0
- package/lib/clang/17/include/ppc_wrappers/bmiintrin.h +165 -0
- package/lib/clang/17/include/ppc_wrappers/emmintrin.h +2269 -0
- package/lib/clang/17/include/ppc_wrappers/immintrin.h +27 -0
- package/lib/clang/{14.0.0 → 17}/include/ppc_wrappers/mm_malloc.h +12 -17
- package/lib/clang/{14.0.0 → 17}/include/ppc_wrappers/mmintrin.h +389 -387
- package/lib/clang/17/include/ppc_wrappers/pmmintrin.h +145 -0
- package/lib/clang/17/include/ppc_wrappers/smmintrin.h +663 -0
- package/lib/clang/17/include/ppc_wrappers/tmmintrin.h +453 -0
- package/lib/clang/{14.0.0/include/stdnoreturn.h → 17/include/ppc_wrappers/x86gprintrin.h} +7 -6
- package/lib/clang/17/include/ppc_wrappers/x86intrin.h +28 -0
- package/lib/clang/17/include/ppc_wrappers/xmmintrin.h +1827 -0
- package/lib/clang/17/include/prfchiintrin.h +61 -0
- package/lib/clang/17/include/raointintrin.h +203 -0
- package/lib/clang/17/include/rdpruintrin.h +57 -0
- package/lib/clang/17/include/rdseedintrin.h +105 -0
- package/lib/clang/17/include/riscv_ntlh.h +28 -0
- package/lib/clang/17/include/riscv_vector.h +400 -0
- package/lib/clang/{14.0.0 → 17}/include/rtmintrin.h +1 -1
- package/lib/clang/17/include/sha512intrin.h +200 -0
- package/lib/clang/17/include/shaintrin.h +189 -0
- package/lib/clang/17/include/sifive_vector.h +16 -0
- package/lib/clang/17/include/sm3intrin.h +238 -0
- package/lib/clang/17/include/sm4intrin.h +269 -0
- package/lib/clang/{14.0.0 → 17}/include/smmintrin.h +236 -259
- package/lib/clang/{14.0.0 → 17}/include/stdalign.h +5 -0
- package/lib/clang/{14.0.0 → 17}/include/stdarg.h +23 -7
- package/lib/clang/{14.0.0 → 17}/include/stdatomic.h +15 -8
- package/lib/clang/{14.0.0 → 17}/include/stdbool.h +10 -7
- package/lib/clang/{14.0.0 → 17}/include/stddef.h +14 -2
- package/lib/clang/{14.0.0 → 17}/include/stdint.h +158 -40
- package/lib/clang/17/include/stdnoreturn.h +29 -0
- package/lib/clang/{14.0.0 → 17}/include/uintrintrin.h +8 -8
- package/lib/clang/{14.0.0 → 17}/include/unwind.h +10 -6
- package/lib/clang/17/include/velintrin.h +71 -0
- package/lib/clang/17/include/velintrin_approx.h +120 -0
- package/lib/clang/17/include/velintrin_gen.h +1257 -0
- package/lib/clang/{14.0.0 → 17}/include/wasm_simd128.h +134 -14
- package/lib/clang/17/include/x86gprintrin.h +65 -0
- package/lib/clang/{14.0.0 → 17}/include/x86intrin.h +4 -0
- package/lib/clang/{14.0.0 → 17}/include/xmmintrin.h +10 -5
- package/lib/clang/17/include/xsavecintrin.h +84 -0
- package/package.json +6 -6
- package/lib/clang/14.0.0/include/adxintrin.h +0 -72
- package/lib/clang/14.0.0/include/avx2intrin.h +0 -1148
- package/lib/clang/14.0.0/include/bmi2intrin.h +0 -81
- package/lib/clang/14.0.0/include/fmaintrin.h +0 -216
- package/lib/clang/14.0.0/include/mwaitxintrin.h +0 -33
- package/lib/clang/14.0.0/include/ppc_wrappers/emmintrin.h +0 -2325
- package/lib/clang/14.0.0/include/ppc_wrappers/pmmintrin.h +0 -151
- package/lib/clang/14.0.0/include/ppc_wrappers/smmintrin.h +0 -110
- package/lib/clang/14.0.0/include/ppc_wrappers/tmmintrin.h +0 -496
- package/lib/clang/14.0.0/include/ppc_wrappers/xmmintrin.h +0 -1844
- package/lib/clang/14.0.0/include/rdseedintrin.h +0 -42
- package/lib/clang/14.0.0/include/riscv_vector.h +0 -95423
- package/lib/clang/14.0.0/include/shaintrin.h +0 -61
- package/lib/clang/14.0.0/include/x86gprintrin.h +0 -35
- package/lib/clang/14.0.0/include/xsavecintrin.h +0 -34
- /package/lib/clang/{14.0.0 → 17}/include/__clang_cuda_builtin_vars.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/__clang_cuda_cmath.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/__clang_cuda_complex_builtins.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/__clang_cuda_device_functions.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/__clang_cuda_libdevice_declares.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/__clang_cuda_math_forward_declares.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/__clang_cuda_runtime_wrapper.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/__stddef_max_align_t.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/__wmmintrin_aes.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/ammintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/arm64intr.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/arm_bf16.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/arm_cde.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/arm_cmse.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/arm_mve.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/armintr.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/avx512bitalgintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/avx512cdintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/avx512dqintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/avx512erintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/avx512ifmaintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/avx512pfintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/avx512vbmi2intrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/avx512vbmiintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/avx512vbmivlintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/avx512vlbitalgintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/avx512vlcdintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/avx512vldqintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/avx512vlvbmi2intrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/avx512vlvp2intersectintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/avx512vnniintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/avx512vp2intersectintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/avx512vpopcntdqintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/avx512vpopcntdqvlintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/builtins.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/cet.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/cldemoteintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/clwbintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/crc32intrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/cuda_wrappers/algorithm +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/cuda_wrappers/complex +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/cuda_wrappers/new +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/enqcmdintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/fma4intrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/fxsrintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/hexagon_circ_brev_intrinsics.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/hexagon_protos.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/hexagon_types.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/htmintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/htmxlintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/hvx_hexagon_protos.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/inttypes.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/invpcidintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/iso646.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/lwpintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/lzcntintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/mm3dnow.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/mmintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/module.modulemap +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/movdirintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/msa.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/nmmintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/openmp_wrappers/cmath +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/openmp_wrappers/complex +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/openmp_wrappers/complex.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/openmp_wrappers/complex_cmath.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/openmp_wrappers/math.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/pconfigintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/pkuintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/popcntintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/prfchwintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/ptwriteintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/s390intrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/serializeintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/sgxintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/tbmintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/tgmath.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/tmmintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/tsxldtrkintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/vadefs.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/vaesintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/varargs.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/vecintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/vpclmulqdqintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/waitpkgintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/wbnoinvdintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/wmmintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/xopintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/xsaveintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/xsaveoptintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/xsavesintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 17}/include/xtestintrin.h +0 -0
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
/*===---- bmi2intrin.h - BMI2 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 <bmi2intrin.h> directly; include <immintrin.h> instead."
|
|
12
|
+
#endif
|
|
13
|
+
|
|
14
|
+
#ifndef __BMI2INTRIN_H
|
|
15
|
+
#define __BMI2INTRIN_H
|
|
16
|
+
|
|
17
|
+
/* Define the default attributes for the functions in this file. */
|
|
18
|
+
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("bmi2")))
|
|
19
|
+
|
|
20
|
+
/// Copies the unsigned 32-bit integer \a __X and zeroes the upper bits
|
|
21
|
+
/// starting at bit number \a __Y.
|
|
22
|
+
///
|
|
23
|
+
/// \code{.operation}
|
|
24
|
+
/// i := __Y[7:0]
|
|
25
|
+
/// result := __X
|
|
26
|
+
/// IF i < 32
|
|
27
|
+
/// result[31:i] := 0
|
|
28
|
+
/// FI
|
|
29
|
+
/// \endcode
|
|
30
|
+
///
|
|
31
|
+
/// \headerfile <immintrin.h>
|
|
32
|
+
///
|
|
33
|
+
/// This intrinsic corresponds to the \c BZHI instruction.
|
|
34
|
+
///
|
|
35
|
+
/// \param __X
|
|
36
|
+
/// The 32-bit source value to copy.
|
|
37
|
+
/// \param __Y
|
|
38
|
+
/// The lower 8 bits specify the bit number of the lowest bit to zero.
|
|
39
|
+
/// \returns The partially zeroed 32-bit value.
|
|
40
|
+
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
|
41
|
+
_bzhi_u32(unsigned int __X, unsigned int __Y)
|
|
42
|
+
{
|
|
43
|
+
return __builtin_ia32_bzhi_si(__X, __Y);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/// Deposit (scatter) low-order bits from the unsigned 32-bit integer \a __X
|
|
47
|
+
/// into the 32-bit result, according to the mask in the unsigned 32-bit
|
|
48
|
+
/// integer \a __Y. All other bits of the result are zero.
|
|
49
|
+
///
|
|
50
|
+
/// \code{.operation}
|
|
51
|
+
/// i := 0
|
|
52
|
+
/// result := 0
|
|
53
|
+
/// FOR m := 0 TO 31
|
|
54
|
+
/// IF __Y[m] == 1
|
|
55
|
+
/// result[m] := __X[i]
|
|
56
|
+
/// i := i + 1
|
|
57
|
+
/// ENDIF
|
|
58
|
+
/// ENDFOR
|
|
59
|
+
/// \endcode
|
|
60
|
+
///
|
|
61
|
+
/// \headerfile <immintrin.h>
|
|
62
|
+
///
|
|
63
|
+
/// This intrinsic corresponds to the \c PDEP instruction.
|
|
64
|
+
///
|
|
65
|
+
/// \param __X
|
|
66
|
+
/// The 32-bit source value to copy.
|
|
67
|
+
/// \param __Y
|
|
68
|
+
/// The 32-bit mask specifying where to deposit source bits.
|
|
69
|
+
/// \returns The 32-bit result.
|
|
70
|
+
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
|
71
|
+
_pdep_u32(unsigned int __X, unsigned int __Y)
|
|
72
|
+
{
|
|
73
|
+
return __builtin_ia32_pdep_si(__X, __Y);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/// Extract (gather) bits from the unsigned 32-bit integer \a __X into the
|
|
77
|
+
/// low-order bits of the 32-bit result, according to the mask in the
|
|
78
|
+
/// unsigned 32-bit integer \a __Y. All other bits of the result are zero.
|
|
79
|
+
///
|
|
80
|
+
/// \code{.operation}
|
|
81
|
+
/// i := 0
|
|
82
|
+
/// result := 0
|
|
83
|
+
/// FOR m := 0 TO 31
|
|
84
|
+
/// IF __Y[m] == 1
|
|
85
|
+
/// result[i] := __X[m]
|
|
86
|
+
/// i := i + 1
|
|
87
|
+
/// ENDIF
|
|
88
|
+
/// ENDFOR
|
|
89
|
+
/// \endcode
|
|
90
|
+
///
|
|
91
|
+
/// \headerfile <immintrin.h>
|
|
92
|
+
///
|
|
93
|
+
/// This intrinsic corresponds to the \c PEXT instruction.
|
|
94
|
+
///
|
|
95
|
+
/// \param __X
|
|
96
|
+
/// The 32-bit source value to copy.
|
|
97
|
+
/// \param __Y
|
|
98
|
+
/// The 32-bit mask specifying which source bits to extract.
|
|
99
|
+
/// \returns The 32-bit result.
|
|
100
|
+
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
|
101
|
+
_pext_u32(unsigned int __X, unsigned int __Y)
|
|
102
|
+
{
|
|
103
|
+
return __builtin_ia32_pext_si(__X, __Y);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/// Multiplies the unsigned 32-bit integers \a __X and \a __Y to form a
|
|
107
|
+
/// 64-bit product. Stores the upper 32 bits of the product in the
|
|
108
|
+
/// memory at \a __P and returns the lower 32 bits.
|
|
109
|
+
///
|
|
110
|
+
/// \code{.operation}
|
|
111
|
+
/// Store32(__P, (__X * __Y)[63:32])
|
|
112
|
+
/// result := (__X * __Y)[31:0]
|
|
113
|
+
/// \endcode
|
|
114
|
+
///
|
|
115
|
+
/// \headerfile <immintrin.h>
|
|
116
|
+
///
|
|
117
|
+
/// This intrinsic corresponds to the \c MULX instruction.
|
|
118
|
+
///
|
|
119
|
+
/// \param __X
|
|
120
|
+
/// An unsigned 32-bit multiplicand.
|
|
121
|
+
/// \param __Y
|
|
122
|
+
/// An unsigned 32-bit multiplicand.
|
|
123
|
+
/// \param __P
|
|
124
|
+
/// A pointer to memory for storing the upper half of the product.
|
|
125
|
+
/// \returns The lower half of the product.
|
|
126
|
+
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
|
127
|
+
_mulx_u32(unsigned int __X, unsigned int __Y, unsigned int *__P)
|
|
128
|
+
{
|
|
129
|
+
unsigned long long __res = (unsigned long long) __X * __Y;
|
|
130
|
+
*__P = (unsigned int)(__res >> 32);
|
|
131
|
+
return (unsigned int)__res;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
#ifdef __x86_64__
|
|
135
|
+
|
|
136
|
+
/// Copies the unsigned 64-bit integer \a __X and zeroes the upper bits
|
|
137
|
+
/// starting at bit number \a __Y.
|
|
138
|
+
///
|
|
139
|
+
/// \code{.operation}
|
|
140
|
+
/// i := __Y[7:0]
|
|
141
|
+
/// result := __X
|
|
142
|
+
/// IF i < 64
|
|
143
|
+
/// result[63:i] := 0
|
|
144
|
+
/// FI
|
|
145
|
+
/// \endcode
|
|
146
|
+
///
|
|
147
|
+
/// \headerfile <immintrin.h>
|
|
148
|
+
///
|
|
149
|
+
/// This intrinsic corresponds to the \c BZHI instruction.
|
|
150
|
+
///
|
|
151
|
+
/// \param __X
|
|
152
|
+
/// The 64-bit source value to copy.
|
|
153
|
+
/// \param __Y
|
|
154
|
+
/// The lower 8 bits specify the bit number of the lowest bit to zero.
|
|
155
|
+
/// \returns The partially zeroed 64-bit value.
|
|
156
|
+
static __inline__ unsigned long long __DEFAULT_FN_ATTRS
|
|
157
|
+
_bzhi_u64(unsigned long long __X, unsigned long long __Y)
|
|
158
|
+
{
|
|
159
|
+
return __builtin_ia32_bzhi_di(__X, __Y);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/// Deposit (scatter) low-order bits from the unsigned 64-bit integer \a __X
|
|
163
|
+
/// into the 64-bit result, according to the mask in the unsigned 64-bit
|
|
164
|
+
/// integer \a __Y. All other bits of the result are zero.
|
|
165
|
+
///
|
|
166
|
+
/// \code{.operation}
|
|
167
|
+
/// i := 0
|
|
168
|
+
/// result := 0
|
|
169
|
+
/// FOR m := 0 TO 63
|
|
170
|
+
/// IF __Y[m] == 1
|
|
171
|
+
/// result[m] := __X[i]
|
|
172
|
+
/// i := i + 1
|
|
173
|
+
/// ENDIF
|
|
174
|
+
/// ENDFOR
|
|
175
|
+
/// \endcode
|
|
176
|
+
///
|
|
177
|
+
/// \headerfile <immintrin.h>
|
|
178
|
+
///
|
|
179
|
+
/// This intrinsic corresponds to the \c PDEP instruction.
|
|
180
|
+
///
|
|
181
|
+
/// \param __X
|
|
182
|
+
/// The 64-bit source value to copy.
|
|
183
|
+
/// \param __Y
|
|
184
|
+
/// The 64-bit mask specifying where to deposit source bits.
|
|
185
|
+
/// \returns The 64-bit result.
|
|
186
|
+
static __inline__ unsigned long long __DEFAULT_FN_ATTRS
|
|
187
|
+
_pdep_u64(unsigned long long __X, unsigned long long __Y)
|
|
188
|
+
{
|
|
189
|
+
return __builtin_ia32_pdep_di(__X, __Y);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/// Extract (gather) bits from the unsigned 64-bit integer \a __X into the
|
|
193
|
+
/// low-order bits of the 64-bit result, according to the mask in the
|
|
194
|
+
/// unsigned 64-bit integer \a __Y. All other bits of the result are zero.
|
|
195
|
+
///
|
|
196
|
+
/// \code{.operation}
|
|
197
|
+
/// i := 0
|
|
198
|
+
/// result := 0
|
|
199
|
+
/// FOR m := 0 TO 63
|
|
200
|
+
/// IF __Y[m] == 1
|
|
201
|
+
/// result[i] := __X[m]
|
|
202
|
+
/// i := i + 1
|
|
203
|
+
/// ENDIF
|
|
204
|
+
/// ENDFOR
|
|
205
|
+
/// \endcode
|
|
206
|
+
///
|
|
207
|
+
/// \headerfile <immintrin.h>
|
|
208
|
+
///
|
|
209
|
+
/// This intrinsic corresponds to the \c PEXT instruction.
|
|
210
|
+
///
|
|
211
|
+
/// \param __X
|
|
212
|
+
/// The 64-bit source value to copy.
|
|
213
|
+
/// \param __Y
|
|
214
|
+
/// The 64-bit mask specifying which source bits to extract.
|
|
215
|
+
/// \returns The 64-bit result.
|
|
216
|
+
static __inline__ unsigned long long __DEFAULT_FN_ATTRS
|
|
217
|
+
_pext_u64(unsigned long long __X, unsigned long long __Y)
|
|
218
|
+
{
|
|
219
|
+
return __builtin_ia32_pext_di(__X, __Y);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/// Multiplies the unsigned 64-bit integers \a __X and \a __Y to form a
|
|
223
|
+
/// 128-bit product. Stores the upper 64 bits of the product to the
|
|
224
|
+
/// memory addressed by \a __P and returns the lower 64 bits.
|
|
225
|
+
///
|
|
226
|
+
/// \code{.operation}
|
|
227
|
+
/// Store64(__P, (__X * __Y)[127:64])
|
|
228
|
+
/// result := (__X * __Y)[63:0]
|
|
229
|
+
/// \endcode
|
|
230
|
+
///
|
|
231
|
+
/// \headerfile <immintrin.h>
|
|
232
|
+
///
|
|
233
|
+
/// This intrinsic corresponds to the \c MULX instruction.
|
|
234
|
+
///
|
|
235
|
+
/// \param __X
|
|
236
|
+
/// An unsigned 64-bit multiplicand.
|
|
237
|
+
/// \param __Y
|
|
238
|
+
/// An unsigned 64-bit multiplicand.
|
|
239
|
+
/// \param __P
|
|
240
|
+
/// A pointer to memory for storing the upper half of the product.
|
|
241
|
+
/// \returns The lower half of the product.
|
|
242
|
+
static __inline__ unsigned long long __DEFAULT_FN_ATTRS
|
|
243
|
+
_mulx_u64 (unsigned long long __X, unsigned long long __Y,
|
|
244
|
+
unsigned long long *__P)
|
|
245
|
+
{
|
|
246
|
+
unsigned __int128 __res = (unsigned __int128) __X * __Y;
|
|
247
|
+
*__P = (unsigned long long) (__res >> 64);
|
|
248
|
+
return (unsigned long long) __res;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
#endif /* __x86_64__ */
|
|
252
|
+
|
|
253
|
+
#undef __DEFAULT_FN_ATTRS
|
|
254
|
+
|
|
255
|
+
#endif /* __BMI2INTRIN_H */
|
|
@@ -47,6 +47,7 @@ __tzcnt_u16(unsigned short __X)
|
|
|
47
47
|
/// An unsigned 32-bit integer whose trailing zeros are to be counted.
|
|
48
48
|
/// \returns An unsigned 32-bit integer containing the number of trailing zero
|
|
49
49
|
/// bits in the operand.
|
|
50
|
+
/// \see _mm_tzcnt_32
|
|
50
51
|
static __inline__ unsigned int __RELAXED_FN_ATTRS
|
|
51
52
|
__tzcnt_u32(unsigned int __X)
|
|
52
53
|
{
|
|
@@ -63,10 +64,11 @@ __tzcnt_u32(unsigned int __X)
|
|
|
63
64
|
/// An unsigned 32-bit integer whose trailing zeros are to be counted.
|
|
64
65
|
/// \returns An 32-bit integer containing the number of trailing zero bits in
|
|
65
66
|
/// the operand.
|
|
67
|
+
/// \see __tzcnt_u32
|
|
66
68
|
static __inline__ int __RELAXED_FN_ATTRS
|
|
67
69
|
_mm_tzcnt_32(unsigned int __X)
|
|
68
70
|
{
|
|
69
|
-
return __builtin_ia32_tzcnt_u32(__X);
|
|
71
|
+
return (int)__builtin_ia32_tzcnt_u32(__X);
|
|
70
72
|
}
|
|
71
73
|
|
|
72
74
|
#define _tzcnt_u32(a) (__tzcnt_u32((a)))
|
|
@@ -83,6 +85,7 @@ _mm_tzcnt_32(unsigned int __X)
|
|
|
83
85
|
/// An unsigned 64-bit integer whose trailing zeros are to be counted.
|
|
84
86
|
/// \returns An unsigned 64-bit integer containing the number of trailing zero
|
|
85
87
|
/// bits in the operand.
|
|
88
|
+
/// \see _mm_tzcnt_64
|
|
86
89
|
static __inline__ unsigned long long __RELAXED_FN_ATTRS
|
|
87
90
|
__tzcnt_u64(unsigned long long __X)
|
|
88
91
|
{
|
|
@@ -99,10 +102,11 @@ __tzcnt_u64(unsigned long long __X)
|
|
|
99
102
|
/// An unsigned 64-bit integer whose trailing zeros are to be counted.
|
|
100
103
|
/// \returns An 64-bit integer containing the number of trailing zero bits in
|
|
101
104
|
/// the operand.
|
|
105
|
+
/// \see __tzcnt_u64
|
|
102
106
|
static __inline__ long long __RELAXED_FN_ATTRS
|
|
103
107
|
_mm_tzcnt_64(unsigned long long __X)
|
|
104
108
|
{
|
|
105
|
-
return __builtin_ia32_tzcnt_u64(__X);
|
|
109
|
+
return (long long)__builtin_ia32_tzcnt_u64(__X);
|
|
106
110
|
}
|
|
107
111
|
|
|
108
112
|
#define _tzcnt_u64(a) (__tzcnt_u64((a)))
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
__attribute__((__always_inline__, __nodebug__, __target__("shstk")))
|
|
20
20
|
|
|
21
21
|
static __inline__ void __DEFAULT_FN_ATTRS _incsspd(int __a) {
|
|
22
|
-
__builtin_ia32_incsspd(__a);
|
|
22
|
+
__builtin_ia32_incsspd((unsigned int)__a);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
#ifdef __x86_64__
|
|
@@ -34,7 +34,7 @@ static __inline__ void __DEFAULT_FN_ATTRS _inc_ssp(unsigned int __a) {
|
|
|
34
34
|
}
|
|
35
35
|
#else /* __x86_64__ */
|
|
36
36
|
static __inline__ void __DEFAULT_FN_ATTRS _inc_ssp(unsigned int __a) {
|
|
37
|
-
__builtin_ia32_incsspd(
|
|
37
|
+
__builtin_ia32_incsspd(__a);
|
|
38
38
|
}
|
|
39
39
|
#endif /* __x86_64__ */
|
|
40
40
|
|
|
@@ -42,9 +42,12 @@ static __inline__ unsigned int __DEFAULT_FN_ATTRS _rdsspd(unsigned int __a) {
|
|
|
42
42
|
return __builtin_ia32_rdsspd(__a);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
static __inline__ unsigned int __DEFAULT_FN_ATTRS _rdsspd_i32() {
|
|
45
|
+
static __inline__ unsigned int __DEFAULT_FN_ATTRS _rdsspd_i32(void) {
|
|
46
|
+
#pragma clang diagnostic push
|
|
47
|
+
#pragma clang diagnostic ignored "-Wuninitialized"
|
|
46
48
|
unsigned int t;
|
|
47
49
|
return __builtin_ia32_rdsspd(t);
|
|
50
|
+
#pragma clang diagnostic pop
|
|
48
51
|
}
|
|
49
52
|
|
|
50
53
|
#ifdef __x86_64__
|
|
@@ -52,9 +55,12 @@ static __inline__ unsigned long long __DEFAULT_FN_ATTRS _rdsspq(unsigned long lo
|
|
|
52
55
|
return __builtin_ia32_rdsspq(__a);
|
|
53
56
|
}
|
|
54
57
|
|
|
55
|
-
static __inline__ unsigned long long __DEFAULT_FN_ATTRS _rdsspq_i64() {
|
|
58
|
+
static __inline__ unsigned long long __DEFAULT_FN_ATTRS _rdsspq_i64(void) {
|
|
59
|
+
#pragma clang diagnostic push
|
|
60
|
+
#pragma clang diagnostic ignored "-Wuninitialized"
|
|
56
61
|
unsigned long long t;
|
|
57
62
|
return __builtin_ia32_rdsspq(t);
|
|
63
|
+
#pragma clang diagnostic pop
|
|
58
64
|
}
|
|
59
65
|
#endif /* __x86_64__ */
|
|
60
66
|
|
|
@@ -68,7 +74,7 @@ static __inline__ unsigned int __DEFAULT_FN_ATTRS _get_ssp(void) {
|
|
|
68
74
|
}
|
|
69
75
|
#endif /* __x86_64__ */
|
|
70
76
|
|
|
71
|
-
static __inline__ void __DEFAULT_FN_ATTRS _saveprevssp() {
|
|
77
|
+
static __inline__ void __DEFAULT_FN_ATTRS _saveprevssp(void) {
|
|
72
78
|
__builtin_ia32_saveprevssp();
|
|
73
79
|
}
|
|
74
80
|
|
|
@@ -96,7 +102,7 @@ static __inline__ void __DEFAULT_FN_ATTRS _wrussq(unsigned long long __a, void *
|
|
|
96
102
|
}
|
|
97
103
|
#endif /* __x86_64__ */
|
|
98
104
|
|
|
99
|
-
static __inline__ void __DEFAULT_FN_ATTRS _setssbsy() {
|
|
105
|
+
static __inline__ void __DEFAULT_FN_ATTRS _setssbsy(void) {
|
|
100
106
|
__builtin_ia32_setssbsy();
|
|
101
107
|
}
|
|
102
108
|
|
|
@@ -17,6 +17,15 @@
|
|
|
17
17
|
/* Define the default attributes for the functions in this file. */
|
|
18
18
|
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("clflushopt")))
|
|
19
19
|
|
|
20
|
+
/// Invalidates all levels of the cache hierarchy and flushes modified data to
|
|
21
|
+
/// memory for the cache line specified by the address \a __m.
|
|
22
|
+
///
|
|
23
|
+
/// \headerfile <immintrin.h>
|
|
24
|
+
///
|
|
25
|
+
/// This intrinsic corresponds to the \c CLFLUSHOPT instruction.
|
|
26
|
+
///
|
|
27
|
+
/// \param __m
|
|
28
|
+
/// An address within the cache line to flush and invalidate.
|
|
20
29
|
static __inline__ void __DEFAULT_FN_ATTRS
|
|
21
30
|
_mm_clflushopt(void const * __m) {
|
|
22
31
|
__builtin_ia32_clflushopt(__m);
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
*===-----------------------------------------------------------------------===
|
|
8
8
|
*/
|
|
9
|
-
#
|
|
9
|
+
#ifndef __X86INTRIN_H
|
|
10
10
|
#error "Never use <clzerointrin.h> directly; include <x86intrin.h> instead."
|
|
11
11
|
#endif
|
|
12
12
|
|
|
@@ -17,14 +17,16 @@
|
|
|
17
17
|
#define __DEFAULT_FN_ATTRS \
|
|
18
18
|
__attribute__((__always_inline__, __nodebug__, __target__("clzero")))
|
|
19
19
|
|
|
20
|
-
///
|
|
20
|
+
/// Zeroes out the cache line for the address \a __line. This uses a
|
|
21
|
+
/// non-temporal store. Calling \c _mm_sfence() afterward might be needed
|
|
22
|
+
/// to enforce ordering.
|
|
21
23
|
///
|
|
22
|
-
/// \headerfile <
|
|
24
|
+
/// \headerfile <x86intrin.h>
|
|
23
25
|
///
|
|
24
|
-
/// This intrinsic corresponds to the
|
|
26
|
+
/// This intrinsic corresponds to the \c CLZERO instruction.
|
|
25
27
|
///
|
|
26
28
|
/// \param __line
|
|
27
|
-
///
|
|
29
|
+
/// An address within the cache line to zero out.
|
|
28
30
|
static __inline__ void __DEFAULT_FN_ATTRS
|
|
29
31
|
_mm_clzero (void * __line)
|
|
30
32
|
{
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/*===--------------- cmpccxaddintrin.h - CMPCCXADD intrinsics--------------===
|
|
2
|
+
*
|
|
3
|
+
*
|
|
4
|
+
* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
5
|
+
* See https://llvm.org/LICENSE.txt for license information.
|
|
6
|
+
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
7
|
+
*
|
|
8
|
+
*===-----------------------------------------------------------------------===
|
|
9
|
+
*/
|
|
10
|
+
#ifndef __X86GPRINTRIN_H
|
|
11
|
+
#error \
|
|
12
|
+
"Never use <cmpccxaddintrin.h> directly; include <x86gprintrin.h> instead."
|
|
13
|
+
#endif // __X86GPRINTRIN_H
|
|
14
|
+
|
|
15
|
+
#ifndef __CMPCCXADDINTRIN_H
|
|
16
|
+
#define __CMPCCXADDINTRIN_H
|
|
17
|
+
#ifdef __x86_64__
|
|
18
|
+
|
|
19
|
+
typedef enum {
|
|
20
|
+
_CMPCCX_O, /* Overflow. */
|
|
21
|
+
_CMPCCX_NO, /* No overflow. */
|
|
22
|
+
_CMPCCX_B, /* Below. */
|
|
23
|
+
_CMPCCX_NB, /* Not below. */
|
|
24
|
+
_CMPCCX_Z, /* Zero. */
|
|
25
|
+
_CMPCCX_NZ, /* Not zero. */
|
|
26
|
+
_CMPCCX_BE, /* Below or equal. */
|
|
27
|
+
_CMPCCX_NBE, /* Neither below nor equal. */
|
|
28
|
+
_CMPCCX_S, /* Sign. */
|
|
29
|
+
_CMPCCX_NS, /* No sign. */
|
|
30
|
+
_CMPCCX_P, /* Parity. */
|
|
31
|
+
_CMPCCX_NP, /* No parity. */
|
|
32
|
+
_CMPCCX_L, /* Less. */
|
|
33
|
+
_CMPCCX_NL, /* Not less. */
|
|
34
|
+
_CMPCCX_LE, /* Less or equal. */
|
|
35
|
+
_CMPCCX_NLE, /* Neither less nor equal. */
|
|
36
|
+
} _CMPCCX_ENUM;
|
|
37
|
+
|
|
38
|
+
/// Compares the value from the memory __A with the value of __B. If the
|
|
39
|
+
/// specified condition __D is met, then add the third operand __C to the
|
|
40
|
+
/// __A and write it into __A, else the value of __A is unchanged. The return
|
|
41
|
+
/// value is the original value of __A.
|
|
42
|
+
///
|
|
43
|
+
/// \headerfile <immintrin.h>
|
|
44
|
+
///
|
|
45
|
+
/// This intrinsic corresponds to the \c CMPCCXADD instructions.
|
|
46
|
+
///
|
|
47
|
+
/// \param __A
|
|
48
|
+
/// __A pointer specifying the memory address.
|
|
49
|
+
///
|
|
50
|
+
/// \param __B
|
|
51
|
+
/// A integer operand.
|
|
52
|
+
///
|
|
53
|
+
/// \param __C
|
|
54
|
+
/// A integer operand.
|
|
55
|
+
///
|
|
56
|
+
/// \param __D
|
|
57
|
+
/// The specified condition.
|
|
58
|
+
///
|
|
59
|
+
/// \returns a integer which is the original value of first operand.
|
|
60
|
+
|
|
61
|
+
#define _cmpccxadd_epi32(__A, __B, __C, __D) \
|
|
62
|
+
((int)(__builtin_ia32_cmpccxadd32((void *)(__A), (int)(__B), (int)(__C), \
|
|
63
|
+
(int)(__D))))
|
|
64
|
+
|
|
65
|
+
#define _cmpccxadd_epi64(__A, __B, __C, __D) \
|
|
66
|
+
((long long)(__builtin_ia32_cmpccxadd64((void *)(__A), (long long)(__B), \
|
|
67
|
+
(long long)(__C), (int)(__D))))
|
|
68
|
+
|
|
69
|
+
#endif // __x86_64__
|
|
70
|
+
#endif // __CMPCCXADDINTRIN_H
|
|
@@ -200,9 +200,18 @@
|
|
|
200
200
|
#define bit_AMXINT8 0x02000000
|
|
201
201
|
|
|
202
202
|
/* Features in %eax for leaf 7 sub-leaf 1 */
|
|
203
|
+
#define bit_RAOINT 0x00000008
|
|
203
204
|
#define bit_AVXVNNI 0x00000010
|
|
204
205
|
#define bit_AVX512BF16 0x00000020
|
|
206
|
+
#define bit_CMPCCXADD 0x00000080
|
|
207
|
+
#define bit_AMXFP16 0x00200000
|
|
205
208
|
#define bit_HRESET 0x00400000
|
|
209
|
+
#define bit_AVXIFMA 0x00800000
|
|
210
|
+
|
|
211
|
+
/* Features in %edx for leaf 7 sub-leaf 1 */
|
|
212
|
+
#define bit_AVXVNNIINT8 0x00000010
|
|
213
|
+
#define bit_AVXNECONVERT 0x00000020
|
|
214
|
+
#define bit_PREFETCHI 0x00004000
|
|
206
215
|
|
|
207
216
|
/* Features in %eax for leaf 13 sub-leaf 1 */
|
|
208
217
|
#define bit_XSAVEOPT 0x00000001
|
|
@@ -232,6 +241,7 @@
|
|
|
232
241
|
|
|
233
242
|
/* Features in %ebx for leaf 0x80000008 */
|
|
234
243
|
#define bit_CLZERO 0x00000001
|
|
244
|
+
#define bit_RDPRU 0x00000010
|
|
235
245
|
#define bit_WBNOINVD 0x00000200
|
|
236
246
|
|
|
237
247
|
|
|
@@ -260,7 +270,8 @@
|
|
|
260
270
|
: "0"(__leaf), "2"(__count))
|
|
261
271
|
#endif
|
|
262
272
|
|
|
263
|
-
static __inline int __get_cpuid_max (unsigned int __leaf,
|
|
273
|
+
static __inline unsigned int __get_cpuid_max (unsigned int __leaf,
|
|
274
|
+
unsigned int *__sig)
|
|
264
275
|
{
|
|
265
276
|
unsigned int __eax, __ebx, __ecx, __edx;
|
|
266
277
|
#if __i386__
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// CUDA headers define __noinline__ which interferes with libstdc++'s use of
|
|
2
|
+
// `__attribute((__noinline__))`. In order to avoid compilation error,
|
|
3
|
+
// temporarily unset __noinline__ when we include affected libstdc++ header.
|
|
4
|
+
|
|
5
|
+
#pragma push_macro("__noinline__")
|
|
6
|
+
#undef __noinline__
|
|
7
|
+
#include_next "bits/basic_string.h"
|
|
8
|
+
|
|
9
|
+
#pragma pop_macro("__noinline__")
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// CUDA headers define __noinline__ which interferes with libstdc++'s use of
|
|
2
|
+
// `__attribute((__noinline__))`. In order to avoid compilation error,
|
|
3
|
+
// temporarily unset __noinline__ when we include affected libstdc++ header.
|
|
4
|
+
|
|
5
|
+
#pragma push_macro("__noinline__")
|
|
6
|
+
#undef __noinline__
|
|
7
|
+
#include_next "bits/basic_string.tcc"
|
|
8
|
+
|
|
9
|
+
#pragma pop_macro("__noinline__")
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// CUDA headers define __noinline__ which interferes with libstdc++'s use of
|
|
2
|
+
// `__attribute((__noinline__))`. In order to avoid compilation error,
|
|
3
|
+
// temporarily unset __noinline__ when we include affected libstdc++ header.
|
|
4
|
+
|
|
5
|
+
#pragma push_macro("__noinline__")
|
|
6
|
+
#undef __noinline__
|
|
7
|
+
#include_next "bits/shared_ptr_base.h"
|
|
8
|
+
|
|
9
|
+
#pragma pop_macro("__noinline__")
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/*===---- cmath - CUDA wrapper for <cmath> ---------------------------------===
|
|
2
|
+
*
|
|
3
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
5
|
+
* in the Software without restriction, including without limitation the rights
|
|
6
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
* furnished to do so, subject to the following conditions:
|
|
9
|
+
*
|
|
10
|
+
* The above copyright notice and this permission notice shall be included in
|
|
11
|
+
* all copies or substantial portions of the Software.
|
|
12
|
+
*
|
|
13
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
19
|
+
* THE SOFTWARE.
|
|
20
|
+
*
|
|
21
|
+
*===-----------------------------------------------------------------------===
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
#ifndef __CLANG_CUDA_WRAPPERS_CMATH
|
|
25
|
+
#define __CLANG_CUDA_WRAPPERS_CMATH
|
|
26
|
+
|
|
27
|
+
#include_next <cmath>
|
|
28
|
+
|
|
29
|
+
#if defined(_LIBCPP_STD_VER)
|
|
30
|
+
|
|
31
|
+
// libc++ will need long double variants of these functions, but CUDA does not
|
|
32
|
+
// provide them. We'll provide their declarations, which should allow the
|
|
33
|
+
// headers to parse, but would not allow accidental use of them on a GPU.
|
|
34
|
+
|
|
35
|
+
__attribute__((device)) long double logb(long double);
|
|
36
|
+
__attribute__((device)) long double scalbn(long double, int);
|
|
37
|
+
|
|
38
|
+
namespace std {
|
|
39
|
+
|
|
40
|
+
// For __constexpr_fmin/fmax we only need device-side overloads before c++14
|
|
41
|
+
// where they are not constexpr.
|
|
42
|
+
#if _LIBCPP_STD_VER < 14
|
|
43
|
+
|
|
44
|
+
__attribute__((device))
|
|
45
|
+
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 float __constexpr_fmax(float __x, float __y) _NOEXCEPT {
|
|
46
|
+
return __builtin_fmaxf(__x, __y);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
__attribute__((device))
|
|
50
|
+
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 double __constexpr_fmax(double __x, double __y) _NOEXCEPT {
|
|
51
|
+
return __builtin_fmax(__x, __y);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
__attribute__((device))
|
|
55
|
+
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 long double
|
|
56
|
+
__constexpr_fmax(long double __x, long double __y) _NOEXCEPT {
|
|
57
|
+
return __builtin_fmaxl(__x, __y);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
template <class _Tp, class _Up, __enable_if_t<is_arithmetic<_Tp>::value && is_arithmetic<_Up>::value, int> = 0>
|
|
61
|
+
__attribute__((device))
|
|
62
|
+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename __promote<_Tp, _Up>::type
|
|
63
|
+
__constexpr_fmax(_Tp __x, _Up __y) _NOEXCEPT {
|
|
64
|
+
using __result_type = typename __promote<_Tp, _Up>::type;
|
|
65
|
+
return std::__constexpr_fmax(static_cast<__result_type>(__x), static_cast<__result_type>(__y));
|
|
66
|
+
}
|
|
67
|
+
#endif // _LIBCPP_STD_VER < 14
|
|
68
|
+
|
|
69
|
+
// For logb/scalbn templates we must always provide device overloads because
|
|
70
|
+
// libc++ implementation uses __builtin_XXX which gets translated into a libcall
|
|
71
|
+
// which we can't handle on GPU. We need to forward those to CUDA-provided
|
|
72
|
+
// implementations.
|
|
73
|
+
|
|
74
|
+
template <class _Tp>
|
|
75
|
+
__attribute__((device))
|
|
76
|
+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp __constexpr_logb(_Tp __x) {
|
|
77
|
+
return ::logb(__x);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
template <class _Tp>
|
|
81
|
+
__attribute__((device))
|
|
82
|
+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp __constexpr_scalbn(_Tp __x, int __exp) {
|
|
83
|
+
return ::scalbn(__x, __exp);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
} // namespace std//
|
|
87
|
+
|
|
88
|
+
#endif // _LIBCPP_STD_VER
|
|
89
|
+
|
|
90
|
+
#endif // include guard
|