about summary refs log tree commit diff
path: root/library/std/tests
diff options
context:
space:
mode:
authorKajetan Puchalski <kajetan.puchalski@arm.com>2024-06-14 18:05:09 +0100
committerKajetan Puchalski <kajetan.puchalski@arm.com>2024-08-27 11:11:47 +0100
commit4f847bd326e376de491b3e2a589392e66d61a2ed (patch)
tree1030d824275d52aeb7ca8ec42852b022480c6333 /library/std/tests
parentae9f5019f9ce6eb3ecd96206ade4a612efe20fd5 (diff)
rustc_target: Add various aarch64 features
Add various aarch64 features already supported by LLVM and Linux.

The features are marked as unstable using a newly added symbol, i.e.
aarch64_unstable_target_feature.

Additionally include some comment fixes to ensure consistency of
feature names with the Arm ARM and support for architecture version
target features up to v9.5a.

This commit adds compiler support for the following features:

- FEAT_CSSC
- FEAT_ECV
- FEAT_FAMINMAX
- FEAT_FLAGM2
- FEAT_FP8
- FEAT_FP8DOT2
- FEAT_FP8DOT4
- FEAT_FP8FMA
- FEAT_FPMR
- FEAT_HBC
- FEAT_LSE128
- FEAT_LSE2
- FEAT_LUT
- FEAT_MOPS
- FEAT_LRCPC3
- FEAT_SVE_B16B16
- FEAT_SVE2p1
- FEAT_WFxT
Diffstat (limited to 'library/std/tests')
-rw-r--r--library/std/tests/run-time-detect.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/library/std/tests/run-time-detect.rs b/library/std/tests/run-time-detect.rs
index 69486705656..779f0d1a9b8 100644
--- a/library/std/tests/run-time-detect.rs
+++ b/library/std/tests/run-time-detect.rs
@@ -5,6 +5,10 @@
     feature(stdarch_arm_feature_detection)
 )]
 #![cfg_attr(
+    all(target_arch = "aarch64", any(target_os = "linux", target_os = "android")),
+    feature(stdarch_aarch64_feature_detection)
+)]
+#![cfg_attr(
     all(target_arch = "powerpc", target_os = "linux"),
     feature(stdarch_powerpc_feature_detection)
 )]
@@ -36,21 +40,34 @@ fn aarch64_linux() {
     println!("bf16: {}", is_aarch64_feature_detected!("bf16"));
     println!("bti: {}", is_aarch64_feature_detected!("bti"));
     println!("crc: {}", is_aarch64_feature_detected!("crc"));
+    println!("cssc: {}", is_aarch64_feature_detected!("cssc"));
     println!("dit: {}", is_aarch64_feature_detected!("dit"));
     println!("dotprod: {}", is_aarch64_feature_detected!("dotprod"));
     println!("dpb2: {}", is_aarch64_feature_detected!("dpb2"));
     println!("dpb: {}", is_aarch64_feature_detected!("dpb"));
+    println!("ecv: {}", is_aarch64_feature_detected!("ecv"));
     println!("f32mm: {}", is_aarch64_feature_detected!("f32mm"));
     println!("f64mm: {}", is_aarch64_feature_detected!("f64mm"));
+    println!("faminmax: {}", is_aarch64_feature_detected!("faminmax"));
     println!("fcma: {}", is_aarch64_feature_detected!("fcma"));
     println!("fhm: {}", is_aarch64_feature_detected!("fhm"));
+    println!("flagm2: {}", is_aarch64_feature_detected!("flagm2"));
     println!("flagm: {}", is_aarch64_feature_detected!("flagm"));
     println!("fp16: {}", is_aarch64_feature_detected!("fp16"));
+    println!("fp8: {}", is_aarch64_feature_detected!("fp8"));
+    println!("fp8dot2: {}", is_aarch64_feature_detected!("fp8dot2"));
+    println!("fp8dot4: {}", is_aarch64_feature_detected!("fp8dot4"));
+    println!("fp8fma: {}", is_aarch64_feature_detected!("fp8fma"));
+    println!("fpmr: {}", is_aarch64_feature_detected!("fpmr"));
     println!("frintts: {}", is_aarch64_feature_detected!("frintts"));
+    println!("hbc: {}", is_aarch64_feature_detected!("hbc"));
     println!("i8mm: {}", is_aarch64_feature_detected!("i8mm"));
     println!("jsconv: {}", is_aarch64_feature_detected!("jsconv"));
+    println!("lse128: {}", is_aarch64_feature_detected!("lse128"));
     println!("lse2: {}", is_aarch64_feature_detected!("lse2"));
     println!("lse: {}", is_aarch64_feature_detected!("lse"));
+    println!("lut: {}", is_aarch64_feature_detected!("lut"));
+    println!("mops: {}", is_aarch64_feature_detected!("mops"));
     println!("mte: {}", is_aarch64_feature_detected!("mte"));
     println!("neon: {}", is_aarch64_feature_detected!("neon"));
     println!("paca: {}", is_aarch64_feature_detected!("paca"));
@@ -58,6 +75,7 @@ fn aarch64_linux() {
     println!("pmull: {}", is_aarch64_feature_detected!("pmull"));
     println!("rand: {}", is_aarch64_feature_detected!("rand"));
     println!("rcpc2: {}", is_aarch64_feature_detected!("rcpc2"));
+    println!("rcpc3: {}", is_aarch64_feature_detected!("rcpc3"));
     println!("rcpc: {}", is_aarch64_feature_detected!("rcpc"));
     println!("rdm: {}", is_aarch64_feature_detected!("rdm"));
     println!("sb: {}", is_aarch64_feature_detected!("sb"));
@@ -65,13 +83,16 @@ fn aarch64_linux() {
     println!("sha3: {}", is_aarch64_feature_detected!("sha3"));
     println!("sm4: {}", is_aarch64_feature_detected!("sm4"));
     println!("ssbs: {}", is_aarch64_feature_detected!("ssbs"));
+    println!("sve-b16b16: {}", is_aarch64_feature_detected!("sve-b16b16"));
     println!("sve2-aes: {}", is_aarch64_feature_detected!("sve2-aes"));
     println!("sve2-bitperm: {}", is_aarch64_feature_detected!("sve2-bitperm"));
     println!("sve2-sha3: {}", is_aarch64_feature_detected!("sve2-sha3"));
     println!("sve2-sm4: {}", is_aarch64_feature_detected!("sve2-sm4"));
     println!("sve2: {}", is_aarch64_feature_detected!("sve2"));
+    println!("sve2p1: {}", is_aarch64_feature_detected!("sve2p1"));
     println!("sve: {}", is_aarch64_feature_detected!("sve"));
     println!("tme: {}", is_aarch64_feature_detected!("tme"));
+    println!("wfxt: {}", is_aarch64_feature_detected!("wfxt"));
     // tidy-alphabetical-end
 }