Skip to content

Commit 012bb44

Browse files
committed
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
1 parent a628540 commit 012bb44

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

std/tests/run-time-detect.rs

+21
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
all(target_arch = "arm", any(target_os = "linux", target_os = "android")),
55
feature(stdarch_arm_feature_detection)
66
)]
7+
#![cfg_attr(
8+
all(target_arch = "aarch64", any(target_os = "linux", target_os = "android")),
9+
feature(stdarch_aarch64_feature_detection)
10+
)]
711
#![cfg_attr(
812
all(target_arch = "powerpc", target_os = "linux"),
913
feature(stdarch_powerpc_feature_detection)
@@ -36,42 +40,59 @@ fn aarch64_linux() {
3640
println!("bf16: {}", is_aarch64_feature_detected!("bf16"));
3741
println!("bti: {}", is_aarch64_feature_detected!("bti"));
3842
println!("crc: {}", is_aarch64_feature_detected!("crc"));
43+
println!("cssc: {}", is_aarch64_feature_detected!("cssc"));
3944
println!("dit: {}", is_aarch64_feature_detected!("dit"));
4045
println!("dotprod: {}", is_aarch64_feature_detected!("dotprod"));
4146
println!("dpb2: {}", is_aarch64_feature_detected!("dpb2"));
4247
println!("dpb: {}", is_aarch64_feature_detected!("dpb"));
48+
println!("ecv: {}", is_aarch64_feature_detected!("ecv"));
4349
println!("f32mm: {}", is_aarch64_feature_detected!("f32mm"));
4450
println!("f64mm: {}", is_aarch64_feature_detected!("f64mm"));
51+
println!("faminmax: {}", is_aarch64_feature_detected!("faminmax"));
4552
println!("fcma: {}", is_aarch64_feature_detected!("fcma"));
4653
println!("fhm: {}", is_aarch64_feature_detected!("fhm"));
54+
println!("flagm2: {}", is_aarch64_feature_detected!("flagm2"));
4755
println!("flagm: {}", is_aarch64_feature_detected!("flagm"));
4856
println!("fp16: {}", is_aarch64_feature_detected!("fp16"));
57+
println!("fp8: {}", is_aarch64_feature_detected!("fp8"));
58+
println!("fp8dot2: {}", is_aarch64_feature_detected!("fp8dot2"));
59+
println!("fp8dot4: {}", is_aarch64_feature_detected!("fp8dot4"));
60+
println!("fp8fma: {}", is_aarch64_feature_detected!("fp8fma"));
61+
println!("fpmr: {}", is_aarch64_feature_detected!("fpmr"));
4962
println!("frintts: {}", is_aarch64_feature_detected!("frintts"));
63+
println!("hbc: {}", is_aarch64_feature_detected!("hbc"));
5064
println!("i8mm: {}", is_aarch64_feature_detected!("i8mm"));
5165
println!("jsconv: {}", is_aarch64_feature_detected!("jsconv"));
66+
println!("lse128: {}", is_aarch64_feature_detected!("lse128"));
5267
println!("lse2: {}", is_aarch64_feature_detected!("lse2"));
5368
println!("lse: {}", is_aarch64_feature_detected!("lse"));
69+
println!("lut: {}", is_aarch64_feature_detected!("lut"));
70+
println!("mops: {}", is_aarch64_feature_detected!("mops"));
5471
println!("mte: {}", is_aarch64_feature_detected!("mte"));
5572
println!("neon: {}", is_aarch64_feature_detected!("neon"));
5673
println!("paca: {}", is_aarch64_feature_detected!("paca"));
5774
println!("pacg: {}", is_aarch64_feature_detected!("pacg"));
5875
println!("pmull: {}", is_aarch64_feature_detected!("pmull"));
5976
println!("rand: {}", is_aarch64_feature_detected!("rand"));
6077
println!("rcpc2: {}", is_aarch64_feature_detected!("rcpc2"));
78+
println!("rcpc3: {}", is_aarch64_feature_detected!("rcpc3"));
6179
println!("rcpc: {}", is_aarch64_feature_detected!("rcpc"));
6280
println!("rdm: {}", is_aarch64_feature_detected!("rdm"));
6381
println!("sb: {}", is_aarch64_feature_detected!("sb"));
6482
println!("sha2: {}", is_aarch64_feature_detected!("sha2"));
6583
println!("sha3: {}", is_aarch64_feature_detected!("sha3"));
6684
println!("sm4: {}", is_aarch64_feature_detected!("sm4"));
6785
println!("ssbs: {}", is_aarch64_feature_detected!("ssbs"));
86+
println!("sve-b16b16: {}", is_aarch64_feature_detected!("sve-b16b16"));
6887
println!("sve2-aes: {}", is_aarch64_feature_detected!("sve2-aes"));
6988
println!("sve2-bitperm: {}", is_aarch64_feature_detected!("sve2-bitperm"));
7089
println!("sve2-sha3: {}", is_aarch64_feature_detected!("sve2-sha3"));
7190
println!("sve2-sm4: {}", is_aarch64_feature_detected!("sve2-sm4"));
7291
println!("sve2: {}", is_aarch64_feature_detected!("sve2"));
92+
println!("sve2p1: {}", is_aarch64_feature_detected!("sve2p1"));
7393
println!("sve: {}", is_aarch64_feature_detected!("sve"));
7494
println!("tme: {}", is_aarch64_feature_detected!("tme"));
95+
println!("wfxt: {}", is_aarch64_feature_detected!("wfxt"));
7596
// tidy-alphabetical-end
7697
}
7798

0 commit comments

Comments
 (0)