|
8 | 8 | all(target_arch = "aarch64", any(target_os = "linux", target_os = "android")),
|
9 | 9 | feature(stdarch_aarch64_feature_detection)
|
10 | 10 | )]
|
| 11 | +#![cfg_attr( |
| 12 | + all(target_arch = "s390x", target_os = "linux"), |
| 13 | + feature(stdarch_s390x_feature_detection) |
| 14 | +)] |
11 | 15 | #![cfg_attr(
|
12 | 16 | all(target_arch = "powerpc", target_os = "linux"),
|
13 | 17 | feature(stdarch_powerpc_feature_detection)
|
@@ -132,6 +136,32 @@ fn powerpc64_linux() {
|
132 | 136 | // tidy-alphabetical-end
|
133 | 137 | }
|
134 | 138 |
|
| 139 | +#[test] |
| 140 | +#[cfg(all(target_arch = "s390x", target_os = "linux"))] |
| 141 | +fn s390x_linux() { |
| 142 | + use std::arch::is_s390x_feature_detected; |
| 143 | + // tidy-alphabetical-start |
| 144 | + println!("deflate-conversion: {}", is_s390x_feature_detected!("deflate-conversion")); |
| 145 | + println!("enhanced-sort: {}", is_s390x_feature_detected!("enhanced-sort")); |
| 146 | + println!("guarded-storage: {}", is_s390x_feature_detected!("guarded-storage")); |
| 147 | + println!("high-word: {}", is_s390x_feature_detected!("high-word")); |
| 148 | + println!("nnp-assist: {}", is_s390x_feature_detected!("nnp-assist")); |
| 149 | + println!("transactional-execution: {}", is_s390x_feature_detected!("transactional-execution")); |
| 150 | + println!("vector-enhancements-1: {}", is_s390x_feature_detected!("vector-enhancements-1")); |
| 151 | + println!("vector-enhancements-2: {}", is_s390x_feature_detected!("vector-enhancements-2")); |
| 152 | + println!( |
| 153 | + "vector-packed-decimal-enhancement-2: {}", |
| 154 | + is_s390x_feature_detected!("vector-packed-decimal-enhancement-2") |
| 155 | + ); |
| 156 | + println!( |
| 157 | + "vector-packed-decimal-enhancement: {}", |
| 158 | + is_s390x_feature_detected!("vector-packed-decimal-enhancement") |
| 159 | + ); |
| 160 | + println!("vector-packed-decimal: {}", is_s390x_feature_detected!("vector-packed-decimal")); |
| 161 | + println!("vector: {}", is_s390x_feature_detected!("vector")); |
| 162 | + // tidy-alphabetical-end |
| 163 | +} |
| 164 | + |
135 | 165 | #[test]
|
136 | 166 | #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
|
137 | 167 | fn x86_all() {
|
|
0 commit comments