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