]> git.lizzy.rs Git - rust.git/blob - src/test/codegen/abi-sysv64.rs
Merge commit '40dd3e2b7089b5e96714e064b731f6dbf17c61a9' into sync_cg_clif-2021-05-27
[rust.git] / src / test / codegen / abi-sysv64.rs
1 // Checks if the correct annotation for the sysv64 ABI is passed to
2 // llvm. Also checks that the abi-sysv64 feature gate allows usage
3 // of the sysv64 abi.
4 //
5 // needs-llvm-components: x86
6 // compile-flags: -C no-prepopulate-passes --target=x86_64-unknown-linux-gnu
7
8 #![crate_type = "lib"]
9 #![no_core]
10 #![feature(abi_x86_interrupt, no_core, lang_items)]
11
12 #[lang = "sized"]
13 trait Sized {}
14 #[lang = "copy"]
15 trait Copy {}
16
17 // CHECK: define x86_64_sysvcc i64 @has_sysv64_abi
18 #[no_mangle]
19 pub extern "sysv64" fn has_sysv64_abi(a: i64) -> i64 {
20     a
21 }