Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stabilise is_aarch64_feature_detected! under simd_aarch64 feature #90271

Merged
merged 2 commits into from
Feb 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions library/std/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
}

Expand Down
6 changes: 3 additions & 3 deletions library/std/tests/run-time-detect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be removed for aarch64 as well? You might need to put this behind cfg(bootstrap) so the stage0 compiler still accepts it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True - I mistakenly removed it when making pauth temporarily unstable again.

Copy link
Contributor Author

@adamgemmell adamgemmell Feb 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, it does need to remain there while pauth is unstable. I'll fix it up when rust-lang/stdarch#1259 is merged, and update the submodule at the same time.

),
feature(stdsimd)
)]
Expand Down Expand Up @@ -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"));
Expand Down