From e706a13add588039d97fdea903a7e89f6d22b063 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Tue, 24 Jan 2023 04:02:25 +0900 Subject: [PATCH] std_detect: Add test for feature detection on aarch64 Windows --- .../crates/std_detect/tests/cpu-detection.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/library/stdarch/crates/std_detect/tests/cpu-detection.rs b/library/stdarch/crates/std_detect/tests/cpu-detection.rs index b5cabd5040f2..f1232e1145c0 100644 --- a/library/stdarch/crates/std_detect/tests/cpu-detection.rs +++ b/library/stdarch/crates/std_detect/tests/cpu-detection.rs @@ -83,6 +83,20 @@ fn aarch64_linux() { println!("sm4: {}", is_aarch64_feature_detected!("sm4")); } +#[test] +#[cfg(all(target_arch = "aarch64", target_os = "windows"))] +fn aarch64_windows() { + println!("asimd: {:?}", is_aarch64_feature_detected!("asimd")); + println!("crc: {:?}", is_aarch64_feature_detected!("crc")); + println!("lse: {:?}", is_aarch64_feature_detected!("lse")); + println!("dotprod: {:?}", is_aarch64_feature_detected!("dotprod")); + println!("jsconv: {:?}", is_aarch64_feature_detected!("jsconv")); + println!("rcpc: {:?}", is_aarch64_feature_detected!("rcpc")); + println!("aes: {:?}", is_aarch64_feature_detected!("aes")); + println!("pmull: {:?}", is_aarch64_feature_detected!("pmull")); + println!("sha2: {:?}", is_aarch64_feature_detected!("sha2")); +} + #[test] #[cfg(all(target_arch = "powerpc", target_os = "linux"))] fn powerpc_linux() {