about summary refs log tree commit diff
path: root/library/stdarch/crates/std_detect/tests
AgeCommit message (Collapse)AuthorLines
2025-07-22Move `std_detect` from `library/stdarch` to `library`Jakub Beránek-580/+0
2025-06-28loongarch: Add basic support for LoongArch32WANG Rui-3/+5
2025-06-11Fixes to compile with latest Rust nightlyAmanieu d'Antras-2/+0
2025-06-01RISC-V: Linux 6.15 `riscv_hwprobe` supportTsukasa OI-0/+4
This commit adds support for `riscv_hwprobe` on the Linux kernel 6.15. It adds feature detection of 8 extensions (4 of them are new in this). Existing RISC-V Extensions: 1. "Zicntr" 2. "Zihpm" 3. "Zalrsc" 4. "Zaamo" New RISC-V Extensions: 5. "Zicbom" 6. "Zfbfmin" 7. "Zvfbfmin" 8. "Zvfbfwma"
2025-05-20`avx512_target_feature` is now stable on nightlyFolkert de Vries-1/+0
2025-05-06Edit `macro_trailing_commas` to enable tests in all architecturessayantn-18/+47
2025-04-23Add power9 and power8 target-featuresLuca Barbato-0/+1
2025-04-20Remove `cupid` dependency and `env-override-no-avx` CI runsayantn-91/+0
2025-04-16RISC-V: Remove privileged extensions for nowTsukasa OI-5/+0
Until in-kernel feature detection is implemented, runtime detection of privileged extensions is temporally removed along with features themselves since none of such privileged features are stable. Co-Authored-By: Taiki Endo <te316e89@gmail.com> Co-Authored-By: Amanieu d'Antras <amanieu@gmail.com>
2025-04-16RISC-V: `riscv_hwprobe`-based feature detection on Linux / AndroidTsukasa OI-0/+43
This commit implements `riscv_hwprobe`-based feature detection as available on newer versions of the Linux kernel. It also queries whether the vector extensions are enabled using `prctl` but this is not supported on QEMU's userland emulator (as of version 9.2.3) and use the auxiliary vector as a fallback. Currently, all extensions discoverable from the Linux kernel version 6.14 and related extension groups (except "Supm", which reports the existence of `prctl`-based pointer masking control and too OS-dependent) are implemented. Co-Authored-By: Taiki Endo <te316e89@gmail.com>
2025-04-16RISC-V: Add RISC-V + Linux / Android testTsukasa OI-0/+65
This is ported from Taiki Endo's branch and sorted by the `@FEATURE` order as in `src/detect/arch/riscv.rs`. Co-Authored-By: Taiki Endo <te316e89@gmail.com>
2025-04-07Add feature detection for new amx variants and movrssayantn-1/+11
2025-02-13Add runtime feature detection for keylockersayantn-1/+4
2025-02-07Move all x86 std_detect tests to `x86-specific.rs` to reduce duplicationsayantn-91/+15
2025-01-16add `is_s390x_feature_detected`Folkert de Vries-3/+21
2024-10-27std_detect: Add pauth-lr aarch64 target featureKajetan Puchalski-0/+1
Add feature detection for aarch64 FEAT_PAuth_LR. There is currently no Linux cpuinfo support so the OS-specific lines are commented out.
2024-09-18std_detect: Add sme-b16b16 as an explicit aarch64 target featureKajetan Puchalski-0/+1
LLVM 20 split out what used to be called b16b16 and correspond to aarch64 FEAT_SVE_B16B16 into sve-b16b16 and sme-b16b16. Add sme-b16b16 as an explicit feature and update the detection accordingly.
2024-09-18std_detect: Use elf_aux_info on FreeBSDTaiki Endo-2/+5
2024-09-14Enable feature detection on all Apple/Darwin targetsMads Marquart-2/+2
Tested in the simulator and on the device I had lying around, a 1st generation iPad Mini (which isn't Aarch64, but shows that the `sysctlbyname` calls still work even there, even if they return false). `sysctlbyname` _should_ be safe to use without causing rejections from the app store, as its usage is documented in: https://developer.apple.com/documentation/kernel/1387446-sysctlbyname/determining_instruction_set_characteristics Also, the standard library will use these soon anyhow, so this shouldn't affect the situation: https://github.com/rust-lang/rust/pull/129019
2024-07-25std_detect: Add aarch64/linux/LLVM SME featuresKajetan Puchalski-0/+22
Add detection for SME features supported by LLVM and the Linux Kernel. Include commented-out hwcap fields for features supported by Linux but not by LLVM. This commit adds feature detection for the following features: - FEAT_SME - FEAT_SME_F16F16 - FEAT_SME_F64F64 - FEAT_SME_F8F16 - FEAT_SME_F8F32 - FEAT_SME_FA64 - FEAT_SME_I16I64 - FEAT_SME_LUTv2 - FEAT_SME2 - FEAT_SME2p1 - FEAT_SSVE_FP8DOT2 - FEAT_SSVE_FP8DOT4 - FEAT_SSVE_FP8FMA Linux features: https://github.com/torvalds/linux/blob/master/arch/arm64/include/uapi/asm/hwcap.h LLVM features: llvm-project/llvm/lib/Target/AArch64/AArch64.td
2024-07-25std_detect: Add aarch64/linux/LLVM featuresKajetan Puchalski-0/+19
Add detection for various aarch64 CPU features already supported by LLVM and Linux. This commit adds feature detection for the following features: - FEAT_CSSC - FEAT_ECV - FEAT_FAMINMAX - FEAT_FLAGM2 - FEAT_FP8 - FEAT_FP8DOT2 - FEAT_FP8DOT4 - FEAT_FP8FMA - FEAT_HBC - FEAT_LSE128 - FEAT_LUT - FEAT_MOPS - FEAT_LRCPC3 - FEAT_SVE_B16B16 - FEAT_SVE2p1 - FEAT_WFxT It also adds feature detection for FEAT_FPMR. It is somewhat of a special case because FPMR only exists as a feature in LLVM 18, it has been removed from the LLVM upstream. On that account the intention is for it to be detectable at runtime through stdarch but not have a corresponding compile-time Rust target feature. Linux features: https://github.com/torvalds/linux/blob/master/arch/arm64/include/uapi/asm/hwcap.h LLVM features: llvm-project/llvm/lib/Target/AArch64/AArch64.td
2024-07-06Implemented runtime detection of `xop` target-featuresayantn-2/+5
2024-07-06Added runtime detectionsayantn-20/+35
Cannot do a `cupid` test because they don't support `amx`.
2024-07-06Add detection for SHA512, SM3 and SM4sayantn-1/+11
Cannot cross-verify with `cupid` because they do not have these features yet.
2024-06-23Added runtime detectionsayantn-1/+12
Expanded the cache size to 93 (we will need this in near future) Fixed detection of VAES, GFNI and VPCLMULQDQ Could not test with `cupid` because they do not support these yet
2024-03-13arm64ecDaniel Paoliello-1/+7
2024-02-24feat: std_detect avx512fp16usamoi-0/+2
Signed-off-by: usamoi <usamoi@outlook.com>
2024-01-16Add CPU detection for macOS/aarch64.Makoto Kato-0/+32
2024-01-05Fix std_detect not being an unstable crateAmanieu d'Antras-0/+14
More fallout from #1486
2023-12-19Add `#![allow(internal_features)]` to a test to fix CIAmanieu d'Antras-0/+1
2023-10-31Simplify a `cfg`Eduardo Sánchez Muñoz-2/+2
2023-10-29Fix various compilation errorsAmanieu d'Antras-15/+18
2023-10-29Fix more missing/incorrect feature specificationsAmanieu d'Antras-2/+6
2023-10-29Cleanup last uses of the stdsimd featureAmanieu d'Antras-3/+2
2023-06-21Support AArch32 Neon dotprod intrinsics.Jacob Bramley-5/+14
Note that the feature detection requires a recent Linux kernel (v6.2).
2023-04-01std_detect: Remove support for arm crypto target featureTaiki Endo-1/+0
2023-03-12add f16c to x86 detection testKathryn Long-0/+2
2023-03-01std_detect: Support run-time detection of crc/aes/sha2/crypto on arm FreeBSDTaiki Endo-2/+5
2023-03-01std_detect: Support run-time detection of fp on aarch64 WindowsTaiki Endo-0/+1
According to google/cpu_features, IsProcessorFeaturePresent(PF_ARM_VFP_32_REGISTERS_AVAILABLE) returns whether fp is available. https://github.com/google/cpu_features/blob/a6bf4f9031ec601f905660b8cef82d7478b33d64/src/impl_aarch64_windows.c#L112-L113
2023-03-01Merge core_arch/tests/cpu-detection.rs to std_detect/tests/cpu-detection.rsTaiki Endo-0/+12
Except for the recently added `x86_deprecated` test, `core_arch/tests/cpu-detection.rs` is a subset of `std_detect/tests/cpu-detection.rs`.
2023-02-11std_detect: Support run-time detection of FEAT_LSE2 on aarch64 BSD (#1379)Taiki Endo-0/+1
2023-01-26std_detect: Support run-time detection on aarch64 OpenBSDTaiki Endo-2/+5
2023-01-26std_detect: Move aarch64 freebsd test to tests/cpu-detection.rsTaiki Endo-0/+20
2023-01-23std_detect: Add test for feature detection on aarch64 WindowsTaiki Endo-0/+14
2023-01-05Detect MOVBE (#1356)Caleb Zulawski-0/+3
2022-11-21Rename misleading features (#1355)Caleb Zulawski-12/+6
2022-10-25Edition 2021, apply clippy::uninlined_format_args fix (#1339)Yuri Astrakhan-1/+1
2022-02-10Split aarch64 `pauth` feature into `paca` and `pacg` (#1259)Adam Gemmell-1/+2
2021-05-28Update aarch64 linux feature detection (#1146)Adam Gemmell-3/+37
2021-01-04Avx512vbmi (#977)minybot-1/+1