Closed
Description
In rustc, the "paca" and "pacg" features are tied together: https://github.com/rust-lang/rust/blob/a876a4df32b402e3886cd9f2af02cff3dd8e21c8/compiler/rustc_codegen_ssa/src/target_features.rs#L147-L149
Enabling one always enables the other, so I think detection should check both as well.
I don't know if there are any CPUs that have one and not the other, but this could potentially be unsound:
#[target_feature(enable = "paca")] // enables both "paca" and "pacg"
unsafe fn foo() {}
if is_aarch64_feature_detected!("paca") {
// this would perhaps fail:
// assert!(is_aarch64_feature_detected!("pacg"))
unsafe { foo() }
}
Metadata
Metadata
Assignees
Labels
No labels