diff options
Diffstat (limited to 'library/stdarch/crates/std_detect/tests/cpu-detection.rs')
| -rw-r--r-- | library/stdarch/crates/std_detect/tests/cpu-detection.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/library/stdarch/crates/std_detect/tests/cpu-detection.rs b/library/stdarch/crates/std_detect/tests/cpu-detection.rs index 6ed612a5960..69b7075bb10 100644 --- a/library/stdarch/crates/std_detect/tests/cpu-detection.rs +++ b/library/stdarch/crates/std_detect/tests/cpu-detection.rs @@ -4,6 +4,7 @@ #![cfg_attr(target_arch = "aarch64", feature(stdarch_aarch64_feature_detection))] #![cfg_attr(target_arch = "powerpc", feature(stdarch_powerpc_feature_detection))] #![cfg_attr(target_arch = "powerpc64", feature(stdarch_powerpc_feature_detection))] +#![cfg_attr(target_arch = "s390x", feature(stdarch_s390x_feature_detection))] #![cfg_attr( any(target_arch = "x86", target_arch = "x86_64"), feature(sha512_sm_x86, x86_amx_intrinsics, xop_target_feature) @@ -18,7 +19,8 @@ target_arch = "x86", target_arch = "x86_64", target_arch = "powerpc", - target_arch = "powerpc64" + target_arch = "powerpc64", + target_arch = "s390x", ), macro_use )] @@ -241,6 +243,12 @@ fn powerpc64_linux_or_freebsd() { } #[test] +#[cfg(all(target_arch = "s390x", target_os = "linux",))] +fn s390x_linux() { + println!("vector: {}", is_s390x_feature_detected!("vector")); +} + +#[test] #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] fn x86_all() { println!("aes: {:?}", is_x86_feature_detected!("aes")); |
