mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
13 lines
255 B
Rust
13 lines
255 B
Rust
// check-pass
|
|
// only-x86_64
|
|
// needs-asm-support
|
|
|
|
pub type Yes = extern "sysv64" fn(&'static u8) -> !;
|
|
|
|
fn main() {
|
|
unsafe {
|
|
let yes = &6 as *const _ as *const Yes;
|
|
core::arch::asm!("call {}", in(reg) yes, options(noreturn));
|
|
}
|
|
}
|