about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-05-20 13:07:35 +0000
committerbors <bors@rust-lang.org>2021-05-20 13:07:35 +0000
commit8a57820bca64a252489790a57cb5ea23db6f9198 (patch)
treec4470c2041d794ab0ea73165363e4e50dc887680 /compiler/rustc_codegen_ssa/src
parent35bab923c8e5a1e8291735e7630539002eb80d7b (diff)
parentd3737a66074945f65858086609cd51377c14559b (diff)
downloadrust-8a57820bca64a252489790a57cb5ea23db6f9198.tar.gz
rust-8a57820bca64a252489790a57cb5ea23db6f9198.zip
Auto merge of #84665 - adamgemmell:aarch64-features, r=Amanieu
Update list of allowed aarch64 features

I recently added these features to std_detect for aarch64 linux, pending [review](https://github.com/rust-lang/stdarch/pull/1146).

I have commented any features not supported by LLVM 9, the current minimum version for Rust. Some (PAuth at least) were renamed between 9 & 12 and I've left them disabled. TME, however, is not in LLVM 9 but I've left it enabled.

See https://github.com/rust-lang/stdarch/issues/993
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
-rw-r--r--compiler/rustc_codegen_ssa/src/target_features.rs79
1 files changed, 77 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_ssa/src/target_features.rs b/compiler/rustc_codegen_ssa/src/target_features.rs
index 4e987908b4e..98d550d732f 100644
--- a/compiler/rustc_codegen_ssa/src/target_features.rs
+++ b/compiler/rustc_codegen_ssa/src/target_features.rs
@@ -17,6 +17,8 @@ const ARM_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
     ("neon", Some(sym::arm_target_feature)),
     ("crc", Some(sym::arm_target_feature)),
     ("crypto", Some(sym::arm_target_feature)),
+    ("aes", Some(sym::arm_target_feature)),
+    ("sha2", Some(sym::arm_target_feature)),
     ("v5te", Some(sym::arm_target_feature)),
     ("v6", Some(sym::arm_target_feature)),
     ("v6k", Some(sym::arm_target_feature)),
@@ -33,22 +35,95 @@ const ARM_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
     ("thumb-mode", Some(sym::arm_target_feature)),
 ];
 
+// Commented features are not available in LLVM 10.0, or have since been renamed
 const AARCH64_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
-    ("fp", Some(sym::aarch64_target_feature)),
+    // FEAT_AdvSimd
     ("neon", Some(sym::aarch64_target_feature)),
+    // FEAT_FP
+    ("fp", Some(sym::aarch64_target_feature)),
+    // FEAT_FP16
+    ("fp16", Some(sym::aarch64_target_feature)),
+    // FEAT_SVE
     ("sve", Some(sym::aarch64_target_feature)),
+    // FEAT_CRC
     ("crc", Some(sym::aarch64_target_feature)),
+    // Cryptographic extension
     ("crypto", Some(sym::aarch64_target_feature)),
+    // FEAT_RAS
     ("ras", Some(sym::aarch64_target_feature)),
+    // FEAT_LSE
     ("lse", Some(sym::aarch64_target_feature)),
+    // FEAT_RDM
     ("rdm", Some(sym::aarch64_target_feature)),
-    ("fp16", Some(sym::aarch64_target_feature)),
+    // FEAT_RCPC
     ("rcpc", Some(sym::aarch64_target_feature)),
+    // FEAT_RCPC2
+    ("rcpc2", Some(sym::aarch64_target_feature)),
+    // FEAT_DotProd
     ("dotprod", Some(sym::aarch64_target_feature)),
+    // FEAT_TME
     ("tme", Some(sym::aarch64_target_feature)),
+    // FEAT_FHM
+    ("fhm", Some(sym::aarch64_target_feature)),
+    // FEAT_DIT
+    ("dit", Some(sym::aarch64_target_feature)),
+    // FEAT_FLAGM
+    // ("flagm", Some(sym::aarch64_target_feature)),
+    // FEAT_SSBS
+    ("ssbs", Some(sym::aarch64_target_feature)),
+    // FEAT_SB
+    ("sb", Some(sym::aarch64_target_feature)),
+    // FEAT_PAUTH
+    // ("pauth", Some(sym::aarch64_target_feature)),
+    // FEAT_DPB
+    ("dpb", Some(sym::aarch64_target_feature)),
+    // FEAT_DPB2
+    ("dpb2", Some(sym::aarch64_target_feature)),
+    // FEAT_SVE2
+    ("sve2", Some(sym::aarch64_target_feature)),
+    // FEAT_SVE2_AES
+    ("sve2-aes", Some(sym::aarch64_target_feature)),
+    // FEAT_SVE2_SM4
+    ("sve2-sm4", Some(sym::aarch64_target_feature)),
+    // FEAT_SVE2_SHA3
+    ("sve2-sha3", Some(sym::aarch64_target_feature)),
+    // FEAT_SVE2_BitPerm
+    ("sve2-bitperm", Some(sym::aarch64_target_feature)),
+    // FEAT_FRINTTS
+    ("frintts", Some(sym::aarch64_target_feature)),
+    // FEAT_I8MM
+    // ("i8mm", Some(sym::aarch64_target_feature)),
+    // FEAT_F32MM
+    // ("f32mm", Some(sym::aarch64_target_feature)),
+    // FEAT_F64MM
+    // ("f64mm", Some(sym::aarch64_target_feature)),
+    // FEAT_BF16
+    // ("bf16", Some(sym::aarch64_target_feature)),
+    // FEAT_RAND
+    ("rand", Some(sym::aarch64_target_feature)),
+    // FEAT_BTI
+    ("bti", Some(sym::aarch64_target_feature)),
+    // FEAT_MTE
+    ("mte", Some(sym::aarch64_target_feature)),
+    // FEAT_JSCVT
+    ("jsconv", Some(sym::aarch64_target_feature)),
+    // FEAT_FCMA
+    ("fcma", Some(sym::aarch64_target_feature)),
+    // FEAT_AES
+    ("aes", Some(sym::aarch64_target_feature)),
+    // FEAT_SHA1 & FEAT_SHA256
+    ("sha2", Some(sym::aarch64_target_feature)),
+    // FEAT_SHA512 & FEAT_SHA3
+    ("sha3", Some(sym::aarch64_target_feature)),
+    // FEAT_SM3 & FEAT_SM4
+    ("sm4", Some(sym::aarch64_target_feature)),
     ("v8.1a", Some(sym::aarch64_target_feature)),
     ("v8.2a", Some(sym::aarch64_target_feature)),
     ("v8.3a", Some(sym::aarch64_target_feature)),
+    ("v8.4a", Some(sym::aarch64_target_feature)),
+    ("v8.5a", Some(sym::aarch64_target_feature)),
+    // ("v8.6a", Some(sym::aarch64_target_feature)),
+    // ("v8.7a", Some(sym::aarch64_target_feature)),
 ];
 
 const X86_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[