From 102a0ffd37f3a49d5080fad5fffd7516b6134d5a Mon Sep 17 00:00:00 2001 From: Adam Gemmell Date: Thu, 10 Feb 2022 13:06:32 +0000 Subject: [PATCH 1/2] Move `is_aarch64_feature_detected!` to `simd_aarch64` feature and stabilise --- library/std/src/lib.rs | 7 ++++--- library/std/tests/run-time-detect.rs | 6 +++--- library/stdarch | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs index 4f44a3183a6..e22c94a0d3e 100644 --- a/library/std/src/lib.rs +++ b/library/std/src/lib.rs @@ -546,13 +546,14 @@ pub mod arch { #[doc(no_inline)] // Note (#82861): required for correct documentation pub use core::arch::*; + #[stable(feature = "simd_aarch64", since = "1.60.0")] + pub use std_detect::is_aarch64_feature_detected; #[stable(feature = "simd_x86", since = "1.27.0")] pub use std_detect::is_x86_feature_detected; #[unstable(feature = "stdsimd", issue = "48556")] pub use std_detect::{ - is_aarch64_feature_detected, is_arm_feature_detected, is_mips64_feature_detected, - is_mips_feature_detected, is_powerpc64_feature_detected, is_powerpc_feature_detected, - is_riscv_feature_detected, + is_arm_feature_detected, is_mips64_feature_detected, is_mips_feature_detected, + is_powerpc64_feature_detected, is_powerpc_feature_detected, is_riscv_feature_detected, }; } diff --git a/library/std/tests/run-time-detect.rs b/library/std/tests/run-time-detect.rs index 14a9e3acca4..54873f5549b 100644 --- a/library/std/tests/run-time-detect.rs +++ b/library/std/tests/run-time-detect.rs @@ -3,10 +3,9 @@ #![cfg_attr( any( all(target_arch = "arm", any(target_os = "linux", target_os = "android")), - all(target_arch = "aarch64", any(target_os = "linux", target_os = "android")), + all(bootstrap, target_arch = "aarch64", any(target_os = "linux", target_os = "android")), all(target_arch = "powerpc", target_os = "linux"), all(target_arch = "powerpc64", target_os = "linux"), - any(target_arch = "x86", target_arch = "x86_64"), ), feature(stdsimd) )] @@ -46,7 +45,8 @@ fn aarch64_linux() { println!("flagm: {}", is_aarch64_feature_detected!("flagm")); println!("ssbs: {}", is_aarch64_feature_detected!("ssbs")); println!("sb: {}", is_aarch64_feature_detected!("sb")); - println!("pauth: {}", is_aarch64_feature_detected!("pauth")); + println!("paca: {}", is_aarch64_feature_detected!("paca")); + println!("pacg: {}", is_aarch64_feature_detected!("pacg")); println!("dpb: {}", is_aarch64_feature_detected!("dpb")); println!("dpb2: {}", is_aarch64_feature_detected!("dpb2")); println!("sve2: {}", is_aarch64_feature_detected!("sve2")); diff --git a/library/stdarch b/library/stdarch index eaee02ffdf5..25571e81d78 160000 --- a/library/stdarch +++ b/library/stdarch @@ -1 +1 @@ -Subproject commit eaee02ffdf5d820729ccdf2f95fa08b08c7d24d2 +Subproject commit 25571e81d78cb3335f734e277d8427a3dcf95834 From 93b5bfbc48189c4bd7e2ad7a9681452c7f08d84b Mon Sep 17 00:00:00 2001 From: Adam Gemmell Date: Thu, 10 Feb 2022 15:14:45 +0000 Subject: [PATCH 2/2] Update stdarch submodule --- library/stdarch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/stdarch b/library/stdarch index 25571e81d78..863d31b8e13 160000 --- a/library/stdarch +++ b/library/stdarch @@ -1 +1 @@ -Subproject commit 25571e81d78cb3335f734e277d8427a3dcf95834 +Subproject commit 863d31b8e1314e15d124384e5eaa9ab21e12bd79