llvm-runtime-resources-darwin 0.0.0 → 23.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.
- package/LICENSE +201 -0
- package/NOTICE +33 -0
- package/include/__clang_cuda_builtin_vars.h +121 -0
- package/include/__clang_cuda_cmath.h +512 -0
- package/include/__clang_cuda_complex_builtins.h +236 -0
- package/include/__clang_cuda_device_functions.h +1572 -0
- package/include/__clang_cuda_intrinsics.h +975 -0
- package/include/__clang_cuda_libdevice_declares.h +468 -0
- package/include/__clang_cuda_math.h +353 -0
- package/include/__clang_cuda_math_forward_declares.h +289 -0
- package/include/__clang_cuda_runtime_wrapper.h +526 -0
- package/include/__clang_cuda_texture_intrinsics.h +1177 -0
- package/include/__clang_gpu_builtin_vars.h +71 -0
- package/include/__clang_gpu_device_functions.h +411 -0
- package/include/__clang_gpu_intrinsics.h +242 -0
- package/include/__clang_hip_cmath.h +848 -0
- package/include/__clang_hip_libdevice_declares.h +238 -0
- package/include/__clang_hip_math.h +1405 -0
- package/include/__clang_hip_runtime_wrapper.h +170 -0
- package/include/__clang_hip_stdlib.h +43 -0
- package/include/__clang_spirv_builtins.h +217 -0
- package/include/__clang_spirv_libdevice_declares.h +170 -0
- package/include/__clang_spirv_math.h +719 -0
- package/include/__float_float.h +176 -0
- package/include/__float_header_macro.h +12 -0
- package/include/__float_infinity_nan.h +20 -0
- package/include/__stdarg___gnuc_va_list.h +13 -0
- package/include/__stdarg___va_copy.h +12 -0
- package/include/__stdarg_header_macro.h +12 -0
- package/include/__stdarg_va_arg.h +22 -0
- package/include/__stdarg_va_copy.h +12 -0
- package/include/__stdarg_va_list.h +13 -0
- package/include/__stddef_header_macro.h +12 -0
- package/include/__stddef_max_align_t.h +27 -0
- package/include/__stddef_null.h +29 -0
- package/include/__stddef_nullptr_t.h +29 -0
- package/include/__stddef_offsetof.h +17 -0
- package/include/__stddef_ptrdiff_t.h +20 -0
- package/include/__stddef_rsize_t.h +20 -0
- package/include/__stddef_size_t.h +20 -0
- package/include/__stddef_unreachable.h +21 -0
- package/include/__stddef_wchar_t.h +28 -0
- package/include/__stddef_wint_t.h +15 -0
- package/include/__wmmintrin_aes.h +140 -0
- package/include/__wmmintrin_pclmul.h +48 -0
- package/include/adcintrin.h +165 -0
- package/include/adxintrin.h +107 -0
- package/include/altivec.h +19434 -0
- package/include/amdgpuintrin.h +164 -0
- package/include/amdhsa_abi.h +83 -0
- package/include/ammintrin.h +183 -0
- package/include/amo.h +220 -0
- package/include/amxavx512intrin.h +596 -0
- package/include/amxcomplexintrin.h +167 -0
- package/include/amxfp16intrin.h +93 -0
- package/include/amxfp8intrin.h +230 -0
- package/include/amxintrin.h +492 -0
- package/include/amxmovrsintrin.h +48 -0
- package/include/andes_vector.h +21 -0
- package/include/arm64_neon.h +21 -0
- package/include/arm64intr.h +45 -0
- package/include/arm_acle.h +866 -0
- package/include/arm_bf16.h +20 -0
- package/include/arm_cde.h +410 -0
- package/include/arm_cmse.h +217 -0
- package/include/arm_fp16.h +596 -0
- package/include/arm_mve.h +19187 -0
- package/include/arm_neon.h +74351 -0
- package/include/arm_neon_sve_bridge.h +182 -0
- package/include/arm_sme.h +3753 -0
- package/include/arm_sve.h +32698 -0
- package/include/arm_vector_types.h +432 -0
- package/include/armintr.h +31 -0
- package/include/avx10_2_512bf16intrin.h +568 -0
- package/include/avx10_2_512convertintrin.h +322 -0
- package/include/avx10_2_512minmaxintrin.h +127 -0
- package/include/avx10_2_512niintrin.h +314 -0
- package/include/avx10_2_512satcvtdsintrin.h +307 -0
- package/include/avx10_2_512satcvtintrin.h +301 -0
- package/include/avx10_2bf16intrin.h +1094 -0
- package/include/avx10_2convertintrin.h +3257 -0
- package/include/avx10_2copyintrin.h +66 -0
- package/include/avx10_2minmaxintrin.h +232 -0
- package/include/avx10_2niintrin.h +409 -0
- package/include/avx10_2satcvtdsintrin.h +376 -0
- package/include/avx10_2satcvtintrin.h +312 -0
- package/include/avx2intrin.h +5190 -0
- package/include/avx512bf16intrin.h +292 -0
- package/include/avx512bitalgintrin.h +75 -0
- package/include/avx512bmmintrin.h +174 -0
- package/include/avx512bmmvlintrin.h +245 -0
- package/include/avx512bwintrin.h +1885 -0
- package/include/avx512cdintrin.h +112 -0
- package/include/avx512dqintrin.h +1350 -0
- package/include/avx512fintrin.h +9351 -0
- package/include/avx512fp16intrin.h +3349 -0
- package/include/avx512ifmaintrin.h +68 -0
- package/include/avx512ifmavlintrin.h +138 -0
- package/include/avx512vbmi2intrin.h +364 -0
- package/include/avx512vbmiintrin.h +98 -0
- package/include/avx512vbmivlintrin.h +179 -0
- package/include/avx512vlbf16intrin.h +527 -0
- package/include/avx512vlbitalgintrin.h +135 -0
- package/include/avx512vlbwintrin.h +3052 -0
- package/include/avx512vlcdintrin.h +202 -0
- package/include/avx512vldqintrin.h +1156 -0
- package/include/avx512vlfp16intrin.h +2090 -0
- package/include/avx512vlintrin.h +8067 -0
- package/include/avx512vlvbmi2intrin.h +702 -0
- package/include/avx512vlvnniintrin.h +308 -0
- package/include/avx512vlvp2intersectintrin.h +123 -0
- package/include/avx512vnniintrin.h +113 -0
- package/include/avx512vp2intersectintrin.h +77 -0
- package/include/avx512vpopcntdqintrin.h +62 -0
- package/include/avx512vpopcntdqvlintrin.h +105 -0
- package/include/avxifmaintrin.h +193 -0
- package/include/avxintrin.h +5064 -0
- package/include/avxneconvertintrin.h +484 -0
- package/include/avxvnniint16intrin.h +451 -0
- package/include/avxvnniint8intrin.h +454 -0
- package/include/avxvnniintrin.h +238 -0
- package/include/bmi2intrin.h +253 -0
- package/include/bmiintrin.h +604 -0
- package/include/builtins.h +19 -0
- package/include/cet.h +66 -0
- package/include/cetintrin.h +115 -0
- package/include/cldemoteintrin.h +36 -0
- package/include/clflushoptintrin.h +36 -0
- package/include/clwbintrin.h +38 -0
- package/include/clzerointrin.h +38 -0
- package/include/cmpccxaddintrin.h +70 -0
- package/include/cpuid.h +451 -0
- package/include/crc32intrin.h +102 -0
- package/include/cuda_wrappers/__utility/declval.h +28 -0
- package/include/cuda_wrappers/algorithm +116 -0
- package/include/cuda_wrappers/bits/basic_string.h +9 -0
- package/include/cuda_wrappers/bits/basic_string.tcc +9 -0
- package/include/cuda_wrappers/bits/c++config.h +61 -0
- package/include/cuda_wrappers/bits/shared_ptr_base.h +9 -0
- package/include/cuda_wrappers/cmath +44 -0
- package/include/cuda_wrappers/complex +90 -0
- package/include/cuda_wrappers/new +108 -0
- package/include/emmintrin.h +4940 -0
- package/include/endian.h +91 -0
- package/include/enqcmdintrin.h +63 -0
- package/include/f16cintrin.h +176 -0
- package/include/float.h +48 -0
- package/include/fma4intrin.h +220 -0
- package/include/fmaintrin.h +826 -0
- package/include/fuzzer/FuzzedDataProvider.h +397 -0
- package/include/fxsrintrin.h +91 -0
- package/include/gfniintrin.h +238 -0
- package/include/gpuintrin.h +348 -0
- package/include/hexagon_circ_brev_intrinsics.h +298 -0
- package/include/hexagon_protos.h +8439 -0
- package/include/hexagon_types.h +2628 -0
- package/include/hlsl_alias_intrinsics_gen.inc +3869 -0
- package/include/hlsl_inline_intrinsics_gen.inc +546 -0
- package/include/hresetintrin.h +49 -0
- package/include/htmintrin.h +212 -0
- package/include/htmxlintrin.h +345 -0
- package/include/hvx_hexagon_protos.h +5421 -0
- package/include/ia32intrin.h +863 -0
- package/include/immintrin.h +597 -0
- package/include/intrin.h +501 -0
- package/include/intrin0.h +256 -0
- package/include/inttypes.h +101 -0
- package/include/invpcidintrin.h +23 -0
- package/include/iso646.h +31 -0
- package/include/keylockerintrin.h +518 -0
- package/include/larchintrin.h +262 -0
- package/include/lasxintrin.h +3999 -0
- package/include/limits.h +133 -0
- package/include/llvm_libc_wrappers/assert.h +32 -0
- package/include/llvm_libc_wrappers/ctype.h +29 -0
- package/include/llvm_libc_wrappers/inttypes.h +32 -0
- package/include/llvm_libc_wrappers/stdio.h +52 -0
- package/include/llvm_libc_wrappers/stdlib.h +32 -0
- package/include/llvm_libc_wrappers/string.h +29 -0
- package/include/llvm_libc_wrappers/time.h +28 -0
- package/include/llvm_offload_wrappers/__llvm_offload.h +31 -0
- package/include/llvm_offload_wrappers/__llvm_offload_device.h +10 -0
- package/include/llvm_offload_wrappers/__llvm_offload_host.h +15 -0
- package/include/lsxintrin.h +3752 -0
- package/include/lwpintrin.h +136 -0
- package/include/lzcntintrin.h +109 -0
- package/include/mm3dnow.h +22 -0
- package/include/mm_malloc.h +67 -0
- package/include/mmintrin.h +1541 -0
- package/include/module.modulemap +375 -0
- package/include/movdirintrin.h +49 -0
- package/include/movrs_avx10_2_512intrin.h +98 -0
- package/include/movrs_avx10_2intrin.h +174 -0
- package/include/movrsintrin.h +59 -0
- package/include/msa.h +573 -0
- package/include/mwaitxintrin.h +62 -0
- package/include/nmmintrin.h +20 -0
- package/include/nvptxintrin.h +208 -0
- package/include/opencl-c-base.h +765 -0
- package/include/opencl-c.h +18737 -0
- package/include/openmp_wrappers/__clang_openmp_device_functions.h +118 -0
- package/include/openmp_wrappers/cmath +132 -0
- package/include/openmp_wrappers/complex +61 -0
- package/include/openmp_wrappers/complex.h +41 -0
- package/include/openmp_wrappers/complex_cmath.h +393 -0
- package/include/openmp_wrappers/math.h +71 -0
- package/include/openmp_wrappers/new +48 -0
- package/include/pconfigintrin.h +40 -0
- package/include/pkuintrin.h +34 -0
- package/include/pmmintrin.h +302 -0
- package/include/popcntintrin.h +59 -0
- package/include/ppc_wrappers/bmi2intrin.h +134 -0
- package/include/ppc_wrappers/bmiintrin.h +165 -0
- package/include/ppc_wrappers/emmintrin.h +2269 -0
- package/include/ppc_wrappers/immintrin.h +27 -0
- package/include/ppc_wrappers/mm_malloc.h +45 -0
- package/include/ppc_wrappers/mmintrin.h +1453 -0
- package/include/ppc_wrappers/nmmintrin.h +26 -0
- package/include/ppc_wrappers/pmmintrin.h +145 -0
- package/include/ppc_wrappers/smmintrin.h +683 -0
- package/include/ppc_wrappers/tmmintrin.h +453 -0
- package/include/ppc_wrappers/x86gprintrin.h +17 -0
- package/include/ppc_wrappers/x86intrin.h +28 -0
- package/include/ppc_wrappers/xmmintrin.h +1827 -0
- package/include/prfchiintrin.h +61 -0
- package/include/prfchwintrin.h +57 -0
- package/include/profile/InstrProfData.inc +1063 -0
- package/include/profile/instr_prof_interface.h +88 -0
- package/include/ptrauth.h +485 -0
- package/include/ptwriteintrin.h +37 -0
- package/include/raointintrin.h +203 -0
- package/include/rdpruintrin.h +57 -0
- package/include/rdseedintrin.h +105 -0
- package/include/riscv_bitmanip.h +202 -0
- package/include/riscv_corev_alu.h +130 -0
- package/include/riscv_crypto.h +178 -0
- package/include/riscv_mips.h +36 -0
- package/include/riscv_nds.h +92 -0
- package/include/riscv_ntlh.h +28 -0
- package/include/riscv_packed_simd.h +644 -0
- package/include/riscv_vector.h +465 -0
- package/include/rtmintrin.h +45 -0
- package/include/s390intrin.h +25 -0
- package/include/sanitizer/allocator_interface.h +106 -0
- package/include/sanitizer/asan_interface.h +398 -0
- package/include/sanitizer/common_interface_defs.h +507 -0
- package/include/sanitizer/coverage_interface.h +36 -0
- package/include/sanitizer/dfsan_interface.h +220 -0
- package/include/sanitizer/hwasan_interface.h +109 -0
- package/include/sanitizer/linux_syscall_hooks.h +3112 -0
- package/include/sanitizer/lsan_interface.h +89 -0
- package/include/sanitizer/msan_interface.h +135 -0
- package/include/sanitizer/netbsd_syscall_hooks.h +5005 -0
- package/include/sanitizer/rtsan_interface.h +75 -0
- package/include/sanitizer/safestack_interface.h +50 -0
- package/include/sanitizer/scudo_interface.h +38 -0
- package/include/sanitizer/tsan_interface.h +316 -0
- package/include/sanitizer/tsan_interface_atomic.h +223 -0
- package/include/sanitizer/tysan_interface.h +36 -0
- package/include/sanitizer/ubsan_interface.h +64 -0
- package/include/serializeintrin.h +30 -0
- package/include/sgxintrin.h +60 -0
- package/include/sha512intrin.h +200 -0
- package/include/shaintrin.h +190 -0
- package/include/sifive_vector.h +192 -0
- package/include/sm3intrin.h +238 -0
- package/include/sm4evexintrin.h +32 -0
- package/include/sm4intrin.h +269 -0
- package/include/smmintrin.h +2352 -0
- package/include/spirvintrin.h +167 -0
- package/include/stdalign.h +24 -0
- package/include/stdarg.h +75 -0
- package/include/stdatomic.h +204 -0
- package/include/stdbool.h +39 -0
- package/include/stdckdint.h +42 -0
- package/include/stdcountof.h +15 -0
- package/include/stddef.h +139 -0
- package/include/stddefer.h +19 -0
- package/include/stdint.h +835 -0
- package/include/stdnoreturn.h +35 -0
- package/include/tbmintrin.h +128 -0
- package/include/tgmath.h +1368 -0
- package/include/tmmintrin.h +779 -0
- package/include/tsxldtrkintrin.h +56 -0
- package/include/uintrintrin.h +157 -0
- package/include/unwind.h +332 -0
- package/include/usermsrintrin.h +51 -0
- package/include/vadefs.h +51 -0
- package/include/vaesintrin.h +86 -0
- package/include/varargs.h +16 -0
- package/include/vecintrin.h +12868 -0
- package/include/velintrin.h +71 -0
- package/include/velintrin_approx.h +120 -0
- package/include/velintrin_gen.h +1257 -0
- package/include/vpclmulqdqintrin.h +30 -0
- package/include/waitpkgintrin.h +42 -0
- package/include/wasm_simd128.h +2160 -0
- package/include/wbnoinvdintrin.h +24 -0
- package/include/wmmintrin.h +23 -0
- package/include/x86gprintrin.h +49 -0
- package/include/x86intrin.h +35 -0
- package/include/xmmintrin.h +3176 -0
- package/include/xopintrin.h +780 -0
- package/include/xsavecintrin.h +84 -0
- package/include/xsaveintrin.h +63 -0
- package/include/xsaveoptintrin.h +34 -0
- package/include/xsavesintrin.h +44 -0
- package/include/xtestintrin.h +27 -0
- package/include/yvals_core.h +25 -0
- package/include/zos_wrappers/builtins.h +18 -0
- package/include/zos_wrappers/grp.h +19 -0
- package/include/zos_wrappers/locale.h +19 -0
- package/include/zos_wrappers/math.h +31 -0
- package/include/zos_wrappers/poll.h +19 -0
- package/include/zos_wrappers/stdlib.h +20 -0
- package/include/zos_wrappers/string.h +19 -0
- package/include/zos_wrappers/time.h +19 -0
- package/include/zos_wrappers/variant.h +19 -0
- package/index.js +5 -0
- package/lib/darwin/libclang_rt.asan_abi_ios.a +0 -0
- package/lib/darwin/libclang_rt.asan_abi_iossim.a +0 -0
- package/lib/darwin/libclang_rt.asan_abi_osx.a +0 -0
- package/lib/darwin/libclang_rt.asan_ios_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.asan_iossim_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.asan_osx_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.cc_kext.a +0 -0
- package/lib/darwin/libclang_rt.cc_kext_ios.a +0 -0
- package/lib/darwin/libclang_rt.fuzzer_interceptors_ios.a +0 -0
- package/lib/darwin/libclang_rt.fuzzer_interceptors_iossim.a +0 -0
- package/lib/darwin/libclang_rt.fuzzer_interceptors_osx.a +0 -0
- package/lib/darwin/libclang_rt.fuzzer_ios.a +0 -0
- package/lib/darwin/libclang_rt.fuzzer_iossim.a +0 -0
- package/lib/darwin/libclang_rt.fuzzer_no_main_ios.a +0 -0
- package/lib/darwin/libclang_rt.fuzzer_no_main_iossim.a +0 -0
- package/lib/darwin/libclang_rt.fuzzer_no_main_osx.a +0 -0
- package/lib/darwin/libclang_rt.fuzzer_osx.a +0 -0
- package/lib/darwin/libclang_rt.ios.a +0 -0
- package/lib/darwin/libclang_rt.iossim.a +0 -0
- package/lib/darwin/libclang_rt.lsan_ios_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.lsan_iossim_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.lsan_osx_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.osx.a +0 -0
- package/lib/darwin/libclang_rt.profile_ios.a +0 -0
- package/lib/darwin/libclang_rt.profile_iossim.a +0 -0
- package/lib/darwin/libclang_rt.profile_osx.a +0 -0
- package/lib/darwin/libclang_rt.rtsan_ios_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.rtsan_iossim_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.rtsan_osx_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.stats_client_ios.a +0 -0
- package/lib/darwin/libclang_rt.stats_client_iossim.a +0 -0
- package/lib/darwin/libclang_rt.stats_client_osx.a +0 -0
- package/lib/darwin/libclang_rt.stats_ios_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.stats_iossim_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.stats_osx_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.tsan_ios_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.tsan_iossim_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.tsan_osx_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.tysan_ios_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.tysan_iossim_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.tysan_osx_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.ubsan_ios_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.ubsan_iossim_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.ubsan_minimal_ios.a +0 -0
- package/lib/darwin/libclang_rt.ubsan_minimal_ios_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.ubsan_minimal_iossim.a +0 -0
- package/lib/darwin/libclang_rt.ubsan_minimal_iossim_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.ubsan_minimal_osx.a +0 -0
- package/lib/darwin/libclang_rt.ubsan_minimal_osx_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.ubsan_osx_dynamic.dylib +0 -0
- package/package.json +40 -1
- package/share/asan_ignorelist.txt +14 -0
- package/share/cfi_ignorelist.txt +17 -0
package/include/cpuid.h
ADDED
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
/*===---- cpuid.h - X86 cpu model detection --------------------------------===
|
|
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 __CPUID_H
|
|
11
|
+
#define __CPUID_H
|
|
12
|
+
|
|
13
|
+
#if !defined(__x86_64__) && !defined(__i386__)
|
|
14
|
+
#error this header is for x86 only
|
|
15
|
+
#endif
|
|
16
|
+
|
|
17
|
+
/* Responses identification request with %eax 0 */
|
|
18
|
+
/* AMD: "AuthenticAMD" */
|
|
19
|
+
#define signature_AMD_ebx 0x68747541
|
|
20
|
+
#define signature_AMD_edx 0x69746e65
|
|
21
|
+
#define signature_AMD_ecx 0x444d4163
|
|
22
|
+
/* CENTAUR: "CentaurHauls" */
|
|
23
|
+
#define signature_CENTAUR_ebx 0x746e6543
|
|
24
|
+
#define signature_CENTAUR_edx 0x48727561
|
|
25
|
+
#define signature_CENTAUR_ecx 0x736c7561
|
|
26
|
+
/* CYRIX: "CyrixInstead" */
|
|
27
|
+
#define signature_CYRIX_ebx 0x69727943
|
|
28
|
+
#define signature_CYRIX_edx 0x736e4978
|
|
29
|
+
#define signature_CYRIX_ecx 0x64616574
|
|
30
|
+
/* HYGON: "HygonGenuine" */
|
|
31
|
+
#define signature_HYGON_ebx 0x6f677948
|
|
32
|
+
#define signature_HYGON_edx 0x6e65476e
|
|
33
|
+
#define signature_HYGON_ecx 0x656e6975
|
|
34
|
+
/* INTEL: "GenuineIntel" */
|
|
35
|
+
#define signature_INTEL_ebx 0x756e6547
|
|
36
|
+
#define signature_INTEL_edx 0x49656e69
|
|
37
|
+
#define signature_INTEL_ecx 0x6c65746e
|
|
38
|
+
/* TM1: "TransmetaCPU" */
|
|
39
|
+
#define signature_TM1_ebx 0x6e617254
|
|
40
|
+
#define signature_TM1_edx 0x74656d73
|
|
41
|
+
#define signature_TM1_ecx 0x55504361
|
|
42
|
+
/* TM2: "GenuineTMx86" */
|
|
43
|
+
#define signature_TM2_ebx 0x756e6547
|
|
44
|
+
#define signature_TM2_edx 0x54656e69
|
|
45
|
+
#define signature_TM2_ecx 0x3638784d
|
|
46
|
+
/* NSC: "Geode by NSC" */
|
|
47
|
+
#define signature_NSC_ebx 0x646f6547
|
|
48
|
+
#define signature_NSC_edx 0x79622065
|
|
49
|
+
#define signature_NSC_ecx 0x43534e20
|
|
50
|
+
/* NEXGEN: "NexGenDriven" */
|
|
51
|
+
#define signature_NEXGEN_ebx 0x4778654e
|
|
52
|
+
#define signature_NEXGEN_edx 0x72446e65
|
|
53
|
+
#define signature_NEXGEN_ecx 0x6e657669
|
|
54
|
+
/* RISE: "RiseRiseRise" */
|
|
55
|
+
#define signature_RISE_ebx 0x65736952
|
|
56
|
+
#define signature_RISE_edx 0x65736952
|
|
57
|
+
#define signature_RISE_ecx 0x65736952
|
|
58
|
+
/* SIS: "SiS SiS SiS " */
|
|
59
|
+
#define signature_SIS_ebx 0x20536953
|
|
60
|
+
#define signature_SIS_edx 0x20536953
|
|
61
|
+
#define signature_SIS_ecx 0x20536953
|
|
62
|
+
/* UMC: "UMC UMC UMC " */
|
|
63
|
+
#define signature_UMC_ebx 0x20434d55
|
|
64
|
+
#define signature_UMC_edx 0x20434d55
|
|
65
|
+
#define signature_UMC_ecx 0x20434d55
|
|
66
|
+
/* VIA: "VIA VIA VIA " */
|
|
67
|
+
#define signature_VIA_ebx 0x20414956
|
|
68
|
+
#define signature_VIA_edx 0x20414956
|
|
69
|
+
#define signature_VIA_ecx 0x20414956
|
|
70
|
+
/* VORTEX: "Vortex86 SoC" */
|
|
71
|
+
#define signature_VORTEX_ebx 0x74726f56
|
|
72
|
+
#define signature_VORTEX_edx 0x36387865
|
|
73
|
+
#define signature_VORTEX_ecx 0x436f5320
|
|
74
|
+
|
|
75
|
+
/* Features in %ecx for leaf 1 */
|
|
76
|
+
#define bit_SSE3 0x00000001
|
|
77
|
+
#define bit_PCLMULQDQ 0x00000002
|
|
78
|
+
#define bit_PCLMUL bit_PCLMULQDQ /* for gcc compat */
|
|
79
|
+
#define bit_DTES64 0x00000004
|
|
80
|
+
#define bit_MONITOR 0x00000008
|
|
81
|
+
#define bit_DSCPL 0x00000010
|
|
82
|
+
#define bit_VMX 0x00000020
|
|
83
|
+
#define bit_SMX 0x00000040
|
|
84
|
+
#define bit_EIST 0x00000080
|
|
85
|
+
#define bit_TM2 0x00000100
|
|
86
|
+
#define bit_SSSE3 0x00000200
|
|
87
|
+
#define bit_CNXTID 0x00000400
|
|
88
|
+
#define bit_FMA 0x00001000
|
|
89
|
+
#define bit_CMPXCHG16B 0x00002000
|
|
90
|
+
#define bit_xTPR 0x00004000
|
|
91
|
+
#define bit_PDCM 0x00008000
|
|
92
|
+
#define bit_PCID 0x00020000
|
|
93
|
+
#define bit_DCA 0x00040000
|
|
94
|
+
#define bit_SSE41 0x00080000
|
|
95
|
+
#define bit_SSE4_1 bit_SSE41 /* for gcc compat */
|
|
96
|
+
#define bit_SSE42 0x00100000
|
|
97
|
+
#define bit_SSE4_2 bit_SSE42 /* for gcc compat */
|
|
98
|
+
#define bit_x2APIC 0x00200000
|
|
99
|
+
#define bit_MOVBE 0x00400000
|
|
100
|
+
#define bit_POPCNT 0x00800000
|
|
101
|
+
#define bit_TSCDeadline 0x01000000
|
|
102
|
+
#define bit_AESNI 0x02000000
|
|
103
|
+
#define bit_AES bit_AESNI /* for gcc compat */
|
|
104
|
+
#define bit_XSAVE 0x04000000
|
|
105
|
+
#define bit_OSXSAVE 0x08000000
|
|
106
|
+
#define bit_AVX 0x10000000
|
|
107
|
+
#define bit_F16C 0x20000000
|
|
108
|
+
#define bit_RDRND 0x40000000
|
|
109
|
+
|
|
110
|
+
/* Features in %edx for leaf 1 */
|
|
111
|
+
#define bit_FPU 0x00000001
|
|
112
|
+
#define bit_VME 0x00000002
|
|
113
|
+
#define bit_DE 0x00000004
|
|
114
|
+
#define bit_PSE 0x00000008
|
|
115
|
+
#define bit_TSC 0x00000010
|
|
116
|
+
#define bit_MSR 0x00000020
|
|
117
|
+
#define bit_PAE 0x00000040
|
|
118
|
+
#define bit_MCE 0x00000080
|
|
119
|
+
#define bit_CX8 0x00000100
|
|
120
|
+
#define bit_CMPXCHG8B bit_CX8 /* for gcc compat */
|
|
121
|
+
#define bit_APIC 0x00000200
|
|
122
|
+
#define bit_SEP 0x00000800
|
|
123
|
+
#define bit_MTRR 0x00001000
|
|
124
|
+
#define bit_PGE 0x00002000
|
|
125
|
+
#define bit_MCA 0x00004000
|
|
126
|
+
#define bit_CMOV 0x00008000
|
|
127
|
+
#define bit_PAT 0x00010000
|
|
128
|
+
#define bit_PSE36 0x00020000
|
|
129
|
+
#define bit_PSN 0x00040000
|
|
130
|
+
#define bit_CLFSH 0x00080000
|
|
131
|
+
#define bit_DS 0x00200000
|
|
132
|
+
#define bit_ACPI 0x00400000
|
|
133
|
+
#define bit_MMX 0x00800000
|
|
134
|
+
#define bit_FXSR 0x01000000
|
|
135
|
+
#define bit_FXSAVE bit_FXSR /* for gcc compat */
|
|
136
|
+
#define bit_SSE 0x02000000
|
|
137
|
+
#define bit_SSE2 0x04000000
|
|
138
|
+
#define bit_SS 0x08000000
|
|
139
|
+
#define bit_HTT 0x10000000
|
|
140
|
+
#define bit_TM 0x20000000
|
|
141
|
+
#define bit_PBE 0x80000000
|
|
142
|
+
|
|
143
|
+
/* Features in %ebx for leaf 7 sub-leaf 0 */
|
|
144
|
+
#define bit_FSGSBASE 0x00000001
|
|
145
|
+
#define bit_SGX 0x00000004
|
|
146
|
+
#define bit_BMI 0x00000008
|
|
147
|
+
#define bit_HLE 0x00000010
|
|
148
|
+
#define bit_AVX2 0x00000020
|
|
149
|
+
#define bit_SMEP 0x00000080
|
|
150
|
+
#define bit_BMI2 0x00000100
|
|
151
|
+
#define bit_ENH_MOVSB 0x00000200
|
|
152
|
+
#define bit_INVPCID 0x00000400
|
|
153
|
+
#define bit_RTM 0x00000800
|
|
154
|
+
#define bit_MPX 0x00004000
|
|
155
|
+
#define bit_AVX512F 0x00010000
|
|
156
|
+
#define bit_AVX512DQ 0x00020000
|
|
157
|
+
#define bit_RDSEED 0x00040000
|
|
158
|
+
#define bit_ADX 0x00080000
|
|
159
|
+
#define bit_AVX512IFMA 0x00200000
|
|
160
|
+
#define bit_CLFLUSHOPT 0x00800000
|
|
161
|
+
#define bit_CLWB 0x01000000
|
|
162
|
+
#define bit_AVX512PF 0x04000000
|
|
163
|
+
#define bit_AVX512ER 0x08000000
|
|
164
|
+
#define bit_AVX512CD 0x10000000
|
|
165
|
+
#define bit_SHA 0x20000000
|
|
166
|
+
#define bit_AVX512BW 0x40000000
|
|
167
|
+
#define bit_AVX512VL 0x80000000
|
|
168
|
+
|
|
169
|
+
/* Features in %ecx for leaf 7 sub-leaf 0 */
|
|
170
|
+
#define bit_PREFTCHWT1 0x00000001
|
|
171
|
+
#define bit_AVX512VBMI 0x00000002
|
|
172
|
+
#define bit_PKU 0x00000004
|
|
173
|
+
#define bit_OSPKE 0x00000010
|
|
174
|
+
#define bit_WAITPKG 0x00000020
|
|
175
|
+
#define bit_AVX512VBMI2 0x00000040
|
|
176
|
+
#define bit_SHSTK 0x00000080
|
|
177
|
+
#define bit_GFNI 0x00000100
|
|
178
|
+
#define bit_VAES 0x00000200
|
|
179
|
+
#define bit_VPCLMULQDQ 0x00000400
|
|
180
|
+
#define bit_AVX512VNNI 0x00000800
|
|
181
|
+
#define bit_AVX512BITALG 0x00001000
|
|
182
|
+
#define bit_AVX512VPOPCNTDQ 0x00004000
|
|
183
|
+
#define bit_RDPID 0x00400000
|
|
184
|
+
#define bit_CLDEMOTE 0x02000000
|
|
185
|
+
#define bit_MOVDIRI 0x08000000
|
|
186
|
+
#define bit_MOVDIR64B 0x10000000
|
|
187
|
+
#define bit_ENQCMD 0x20000000
|
|
188
|
+
|
|
189
|
+
/* Features in %edx for leaf 7 sub-leaf 0 */
|
|
190
|
+
#define bit_AVX5124VNNIW 0x00000004
|
|
191
|
+
#define bit_AVX5124FMAPS 0x00000008
|
|
192
|
+
#define bit_UINTR 0x00000020
|
|
193
|
+
#define bit_AVX512VP2INTERSECT 0x00000100
|
|
194
|
+
#define bit_SERIALIZE 0x00004000
|
|
195
|
+
#define bit_TSXLDTRK 0x00010000
|
|
196
|
+
#define bit_PCONFIG 0x00040000
|
|
197
|
+
#define bit_IBT 0x00100000
|
|
198
|
+
#define bit_AMXBF16 0x00400000
|
|
199
|
+
#define bit_AVX512FP16 0x00800000
|
|
200
|
+
#define bit_AMXTILE 0x01000000
|
|
201
|
+
#define bit_AMXINT8 0x02000000
|
|
202
|
+
|
|
203
|
+
/* Features in %eax for leaf 7 sub-leaf 1 */
|
|
204
|
+
#define bit_SHA512 0x00000001
|
|
205
|
+
#define bit_SM3 0x00000002
|
|
206
|
+
#define bit_SM4 0x00000004
|
|
207
|
+
#define bit_RAOINT 0x00000008
|
|
208
|
+
#define bit_AVXVNNI 0x00000010
|
|
209
|
+
#define bit_AVX512BF16 0x00000020
|
|
210
|
+
#define bit_CMPCCXADD 0x00000080
|
|
211
|
+
#define bit_AMXFP16 0x00200000
|
|
212
|
+
#define bit_HRESET 0x00400000
|
|
213
|
+
#define bit_AVXIFMA 0x00800000
|
|
214
|
+
|
|
215
|
+
/* Features in %edx for leaf 7 sub-leaf 1 */
|
|
216
|
+
#define bit_AVXVNNIINT8 0x00000010
|
|
217
|
+
#define bit_AVXNECONVERT 0x00000020
|
|
218
|
+
#define bit_AMXCOMPLEX 0x00000100
|
|
219
|
+
#define bit_AVXVNNIINT16 0x00000400
|
|
220
|
+
#define bit_PREFETCHI 0x00004000
|
|
221
|
+
#define bit_USERMSR 0x00008000
|
|
222
|
+
#define bit_AVX10 0x00080000
|
|
223
|
+
#define bit_APXF 0x00200000
|
|
224
|
+
|
|
225
|
+
/* Features in %eax for leaf 13 sub-leaf 1 */
|
|
226
|
+
#define bit_XSAVEOPT 0x00000001
|
|
227
|
+
#define bit_XSAVEC 0x00000002
|
|
228
|
+
#define bit_XSAVES 0x00000008
|
|
229
|
+
|
|
230
|
+
/* Features in %eax for leaf 0x14 sub-leaf 0 */
|
|
231
|
+
#define bit_PTWRITE 0x00000010
|
|
232
|
+
|
|
233
|
+
/* Features in %ecx for leaf 0x80000001 */
|
|
234
|
+
#define bit_LAHF_LM 0x00000001
|
|
235
|
+
#define bit_ABM 0x00000020
|
|
236
|
+
#define bit_LZCNT bit_ABM /* for gcc compat */
|
|
237
|
+
#define bit_SSE4a 0x00000040
|
|
238
|
+
#define bit_PRFCHW 0x00000100
|
|
239
|
+
#define bit_XOP 0x00000800
|
|
240
|
+
#define bit_LWP 0x00008000
|
|
241
|
+
#define bit_FMA4 0x00010000
|
|
242
|
+
#define bit_TBM 0x00200000
|
|
243
|
+
#define bit_MWAITX 0x20000000
|
|
244
|
+
|
|
245
|
+
/* Features in %edx for leaf 0x80000001 */
|
|
246
|
+
#define bit_MMXEXT 0x00400000
|
|
247
|
+
#define bit_LM 0x20000000
|
|
248
|
+
#define bit_3DNOWP 0x40000000
|
|
249
|
+
#define bit_3DNOW 0x80000000
|
|
250
|
+
|
|
251
|
+
/* Features in %ebx for leaf 0x80000008 */
|
|
252
|
+
#define bit_CLZERO 0x00000001
|
|
253
|
+
#define bit_RDPRU 0x00000010
|
|
254
|
+
#define bit_WBNOINVD 0x00000200
|
|
255
|
+
|
|
256
|
+
#ifdef __i386__
|
|
257
|
+
#define __cpuid(__leaf, __eax, __ebx, __ecx, __edx) \
|
|
258
|
+
__asm("cpuid" : "=a"(__eax), "=b" (__ebx), "=c"(__ecx), "=d"(__edx) \
|
|
259
|
+
: "0"(__leaf))
|
|
260
|
+
|
|
261
|
+
#define __cpuid_count(__leaf, __count, __eax, __ebx, __ecx, __edx) \
|
|
262
|
+
__asm("cpuid" : "=a"(__eax), "=b" (__ebx), "=c"(__ecx), "=d"(__edx) \
|
|
263
|
+
: "0"(__leaf), "2"(__count))
|
|
264
|
+
#else
|
|
265
|
+
/* x86-64 uses %rbx as the base register, so preserve it. */
|
|
266
|
+
#define __cpuid(__leaf, __eax, __ebx, __ecx, __edx) \
|
|
267
|
+
__asm(" xchg{q|} {%%|}rbx,%q1\n" \
|
|
268
|
+
" cpuid\n" \
|
|
269
|
+
" xchg{q|} {%%|}rbx,%q1" \
|
|
270
|
+
: "=a"(__eax), "=r"(__ebx), "=c"(__ecx), "=d"(__edx) \
|
|
271
|
+
: "0"(__leaf))
|
|
272
|
+
|
|
273
|
+
#define __cpuid_count(__leaf, __count, __eax, __ebx, __ecx, __edx) \
|
|
274
|
+
__asm(" xchg{q|} {%%|}rbx,%q1\n" \
|
|
275
|
+
" cpuid\n" \
|
|
276
|
+
" xchg{q|} {%%|}rbx,%q1" \
|
|
277
|
+
: "=a"(__eax), "=r"(__ebx), "=c"(__ecx), "=d"(__edx) \
|
|
278
|
+
: "0"(__leaf), "2"(__count))
|
|
279
|
+
#endif
|
|
280
|
+
|
|
281
|
+
/// Queries the processor to determine the highest supported \c CPUID leaf.
|
|
282
|
+
/// This intrinsic is only available on x86 and x64.
|
|
283
|
+
///
|
|
284
|
+
/// \headerfile <cpuid.h>
|
|
285
|
+
///
|
|
286
|
+
/// This intrinsic corresponds to the <c> CPUID </c> instruction.
|
|
287
|
+
///
|
|
288
|
+
/// \param __leaf
|
|
289
|
+
/// \a __leaf can be either 0x0 or 0x8000000. If \a __leaf == 0x0, the
|
|
290
|
+
/// highest supported value for basic \c CPUID information is returned.
|
|
291
|
+
/// If \a __leaf == 0x8000000, the highest supported value for extended
|
|
292
|
+
/// \c CPUID information is returned.
|
|
293
|
+
/// \param __sig
|
|
294
|
+
/// If the \a __sig pointer is non-null, the first four bytes of the
|
|
295
|
+
/// signature (as found in the \c EBX register) are returned in the
|
|
296
|
+
/// location pointed to by \a __sig.
|
|
297
|
+
/// \returns Returns 0 if \c CPUID is supported; otherwise returns the value
|
|
298
|
+
/// that \c CPUID returns in the \c EAX register.
|
|
299
|
+
static __inline unsigned int __get_cpuid_max (unsigned int __leaf,
|
|
300
|
+
unsigned int *__sig)
|
|
301
|
+
{
|
|
302
|
+
unsigned int __eax, __ebx, __ecx, __edx;
|
|
303
|
+
#ifdef __i386__
|
|
304
|
+
int __cpuid_supported;
|
|
305
|
+
|
|
306
|
+
__asm(" pushf{l|d}\n"
|
|
307
|
+
" pop{l|} {%%|}eax\n"
|
|
308
|
+
" mov{l|} {%%eax,%%ecx|ecx,eax}\n"
|
|
309
|
+
" xor{l|} {$0x00200000,%%eax|eax,0x00200000}\n"
|
|
310
|
+
" push{l|} {%%|}eax\n"
|
|
311
|
+
" popf{l|d}\n"
|
|
312
|
+
" pushf{l|d}\n"
|
|
313
|
+
" pop{l|} {%%|}eax\n"
|
|
314
|
+
" mov{l|} {$0,%0|%0,0}\n"
|
|
315
|
+
" cmp{l|} {%%eax,%%ecx|ecx,eax}\n"
|
|
316
|
+
" je 1f\n"
|
|
317
|
+
" mov{l|} {$1,%0|%0,1}\n"
|
|
318
|
+
"1:"
|
|
319
|
+
: "=r"(__cpuid_supported)
|
|
320
|
+
:
|
|
321
|
+
: "eax", "ecx");
|
|
322
|
+
if (!__cpuid_supported)
|
|
323
|
+
return 0;
|
|
324
|
+
#endif
|
|
325
|
+
|
|
326
|
+
__cpuid(__leaf, __eax, __ebx, __ecx, __edx);
|
|
327
|
+
if (__sig)
|
|
328
|
+
*__sig = __ebx;
|
|
329
|
+
return __eax;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/// For the requested \c CPUID leaf, queries the processor for information
|
|
333
|
+
/// about the CPU type and CPU features (such as processor vendor, supported
|
|
334
|
+
/// instruction sets, CPU capabilities, cache sizes, CPU model and family, and
|
|
335
|
+
/// other hardware details). This intrinsic is only available on x86 and x64.
|
|
336
|
+
///
|
|
337
|
+
/// \headerfile <cpuid.h>
|
|
338
|
+
///
|
|
339
|
+
/// This intrinsic corresponds to the <c> CPUID </c> instruction.
|
|
340
|
+
///
|
|
341
|
+
/// \param __leaf
|
|
342
|
+
/// An unsigned integer that identifies the level (also called "leaf") at
|
|
343
|
+
/// which the \c CPUID instruction will be executed.
|
|
344
|
+
/// \param __eax
|
|
345
|
+
/// A pointer to an integer that corresponds to the \c EAX register where
|
|
346
|
+
/// \c CPUID stores output results.
|
|
347
|
+
/// \param __ebx
|
|
348
|
+
/// A pointer to an integer that corresponds to the \c EBX register where
|
|
349
|
+
/// \c CPUID stores output results.
|
|
350
|
+
/// \param __ecx
|
|
351
|
+
/// A pointer to an integer that corresponds to the \c ECX register where
|
|
352
|
+
/// \c CPUID stores output results.
|
|
353
|
+
/// \param __edx
|
|
354
|
+
/// A pointer to an integer that corresponds to the \c EDX register where
|
|
355
|
+
/// \c CPUID stores output results.
|
|
356
|
+
/// \returns Returns 1 if the requested \c CPUID leaf is supported; otherwise
|
|
357
|
+
/// returns 0.
|
|
358
|
+
static __inline int __get_cpuid (unsigned int __leaf, unsigned int *__eax,
|
|
359
|
+
unsigned int *__ebx, unsigned int *__ecx,
|
|
360
|
+
unsigned int *__edx)
|
|
361
|
+
{
|
|
362
|
+
unsigned int __max_leaf = __get_cpuid_max(__leaf & 0x80000000, 0);
|
|
363
|
+
|
|
364
|
+
if (__max_leaf == 0 || __max_leaf < __leaf)
|
|
365
|
+
return 0;
|
|
366
|
+
|
|
367
|
+
__cpuid(__leaf, *__eax, *__ebx, *__ecx, *__edx);
|
|
368
|
+
return 1;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/// For the requested \c CPUID leaf and subleaf, queries the processor for
|
|
372
|
+
/// information about the CPU type and CPU features (such as processor vendor,
|
|
373
|
+
/// supported instruction sets, CPU capabilities, cache sizes, CPU model and
|
|
374
|
+
/// family, and other hardware details). This intrinsic is only available on
|
|
375
|
+
/// x86 and x64.
|
|
376
|
+
///
|
|
377
|
+
/// \headerfile <cpuid.h>
|
|
378
|
+
///
|
|
379
|
+
/// This intrinsic corresponds to the <c> CPUID </c> instruction.
|
|
380
|
+
///
|
|
381
|
+
/// \param __leaf
|
|
382
|
+
/// An unsigned integer that identifies the level (also called "leaf") at
|
|
383
|
+
/// which the \c CPUID instruction will be executed.
|
|
384
|
+
/// \param __subleaf
|
|
385
|
+
/// An unsigned integer that identifies the sublevel (also called
|
|
386
|
+
/// "subleaf") at which the \c CPUID instruction will be executed.
|
|
387
|
+
/// \param __eax
|
|
388
|
+
/// A pointer to an integer that corresponds to the \c EAX register where
|
|
389
|
+
/// \c CPUID stores output results.
|
|
390
|
+
/// \param __ebx
|
|
391
|
+
/// A pointer to an integer that corresponds to the \c EBX register where
|
|
392
|
+
/// \c CPUID stores output results.
|
|
393
|
+
/// \param __ecx
|
|
394
|
+
/// A pointer to an integer that corresponds to the \c ECX register where
|
|
395
|
+
/// \c CPUID stores output results.
|
|
396
|
+
/// \param __edx
|
|
397
|
+
/// A pointer to an integer that corresponds to the \c EDX register where
|
|
398
|
+
/// \c CPUID stores output results.
|
|
399
|
+
/// \returns Returns 1 if the requested \c CPUID leaf is supported; otherwise
|
|
400
|
+
/// returns 0.
|
|
401
|
+
static __inline int __get_cpuid_count (unsigned int __leaf,
|
|
402
|
+
unsigned int __subleaf,
|
|
403
|
+
unsigned int *__eax, unsigned int *__ebx,
|
|
404
|
+
unsigned int *__ecx, unsigned int *__edx)
|
|
405
|
+
{
|
|
406
|
+
unsigned int __max_leaf = __get_cpuid_max(__leaf & 0x80000000, 0);
|
|
407
|
+
|
|
408
|
+
if (__max_leaf == 0 || __max_leaf < __leaf)
|
|
409
|
+
return 0;
|
|
410
|
+
|
|
411
|
+
__cpuid_count(__leaf, __subleaf, *__eax, *__ebx, *__ecx, *__edx);
|
|
412
|
+
return 1;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
// In some configurations, __cpuidex is defined as a builtin (primarily
|
|
416
|
+
// -fms-extensions) which will conflict with the __cpuidex definition below.
|
|
417
|
+
#if !(__has_builtin(__cpuidex))
|
|
418
|
+
// In some cases, offloading will set the host as the aux triple and define the
|
|
419
|
+
// builtin. Given __has_builtin does not detect builtins on aux triples, we need
|
|
420
|
+
// to explicitly check for some offloading cases.
|
|
421
|
+
#if !defined(__NVPTX__) && !defined(__AMDGPU__) && !defined(__SPIRV__)
|
|
422
|
+
/// Executes the \c CPUID instruction with the specified leaf and subleaf
|
|
423
|
+
/// values, and returns the results from the CPU's registers. This intrinsic
|
|
424
|
+
/// is only available on x86 and x64.
|
|
425
|
+
///
|
|
426
|
+
/// \headerfile <cpuid.h>
|
|
427
|
+
///
|
|
428
|
+
/// This intrinsic corresponds to the <c> CPUID </c> instruction.
|
|
429
|
+
///
|
|
430
|
+
/// \param __cpu_info
|
|
431
|
+
/// An output array of four integers:
|
|
432
|
+
/// <ul>
|
|
433
|
+
/// <li>\a __cpuInfo[0] receives the value of the \c EAX register.</li>
|
|
434
|
+
/// <li>\a __cpuInfo[1] receives the value of the \c EBX register.</li>
|
|
435
|
+
/// <li>\a __cpuInfo[2] receives the value of the \c ECX register.</li>
|
|
436
|
+
/// <li>\a __cpuInfo[3] receives the value of the \c EDX register.</li>
|
|
437
|
+
/// </ul>
|
|
438
|
+
/// \param __leaf
|
|
439
|
+
/// An unsigned integer that identifies the level (also called the "leaf")
|
|
440
|
+
/// at which the \c CPUID instruction will be executed.
|
|
441
|
+
/// \param __subleaf
|
|
442
|
+
/// An unsigned integer that identifies the sublevel (also called the
|
|
443
|
+
/// "subleaf") at which the \c CPUID instruction will be executed.
|
|
444
|
+
static __inline void __cpuidex(int __cpu_info[4], int __leaf, int __subleaf) {
|
|
445
|
+
__cpuid_count(__leaf, __subleaf, __cpu_info[0], __cpu_info[1], __cpu_info[2],
|
|
446
|
+
__cpu_info[3]);
|
|
447
|
+
}
|
|
448
|
+
#endif
|
|
449
|
+
#endif
|
|
450
|
+
|
|
451
|
+
#endif /* __CPUID_H */
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/*===---- crc32intrin.h - SSE4.2 Accumulate CRC32 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 __CRC32INTRIN_H
|
|
11
|
+
#define __CRC32INTRIN_H
|
|
12
|
+
|
|
13
|
+
/// We only declare crc32 as a constexpr if we are compiling C++ code
|
|
14
|
+
#if defined(__cplusplus) && (__cplusplus >= 201103L)
|
|
15
|
+
#define __DEFAULT_FN_ATTRS \
|
|
16
|
+
__attribute__((__always_inline__, __nodebug__, __target__("crc32"))) constexpr
|
|
17
|
+
#else
|
|
18
|
+
#define __DEFAULT_FN_ATTRS \
|
|
19
|
+
__attribute__((__always_inline__, __nodebug__, __target__("crc32")))
|
|
20
|
+
#endif
|
|
21
|
+
|
|
22
|
+
/// Adds the unsigned integer operand to the CRC-32C checksum of the
|
|
23
|
+
/// unsigned char operand.
|
|
24
|
+
///
|
|
25
|
+
/// \headerfile <x86intrin.h>
|
|
26
|
+
///
|
|
27
|
+
/// This intrinsic corresponds to the <c> CRC32B </c> instruction.
|
|
28
|
+
///
|
|
29
|
+
/// \param __C
|
|
30
|
+
/// An unsigned integer operand to add to the CRC-32C checksum of operand
|
|
31
|
+
/// \a __D.
|
|
32
|
+
/// \param __D
|
|
33
|
+
/// An unsigned 8-bit integer operand used to compute the CRC-32C checksum.
|
|
34
|
+
/// \returns The result of adding operand \a __C to the CRC-32C checksum of
|
|
35
|
+
/// operand \a __D.
|
|
36
|
+
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
|
37
|
+
_mm_crc32_u8(unsigned int __C, unsigned char __D) {
|
|
38
|
+
return __builtin_ia32_crc32qi(__C, __D);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/// Adds the unsigned integer operand to the CRC-32C checksum of the
|
|
42
|
+
/// unsigned short operand.
|
|
43
|
+
///
|
|
44
|
+
/// \headerfile <x86intrin.h>
|
|
45
|
+
///
|
|
46
|
+
/// This intrinsic corresponds to the <c> CRC32W </c> instruction.
|
|
47
|
+
///
|
|
48
|
+
/// \param __C
|
|
49
|
+
/// An unsigned integer operand to add to the CRC-32C checksum of operand
|
|
50
|
+
/// \a __D.
|
|
51
|
+
/// \param __D
|
|
52
|
+
/// An unsigned 16-bit integer operand used to compute the CRC-32C checksum.
|
|
53
|
+
/// \returns The result of adding operand \a __C to the CRC-32C checksum of
|
|
54
|
+
/// operand \a __D.
|
|
55
|
+
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
|
56
|
+
_mm_crc32_u16(unsigned int __C, unsigned short __D) {
|
|
57
|
+
return __builtin_ia32_crc32hi(__C, __D);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/// Adds the first unsigned integer operand to the CRC-32C checksum of
|
|
61
|
+
/// the second unsigned integer operand.
|
|
62
|
+
///
|
|
63
|
+
/// \headerfile <x86intrin.h>
|
|
64
|
+
///
|
|
65
|
+
/// This intrinsic corresponds to the <c> CRC32L </c> instruction.
|
|
66
|
+
///
|
|
67
|
+
/// \param __C
|
|
68
|
+
/// An unsigned integer operand to add to the CRC-32C checksum of operand
|
|
69
|
+
/// \a __D.
|
|
70
|
+
/// \param __D
|
|
71
|
+
/// An unsigned 32-bit integer operand used to compute the CRC-32C checksum.
|
|
72
|
+
/// \returns The result of adding operand \a __C to the CRC-32C checksum of
|
|
73
|
+
/// operand \a __D.
|
|
74
|
+
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
|
75
|
+
_mm_crc32_u32(unsigned int __C, unsigned int __D) {
|
|
76
|
+
return __builtin_ia32_crc32si(__C, __D);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
#ifdef __x86_64__
|
|
80
|
+
/// Adds the unsigned integer operand to the CRC-32C checksum of the
|
|
81
|
+
/// unsigned 64-bit integer operand.
|
|
82
|
+
///
|
|
83
|
+
/// \headerfile <x86intrin.h>
|
|
84
|
+
///
|
|
85
|
+
/// This intrinsic corresponds to the <c> CRC32Q </c> instruction.
|
|
86
|
+
///
|
|
87
|
+
/// \param __C
|
|
88
|
+
/// An unsigned integer operand to add to the CRC-32C checksum of operand
|
|
89
|
+
/// \a __D.
|
|
90
|
+
/// \param __D
|
|
91
|
+
/// An unsigned 64-bit integer operand used to compute the CRC-32C checksum.
|
|
92
|
+
/// \returns The result of adding operand \a __C to the CRC-32C checksum of
|
|
93
|
+
/// operand \a __D.
|
|
94
|
+
static __inline__ unsigned long long __DEFAULT_FN_ATTRS
|
|
95
|
+
_mm_crc32_u64(unsigned long long __C, unsigned long long __D) {
|
|
96
|
+
return __builtin_ia32_crc32di(__C, __D);
|
|
97
|
+
}
|
|
98
|
+
#endif /* __x86_64__ */
|
|
99
|
+
|
|
100
|
+
#undef __DEFAULT_FN_ATTRS
|
|
101
|
+
|
|
102
|
+
#endif /* __CRC32INTRIN_H */
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#ifndef __CUDA_WRAPPERS_UTILITY_DECLVAL_H__
|
|
2
|
+
#define __CUDA_WRAPPERS_UTILITY_DECLVAL_H__
|
|
3
|
+
|
|
4
|
+
#include_next <__utility/declval.h>
|
|
5
|
+
|
|
6
|
+
// The stuff below is the exact copy of the <__utility/declval.h>,
|
|
7
|
+
// but with __device__ attribute applied to the functions, so it works on a GPU.
|
|
8
|
+
|
|
9
|
+
_LIBCPP_BEGIN_NAMESPACE_STD
|
|
10
|
+
|
|
11
|
+
// Suppress deprecation notice for volatile-qualified return type resulting
|
|
12
|
+
// from volatile-qualified types _Tp.
|
|
13
|
+
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
|
|
14
|
+
template <class _Tp> __attribute__((device)) _Tp &&__declval(int);
|
|
15
|
+
template <class _Tp> __attribute__((device)) _Tp __declval(long);
|
|
16
|
+
_LIBCPP_SUPPRESS_DEPRECATED_POP
|
|
17
|
+
|
|
18
|
+
template <class _Tp>
|
|
19
|
+
__attribute__((device)) _LIBCPP_HIDE_FROM_ABI decltype(std::__declval<_Tp>(0))
|
|
20
|
+
declval() _NOEXCEPT {
|
|
21
|
+
static_assert(!__is_same(_Tp, _Tp),
|
|
22
|
+
"std::declval can only be used in an unevaluated context. "
|
|
23
|
+
"It's likely that your current usage is trying to extract a "
|
|
24
|
+
"value from the function.");
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
_LIBCPP_END_NAMESPACE_STD
|
|
28
|
+
#endif // __CUDA_WRAPPERS_UTILITY_DECLVAL_H__
|