diff options
| author | Taiki Endo <te316e89@gmail.com> | 2023-02-28 22:07:05 +0900 |
|---|---|---|
| committer | Amanieu d'Antras <amanieu@gmail.com> | 2023-03-01 18:53:20 +0100 |
| commit | a9681a2ca643d6d9b7a05156080efb5ef43d5e65 (patch) | |
| tree | 1297629c451fcc13c8912a7bd03680ff8ab72c6b /library/stdarch/crates/std_detect/tests/cpu-detection.rs | |
| parent | 56faab71f860c1063d9fd9098a5ea026876ee5ba (diff) | |
| download | rust-a9681a2ca643d6d9b7a05156080efb5ef43d5e65.tar.gz rust-a9681a2ca643d6d9b7a05156080efb5ef43d5e65.zip | |
Merge core_arch/tests/cpu-detection.rs to std_detect/tests/cpu-detection.rs
Except for the recently added `x86_deprecated` test, `core_arch/tests/cpu-detection.rs` is a subset of `std_detect/tests/cpu-detection.rs`.
Diffstat (limited to 'library/stdarch/crates/std_detect/tests/cpu-detection.rs')
| -rw-r--r-- | library/stdarch/crates/std_detect/tests/cpu-detection.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/library/stdarch/crates/std_detect/tests/cpu-detection.rs b/library/stdarch/crates/std_detect/tests/cpu-detection.rs index 4fa1b717c8e..ff0b0722e69 100644 --- a/library/stdarch/crates/std_detect/tests/cpu-detection.rs +++ b/library/stdarch/crates/std_detect/tests/cpu-detection.rs @@ -198,3 +198,15 @@ fn x86_all() { println!("xsaves: {:?}", is_x86_feature_detected!("xsaves")); println!("xsavec: {:?}", is_x86_feature_detected!("xsavec")); } + +#[test] +#[cfg(any(target_arch = "x86", target_arch = "x86_64"))] +#[allow(deprecated)] +fn x86_deprecated() { + println!("avx512gfni {:?}", is_x86_feature_detected!("avx512gfni")); + println!("avx512vaes {:?}", is_x86_feature_detected!("avx512vaes")); + println!( + "avx512vpclmulqdq {:?}", + is_x86_feature_detected!("avx512vpclmulqdq") + ); +} |
