diff options
| author | Adam Gemmell <adam.gemmell@arm.com> | 2022-01-31 13:04:27 +0000 |
|---|---|---|
| committer | Adam Gemmell <adam.gemmell@arm.com> | 2022-02-10 15:10:33 +0000 |
| commit | d39a6377e9cfa108eb181ea892366e6b01fd753f (patch) | |
| tree | bd6e7fb2d02092d8b2ef107b0ab1f836b361831b /compiler/rustc_codegen_ssa/src | |
| parent | 56cd04af5c389b6ab676ba16f59d9f70bc465090 (diff) | |
| download | rust-d39a6377e9cfa108eb181ea892366e6b01fd753f.tar.gz rust-d39a6377e9cfa108eb181ea892366e6b01fd753f.zip | |
Split PAuth target feature
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/target_features.rs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_ssa/src/target_features.rs b/compiler/rustc_codegen_ssa/src/target_features.rs index 63cc6faf9ec..f31b0ee592e 100644 --- a/compiler/rustc_codegen_ssa/src/target_features.rs +++ b/compiler/rustc_codegen_ssa/src/target_features.rs @@ -74,8 +74,10 @@ const AARCH64_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[ ("ssbs", Some(sym::aarch64_target_feature)), // FEAT_SB ("sb", Some(sym::aarch64_target_feature)), - // FEAT_PAUTH - ("pauth", Some(sym::aarch64_target_feature)), + // FEAT_PAUTH (address authentication) + ("paca", Some(sym::aarch64_target_feature)), + // FEAT_PAUTH (generic authentication) + ("pacg", Some(sym::aarch64_target_feature)), // FEAT_DPB ("dpb", Some(sym::aarch64_target_feature)), // FEAT_DPB2 @@ -137,6 +139,8 @@ const AARCH64_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[ ("v8.7a", Some(sym::aarch64_target_feature)), ]; +const AARCH64_TIED_FEATURES: &[&[&str]] = &[&["paca", "pacg"]]; + const X86_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[ ("adx", Some(sym::adx_target_feature)), ("aes", None), @@ -256,6 +260,13 @@ pub fn supported_target_features(sess: &Session) -> &'static [(&'static str, Opt } } +pub fn tied_target_features(sess: &Session) -> &'static [&'static [&'static str]] { + match &*sess.target.arch { + "aarch64" => AARCH64_TIED_FEATURES, + _ => &[], + } +} + pub(crate) fn provide(providers: &mut Providers) { providers.supported_target_features = |tcx, cnum| { assert_eq!(cnum, LOCAL_CRATE); |
