diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-03-14 17:24:56 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-14 17:24:56 +0100 |
| commit | 0e423932f89baeaa59ea710caeda7a3834506fdd (patch) | |
| tree | 8351eb05793501559feea22dbed7091482ae2c17 /compiler/rustc_codegen_ssa | |
| parent | bce19cf7f19ee5729defaccc86b068cc3c206c9c (diff) | |
| parent | 5a5621791f3fc6e27c692747ddd37672f83c7360 (diff) | |
| download | rust-0e423932f89baeaa59ea710caeda7a3834506fdd.tar.gz rust-0e423932f89baeaa59ea710caeda7a3834506fdd.zip | |
Rollup merge of #90621 - adamgemmell:dev/stabilise-target-feature, r=Amanieu
Stabilise `aarch64_target_feature` This PR stabilises `aarch64_target_feature` - see https://github.com/rust-lang/rust/issues/90620
Diffstat (limited to 'compiler/rustc_codegen_ssa')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/target_features.rs | 109 |
1 files changed, 56 insertions, 53 deletions
diff --git a/compiler/rustc_codegen_ssa/src/target_features.rs b/compiler/rustc_codegen_ssa/src/target_features.rs index df011d6ca5f..f37c6751381 100644 --- a/compiler/rustc_codegen_ssa/src/target_features.rs +++ b/compiler/rustc_codegen_ssa/src/target_features.rs @@ -44,105 +44,108 @@ const ARM_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[ const AARCH64_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[ // FEAT_AdvSimd - ("neon", Some(sym::aarch64_target_feature)), + ("neon", None), // FEAT_FP - ("fp", Some(sym::aarch64_target_feature)), + ("fp", None), // FEAT_FP16 - ("fp16", Some(sym::aarch64_target_feature)), + ("fp16", None), // FEAT_SVE - ("sve", Some(sym::aarch64_target_feature)), + ("sve", None), // FEAT_CRC - ("crc", Some(sym::aarch64_target_feature)), + ("crc", None), // FEAT_RAS - ("ras", Some(sym::aarch64_target_feature)), + ("ras", None), // FEAT_LSE - ("lse", Some(sym::aarch64_target_feature)), + ("lse", None), // FEAT_RDM - ("rdm", Some(sym::aarch64_target_feature)), + ("rdm", None), // FEAT_RCPC - ("rcpc", Some(sym::aarch64_target_feature)), + ("rcpc", None), // FEAT_RCPC2 - ("rcpc2", Some(sym::aarch64_target_feature)), + ("rcpc2", None), // FEAT_DotProd - ("dotprod", Some(sym::aarch64_target_feature)), + ("dotprod", None), // FEAT_TME - ("tme", Some(sym::aarch64_target_feature)), + ("tme", None), // FEAT_FHM - ("fhm", Some(sym::aarch64_target_feature)), + ("fhm", None), // FEAT_DIT - ("dit", Some(sym::aarch64_target_feature)), + ("dit", None), // FEAT_FLAGM - ("flagm", Some(sym::aarch64_target_feature)), + ("flagm", None), // FEAT_SSBS - ("ssbs", Some(sym::aarch64_target_feature)), + ("ssbs", None), // FEAT_SB - ("sb", Some(sym::aarch64_target_feature)), + ("sb", None), // FEAT_PAUTH (address authentication) - ("paca", Some(sym::aarch64_target_feature)), + ("paca", None), // FEAT_PAUTH (generic authentication) - ("pacg", Some(sym::aarch64_target_feature)), + ("pacg", None), // FEAT_DPB - ("dpb", Some(sym::aarch64_target_feature)), + ("dpb", None), // FEAT_DPB2 - ("dpb2", Some(sym::aarch64_target_feature)), + ("dpb2", None), // FEAT_SVE2 - ("sve2", Some(sym::aarch64_target_feature)), + ("sve2", None), // FEAT_SVE2_AES - ("sve2-aes", Some(sym::aarch64_target_feature)), + ("sve2-aes", None), // FEAT_SVE2_SM4 - ("sve2-sm4", Some(sym::aarch64_target_feature)), + ("sve2-sm4", None), // FEAT_SVE2_SHA3 - ("sve2-sha3", Some(sym::aarch64_target_feature)), + ("sve2-sha3", None), // FEAT_SVE2_BitPerm - ("sve2-bitperm", Some(sym::aarch64_target_feature)), + ("sve2-bitperm", None), // FEAT_FRINTTS - ("frintts", Some(sym::aarch64_target_feature)), + ("frintts", None), // FEAT_I8MM - ("i8mm", Some(sym::aarch64_target_feature)), + ("i8mm", None), // FEAT_F32MM - ("f32mm", Some(sym::aarch64_target_feature)), + ("f32mm", None), // FEAT_F64MM - ("f64mm", Some(sym::aarch64_target_feature)), + ("f64mm", None), // FEAT_BF16 - ("bf16", Some(sym::aarch64_target_feature)), + ("bf16", None), // FEAT_RAND - ("rand", Some(sym::aarch64_target_feature)), + ("rand", None), // FEAT_BTI - ("bti", Some(sym::aarch64_target_feature)), + ("bti", None), // FEAT_MTE - ("mte", Some(sym::aarch64_target_feature)), + ("mte", None), // FEAT_JSCVT - ("jsconv", Some(sym::aarch64_target_feature)), + ("jsconv", None), // FEAT_FCMA - ("fcma", Some(sym::aarch64_target_feature)), + ("fcma", None), // FEAT_AES - ("aes", Some(sym::aarch64_target_feature)), + ("aes", None), // FEAT_SHA1 & FEAT_SHA256 - ("sha2", Some(sym::aarch64_target_feature)), + ("sha2", None), // FEAT_SHA512 & FEAT_SHA3 - ("sha3", Some(sym::aarch64_target_feature)), + ("sha3", None), // FEAT_SM3 & FEAT_SM4 - ("sm4", Some(sym::aarch64_target_feature)), + ("sm4", None), // FEAT_PAN - ("pan", Some(sym::aarch64_target_feature)), + ("pan", None), // FEAT_LOR - ("lor", Some(sym::aarch64_target_feature)), + ("lor", None), // FEAT_VHE - ("vh", Some(sym::aarch64_target_feature)), + ("vh", None), // FEAT_PMUv3 - ("pmuv3", Some(sym::aarch64_target_feature)), + ("pmuv3", None), // FEAT_SPE - ("spe", 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)), + ("spe", None), + ("v8.1a", Some(sym::aarch64_ver_target_feature)), + ("v8.2a", Some(sym::aarch64_ver_target_feature)), + ("v8.3a", Some(sym::aarch64_ver_target_feature)), + ("v8.4a", Some(sym::aarch64_ver_target_feature)), + ("v8.5a", Some(sym::aarch64_ver_target_feature)), + ("v8.6a", Some(sym::aarch64_ver_target_feature)), + ("v8.7a", Some(sym::aarch64_ver_target_feature)), ]; -const AARCH64_TIED_FEATURES: &[&[&str]] = &[&["paca", "pacg"]]; +const AARCH64_TIED_FEATURES: &[&[&str]] = &[ + &["fp", "neon"], // Silicon always has both, so avoid needless complications + &["paca", "pacg"], // Together these represent `pauth` in LLVM +]; const X86_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[ ("adx", Some(sym::adx_target_feature)), |
