]> git.lizzy.rs Git - rust.git/blob - src/test/codegen/abi-x86-interrupt.rs
Rollup merge of #82535 - wesleywiser:wip_codegen_thread_names, r=nagisa
[rust.git] / src / test / codegen / abi-x86-interrupt.rs
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
5 // ignore-arm
6 // ignore-aarch64
7 // ignore-riscv64 x86-interrupt is not supported
8
9 // compile-flags: -C no-prepopulate-passes
10
11 #![crate_type = "lib"]
12 #![feature(abi_x86_interrupt)]
13
14 // CHECK: define x86_intrcc i64 @has_x86_interrupt_abi
15 #[no_mangle]
16 pub extern "x86-interrupt" fn has_x86_interrupt_abi(a: i64) -> i64 {
17     a * 2
18 }