Split PAuth target feature
This commit is contained in:
parent
56cd04af5c
commit
d39a6377e9
9 changed files with 148 additions and 15 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue