]>
Commit | Line | Data |
---|---|---|
8bb4bdeb XL |
1 | // Checks if the correct annotation for the x86-interrupt ABI is passed to |
2 | // llvm. Also checks that the abi_x86_interrupt feature gate allows usage | |
3 | // of the x86-interrupt abi. | |
4 | ||
cdc7bbd5 XL |
5 | // needs-llvm-components: x86 |
6 | // compile-flags: -C no-prepopulate-passes --target=x86_64-unknown-linux-gnu | |
8bb4bdeb XL |
7 | |
8 | #![crate_type = "lib"] | |
cdc7bbd5 XL |
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 {} | |
5e7ed085 | 16 | impl Copy for i64 {} |
8bb4bdeb XL |
17 | |
18 | // CHECK: define x86_intrcc i64 @has_x86_interrupt_abi | |
19 | #[no_mangle] | |
20 | pub extern "x86-interrupt" fn has_x86_interrupt_abi(a: i64) -> i64 { | |
cdc7bbd5 | 21 | a |
8bb4bdeb | 22 | } |