-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-inline-assemblyArea: Inline assembly (`asm!(…)`)Area: Inline assembly (`asm!(…)`)A-nakedArea: `#[naked]`, prologue and epilogue-free, functions, https://git.io/vAzzSArea: `#[naked]`, prologue and epilogue-free, functions, https://git.io/vAzzSC-bugCategory: This is a bug.Category: This is a bug.F-naked_functions`#![feature(naked_functions)]``#![feature(naked_functions)]`
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
Metadata
Metadata
Assignees
Labels
A-inline-assemblyArea: Inline assembly (`asm!(…)`)Area: Inline assembly (`asm!(…)`)A-nakedArea: `#[naked]`, prologue and epilogue-free, functions, https://git.io/vAzzSArea: `#[naked]`, prologue and epilogue-free, functions, https://git.io/vAzzSC-bugCategory: This is a bug.Category: This is a bug.F-naked_functions`#![feature(naked_functions)]``#![feature(naked_functions)]`