mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
18 lines
378 B
Rust
18 lines
378 B
Rust
//@ compile-flags: -C no-prepopulate-passes -Copt-level=0
|
|
//@ needs-asm-support
|
|
//@ ignore-arm no "ret" mnemonic
|
|
|
|
#![crate_type = "lib"]
|
|
#![feature(naked_functions, fn_align)]
|
|
use std::arch::naked_asm;
|
|
|
|
// CHECK: .balign 16
|
|
// CHECK-LABEL: naked_empty:
|
|
#[repr(align(16))]
|
|
#[no_mangle]
|
|
#[naked]
|
|
pub unsafe extern "C" fn naked_empty() {
|
|
// CHECK: ret
|
|
naked_asm!("ret");
|
|
}
|