Open
Description
Since #128004, target features enabled with #[target_feature(..)]
are no longer in effect in naked functions. For example:
// --crate-typelib --target aarch64-unknown-linux-gnu
#![feature(naked_functions)]
use std::arch::{asm, naked_asm};
#[target_feature(enable = "aes")]
pub unsafe extern "C" fn f() {
// ok
asm!("aese.16b v0, v1");
}
#[target_feature(enable = "aes")]
#[naked]
pub unsafe extern "C" fn g() {
// Before #128004: ok
// After #128004: error: instruction requires: aes
naked_asm!("aese.16b v0, v1");
}
I haven't seen this discussed in the pull request. Opening the issue to give a chance to review the behaviour before stabilization.
cc @folkertdev, @Amanieu