| 1 | export fn interrupt_param1(_: u32) callconv(.{ .x86_64_interrupt = .{} }) void {} |
| 2 | export fn interrupt_param2(_: *anyopaque, _: u32) callconv(.{ .x86_64_interrupt = .{} }) void {} |
| 3 | export fn interrupt_param3(_: *anyopaque, _: u64, _: u32) callconv(.{ .x86_64_interrupt = .{} }) void {} |
| 4 | export fn interrupt_ret(_: *anyopaque, _: u64) callconv(.{ .x86_64_interrupt = .{} }) u32 { |
| 5 | return 0; |
| 6 | } |
| 7 | |
| 8 | export fn signal_param(_: u32) callconv(.avr_signal) void {} |
| 9 | export fn signal_ret() callconv(.avr_signal) noreturn {} |
| 10 | |
| 11 | // error |
| 12 | // target=x86_64-linux |
| 13 | // |
| 14 | // :1:28: error: first parameter of function with 'x86_64_interrupt' calling convention must be a pointer type |
| 15 | // :2:43: error: second parameter of function with 'x86_64_interrupt' calling convention must be a 64-bit integer |
| 16 | // :3:51: error: 'x86_64_interrupt' calling convention supports up to 2 parameters, found 3 |
| 17 | // :4:87: error: function with calling convention 'x86_64_interrupt' must return 'void' or 'noreturn' |
| 18 | // :8:24: error: parameters are not allowed with 'avr_signal' calling convention |
| 19 | // :9:34: error: calling convention 'avr_signal' only available on architectures 'avr' |