|
1 | 1 | #![allow(internal_features)] |
2 | 2 | #![feature(stdarch_internal)] |
3 | 3 | #![cfg_attr(target_arch = "arm", feature(stdarch_arm_feature_detection))] |
4 | | -#![cfg_attr(target_arch = "aarch64", feature(stdarch_aarch64_feature_detection))] |
| 4 | +#![cfg_attr( |
| 5 | + any(target_arch = "aarch64", target_arch = "arm64ec"), |
| 6 | + feature(stdarch_aarch64_feature_detection) |
| 7 | +)] |
5 | 8 | #![cfg_attr(target_arch = "powerpc", feature(stdarch_powerpc_feature_detection))] |
6 | 9 | #![cfg_attr(target_arch = "powerpc64", feature(stdarch_powerpc_feature_detection))] |
7 | 10 | #![cfg_attr(target_arch = "s390x", feature(stdarch_s390x_feature_detection))] |
8 | | -#![cfg_attr( |
9 | | - any(target_arch = "x86", target_arch = "x86_64"), |
10 | | - feature(sha512_sm_x86, x86_amx_intrinsics, xop_target_feature) |
11 | | -)] |
12 | 11 | #![allow(clippy::unwrap_used, clippy::use_debug, clippy::print_stdout)] |
13 | 12 |
|
14 | 13 | #[cfg_attr( |
@@ -247,87 +246,3 @@ fn powerpc64_linux_or_freebsd() { |
247 | 246 | fn s390x_linux() { |
248 | 247 | println!("vector: {}", is_s390x_feature_detected!("vector")); |
249 | 248 | } |
250 | | - |
251 | | -#[test] |
252 | | -#[cfg(any(target_arch = "x86", target_arch = "x86_64"))] |
253 | | -fn x86_all() { |
254 | | - println!("aes: {:?}", is_x86_feature_detected!("aes")); |
255 | | - println!("pcmulqdq: {:?}", is_x86_feature_detected!("pclmulqdq")); |
256 | | - println!("rdrand: {:?}", is_x86_feature_detected!("rdrand")); |
257 | | - println!("rdseed: {:?}", is_x86_feature_detected!("rdseed")); |
258 | | - println!("tsc: {:?}", is_x86_feature_detected!("tsc")); |
259 | | - println!("mmx: {:?}", is_x86_feature_detected!("mmx")); |
260 | | - println!("sse: {:?}", is_x86_feature_detected!("sse")); |
261 | | - println!("sse2: {:?}", is_x86_feature_detected!("sse2")); |
262 | | - println!("sse3: {:?}", is_x86_feature_detected!("sse3")); |
263 | | - println!("ssse3: {:?}", is_x86_feature_detected!("ssse3")); |
264 | | - println!("sse4.1: {:?}", is_x86_feature_detected!("sse4.1")); |
265 | | - println!("sse4.2: {:?}", is_x86_feature_detected!("sse4.2")); |
266 | | - println!("sse4a: {:?}", is_x86_feature_detected!("sse4a")); |
267 | | - println!("sha: {:?}", is_x86_feature_detected!("sha")); |
268 | | - println!("avx: {:?}", is_x86_feature_detected!("avx")); |
269 | | - println!("avx2: {:?}", is_x86_feature_detected!("avx2")); |
270 | | - println!("sha512: {:?}", is_x86_feature_detected!("sha512")); |
271 | | - println!("sm3: {:?}", is_x86_feature_detected!("sm3")); |
272 | | - println!("sm4: {:?}", is_x86_feature_detected!("sm4")); |
273 | | - println!("avx512f: {:?}", is_x86_feature_detected!("avx512f")); |
274 | | - println!("avx512cd: {:?}", is_x86_feature_detected!("avx512cd")); |
275 | | - println!("avx512er: {:?}", is_x86_feature_detected!("avx512er")); |
276 | | - println!("avx512pf: {:?}", is_x86_feature_detected!("avx512pf")); |
277 | | - println!("avx512bw: {:?}", is_x86_feature_detected!("avx512bw")); |
278 | | - println!("avx512dq: {:?}", is_x86_feature_detected!("avx512dq")); |
279 | | - println!("avx512vl: {:?}", is_x86_feature_detected!("avx512vl")); |
280 | | - println!("avx512ifma: {:?}", is_x86_feature_detected!("avx512ifma")); |
281 | | - println!("avx512vbmi: {:?}", is_x86_feature_detected!("avx512vbmi")); |
282 | | - println!( |
283 | | - "avx512vpopcntdq: {:?}", |
284 | | - is_x86_feature_detected!("avx512vpopcntdq") |
285 | | - ); |
286 | | - println!("avx512vbmi2 {:?}", is_x86_feature_detected!("avx512vbmi2")); |
287 | | - println!("gfni {:?}", is_x86_feature_detected!("gfni")); |
288 | | - println!("vaes {:?}", is_x86_feature_detected!("vaes")); |
289 | | - println!("vpclmulqdq {:?}", is_x86_feature_detected!("vpclmulqdq")); |
290 | | - println!("avx512vnni {:?}", is_x86_feature_detected!("avx512vnni")); |
291 | | - println!( |
292 | | - "avx512bitalg {:?}", |
293 | | - is_x86_feature_detected!("avx512bitalg") |
294 | | - ); |
295 | | - println!("avx512bf16 {:?}", is_x86_feature_detected!("avx512bf16")); |
296 | | - println!( |
297 | | - "avx512vp2intersect {:?}", |
298 | | - is_x86_feature_detected!("avx512vp2intersect") |
299 | | - ); |
300 | | - println!("avx512fp16 {:?}", is_x86_feature_detected!("avx512fp16")); |
301 | | - println!("f16c: {:?}", is_x86_feature_detected!("f16c")); |
302 | | - println!("fma: {:?}", is_x86_feature_detected!("fma")); |
303 | | - println!("bmi1: {:?}", is_x86_feature_detected!("bmi1")); |
304 | | - println!("bmi2: {:?}", is_x86_feature_detected!("bmi2")); |
305 | | - println!("abm: {:?}", is_x86_feature_detected!("abm")); |
306 | | - println!("lzcnt: {:?}", is_x86_feature_detected!("lzcnt")); |
307 | | - println!("tbm: {:?}", is_x86_feature_detected!("tbm")); |
308 | | - println!("movbe: {:?}", is_x86_feature_detected!("movbe")); |
309 | | - println!("popcnt: {:?}", is_x86_feature_detected!("popcnt")); |
310 | | - println!("fxsr: {:?}", is_x86_feature_detected!("fxsr")); |
311 | | - println!("xsave: {:?}", is_x86_feature_detected!("xsave")); |
312 | | - println!("xsaveopt: {:?}", is_x86_feature_detected!("xsaveopt")); |
313 | | - println!("xsaves: {:?}", is_x86_feature_detected!("xsaves")); |
314 | | - println!("xsavec: {:?}", is_x86_feature_detected!("xsavec")); |
315 | | - println!("amx-bf16: {:?}", is_x86_feature_detected!("amx-bf16")); |
316 | | - println!("amx-tile: {:?}", is_x86_feature_detected!("amx-tile")); |
317 | | - println!("amx-int8: {:?}", is_x86_feature_detected!("amx-int8")); |
318 | | - println!("amx-fp16: {:?}", is_x86_feature_detected!("amx-fp16")); |
319 | | - println!("amx-complex: {:?}", is_x86_feature_detected!("amx-complex")); |
320 | | - println!("xop: {:?}", is_x86_feature_detected!("xop")); |
321 | | -} |
322 | | - |
323 | | -#[test] |
324 | | -#[cfg(any(target_arch = "x86", target_arch = "x86_64"))] |
325 | | -#[allow(deprecated)] |
326 | | -fn x86_deprecated() { |
327 | | - println!("avx512gfni {:?}", is_x86_feature_detected!("avx512gfni")); |
328 | | - println!("avx512vaes {:?}", is_x86_feature_detected!("avx512vaes")); |
329 | | - println!( |
330 | | - "avx512vpclmulqdq {:?}", |
331 | | - is_x86_feature_detected!("avx512vpclmulqdq") |
332 | | - ); |
333 | | -} |
0 commit comments