about summary refs log tree commit diff
path: root/library/stdarch/crates/std_detect
AgeCommit message (Collapse)AuthorLines
2024-02-16Improve feature detect for combined aarch64 featuresAdam Gemmell-10/+12
LLVM's `ssbs` and `mte` target_features represent two Arm features. Linux's HWCAP also represents the same two features, so this is just a documentation update. LLVM's `ras` target_feature represents two Arm features - FEAT_RAS and FEAT_RASv1p1. There is no runtime detection for this, so this is a no-op in stdarch. LLVM's `aes` feature covers both `FEAT_AES` and `FEAT_PMULL`, but Linux exposes seperate feature bits. This patch makes the `aes` target_feature correctly shortcut runtime `pmull` detection and also makes the `aes` feature check for `pmull` at runtime to bring it in line with the target_feature behaviour. In practice I think this makes the two runtime features identical since the ID_AA64ISAR0_EL1 register does not allow for PMULL without AES.
2024-02-14Remove last mention of `stdsimd`daxpedda-8/+1
2024-01-16Add CPU detection for macOS/aarch64.Makoto Kato-0/+133
2024-01-05Fix std_detect not being an unstable crateAmanieu d'Antras-3/+17
More fallout from #1486
2024-01-04Fix std build failure on non-x86 architecturesAmanieu d'Antras-1/+7
This is more fallout from #1486
2024-01-02Fixes for use in the standard libraryAmanieu d'Antras-0/+1
2023-12-19Add `#![allow(internal_features)]` to a test to fix CIAmanieu d'Antras-0/+1
2023-11-30Stabilize Ratified RISC-V Target FeaturesGijs Burghoorn-64/+51
As shortly discussed on Zulip (https://rust-lang.zulipchat.com/#narrow/stream/250483-t-compiler.2Frisc-v/topic/Stabilization.20of.20RISC-V.20Target.20Features/near/394793704), this commit stabilizes the ratified RISC-V instruction bases and extensions. Specifically, this commit stabilizes the: * Atomic Instructions (A) on v2.0 * Compressed Instructions (C) on v2.0 * Integer Multiplication and Division (M) on v2.0 * Bit Manipulations (B) on v1.0 listed as `zba`, `zbc`, `zbs` * Scalar Cryptography (Zk) v1.0.1 listed as `zk`, `zkn`, `zknd`, `zkne`, `zknh`, `zkr`, `zks`, `zksed`, `zksh`, `zkt`, `zbkb`, `zbkc` `zkbx`
2023-10-31std_detect: Add support for LoongArchZHAI Xiang-2/+96
Co-authored-by: WANG Rui <wangrui@loongson.cn>
2023-10-31Derive `Default` for `Initializer` in std_detectEduardo Sánchez Muñoz-8/+3
2023-10-31Simplify a `cfg`Eduardo Sánchez Muñoz-2/+2
2023-10-31Do not deny `clippy::missing_inline_in_public_items` in std_detectEduardo Sánchez Muñoz-1/+0
2023-10-29Fix various compilation errorsAmanieu d'Antras-15/+20
2023-10-29Fix more missing/incorrect feature specificationsAmanieu d'Antras-2/+6
2023-10-29Cleanup last uses of the stdsimd featureAmanieu d'Antras-5/+6
2023-10-29Add tracking issues for feature detectionAmanieu d'Antras-77/+89
2023-10-11Remove unneeded transmutesEduardo Sánchez Muñoz-5/+1
(or replace them with safe versions)
2023-10-10Remove use of auv crate from testsbjorn3-48/+11
2023-10-10Remove the auxv dev dependency.bjorn3-1/+0
It hasn't been used since roughly 2018. The latest published version of auxv has a less common license and doesn't specify any license in it's Cargo.toml file.
2023-08-29Add `#![allow(internal_unstable)]`Amanieu d'Antras-2/+0
This is required to avoid build failures when using rustc features intended only for use by the standard library.
2023-06-21Support AArch32 Neon dotprod intrinsics.Jacob Bramley-6/+25
Note that the feature detection requires a recent Linux kernel (v6.2).
2023-04-24std_detect: Do not use libc::getauxval on 32-bit AndroidTaiki Endo-2/+4
libc crate currently doesn't provide it.
2023-04-21Remove useless drop (clippy drop_ref and drop_copy lint)Urgau-2/+5
2023-04-01std_detect: Remove support for arm crypto target featureTaiki Endo-24/+2
2023-04-01std_detect: Always avoid dlsym on *-android* targetsTaiki Endo-8/+18
2023-03-25std_detect: Unbreak auxv_from_fileLuca Barbato-7/+6
Discovered on powerpc64 where it crashes since it has more entries.
2023-03-19Allow `internal_features`Nilstrieb-0/+3
2023-03-12Implemented is_x86_feature_detected!(ermsb)Chase Wilson-0/+5
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-4/+25
2023-03-01std_detect: Support run-time detection of fp on aarch64 WindowsTaiki Endo-13/+12
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-18Fix typobwmf2-2/+2
2023-02-13std_detect: Remove extra cfgTaiki Endo-2/+2
This module is already `#[cfg(target_arch = "aarch64")]`.
2023-02-13std_detect: Only check features that are known to be available on armv8.0 ↵Taiki Endo-8/+28
cores if CPU is Exynos 9810
2023-02-13std_detect: Workaround Exynos 9810 bug on aarch64 AndroidTaiki Endo-0/+19
Samsung Exynos 9810 has a bug that big and little cores have different ISAs. And on older Android (pre-9), the kernel incorrectly reports that features available only on some cores are available on all cores. https://reviews.llvm.org/D114523
2023-02-11std_detect: Support run-time detection of FEAT_LSE2 on aarch64 BSD (#1379)Taiki Endo-10/+25
2023-02-11std_detect: Update platform support docs (#1380)Taiki Endo-4/+12
2023-02-03std_detect: Always avoid dlsym on *-linux-gnu* targets (#1375)Taiki Endo-3/+19
2023-01-26std_detect: Support run-time detection on aarch64 OpenBSDTaiki Endo-24/+91
2023-01-26std_detect: Split os/aarch64.rs' detect_features into reading and parsingTaiki Endo-63/+72
2023-01-26std_detect: Move aarch64 freebsd test to tests/cpu-detection.rsTaiki Endo-18/+20
2023-01-23std_detect: Add test for feature detection on aarch64 WindowsTaiki Endo-0/+14
2023-01-23std_detect: Support detecting lse/dotprod/jsconv/rcpc on aarch64 WindowsTaiki Endo-0/+20
2023-01-05Detect MOVBE (#1356)Caleb Zulawski-0/+7
2022-11-21Rename misleading features (#1355)Caleb Zulawski-23/+28
2022-11-09Detect CPU features with Linux methods on Android for non-Intel CPUs. (#1351)gendx-1/+1
Co-authored-by: Amanieu d'Antras <amanieu@gmail.com>
2022-11-09Fix line endings to use LF (#1350)Mateusz Mikuła-73/+73
2022-10-25Edition 2021, apply clippy::uninlined_format_args fix (#1339)Yuri Astrakhan-9/+9
2022-10-25Fix dupe word typos (#1344)Rageking8-1/+1