mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
std.builtin: add CallingConvention.msp430_interrupt
Supported by LLVM and CBE.
This commit is contained in:
parent
beb507a1ed
commit
abf40caeb7
@ -1907,6 +1907,7 @@ pub const Cpu = struct {
|
||||
=> &.{ .microblaze, .microblazeel },
|
||||
|
||||
.msp430_eabi,
|
||||
.msp430_interrupt,
|
||||
=> &.{.msp430},
|
||||
|
||||
.or1k_sysv,
|
||||
|
||||
@ -326,6 +326,7 @@ pub const CallingConvention = union(enum(u8)) {
|
||||
|
||||
/// The standard `msp430` calling convention.
|
||||
msp430_eabi: CommonOptions,
|
||||
msp430_interrupt: CommonOptions,
|
||||
|
||||
/// The standard `or1k` calling convention.
|
||||
or1k_sysv: CommonOptions,
|
||||
|
||||
@ -9137,6 +9137,7 @@ fn callConvIsCallable(cc: std.builtin.CallingConvention.Tag) bool {
|
||||
.m68k_interrupt,
|
||||
.mips_interrupt,
|
||||
.mips64_interrupt,
|
||||
.msp430_interrupt,
|
||||
.riscv32_interrupt,
|
||||
.riscv64_interrupt,
|
||||
.x86_interrupt,
|
||||
@ -9301,6 +9302,7 @@ fn funcCommon(
|
||||
.avr_interrupt,
|
||||
.csky_interrupt,
|
||||
.m68k_interrupt,
|
||||
.msp430_interrupt,
|
||||
.avr_signal,
|
||||
=> return sema.fail(block, param_src, "parameters are not allowed with '{s}' calling convention", .{@tagName(cc)}),
|
||||
else => {},
|
||||
@ -9528,6 +9530,7 @@ fn finishFunc(
|
||||
.avr_interrupt,
|
||||
.csky_interrupt,
|
||||
.m68k_interrupt,
|
||||
.msp430_interrupt,
|
||||
.avr_signal,
|
||||
=> if (return_type.zigTypeTag(zcu) != .void and return_type.zigTypeTag(zcu) != .noreturn) {
|
||||
return sema.fail(block, ret_ty_src, "function with calling convention '{s}' must return 'void' or 'noreturn'", .{@tagName(cc_resolved)});
|
||||
|
||||
@ -4426,6 +4426,7 @@ pub fn callconvSupported(zcu: *Zcu, cc: std.builtin.CallingConvention) union(enu
|
||||
.riscv32_ilp32_v,
|
||||
.m68k_rtd,
|
||||
.m68k_interrupt,
|
||||
.msp430_interrupt,
|
||||
=> |opts| opts.incoming_stack_alignment == null,
|
||||
|
||||
.arm_aapcs_vfp,
|
||||
|
||||
@ -8113,6 +8113,7 @@ fn toCallingConvention(cc: std.builtin.CallingConvention, zcu: *Zcu) ?[]const u8
|
||||
.avr_interrupt,
|
||||
.csky_interrupt,
|
||||
.m68k_interrupt,
|
||||
.msp430_interrupt,
|
||||
.x86_interrupt,
|
||||
.x86_64_interrupt,
|
||||
=> "interrupt",
|
||||
|
||||
@ -11900,6 +11900,7 @@ fn toLlvmCallConvTag(cc_tag: std.builtin.CallingConvention.Tag, target: *const s
|
||||
.avr_interrupt => .avr_intrcc,
|
||||
.m68k_rtd => .m68k_rtdcc,
|
||||
.m68k_interrupt => .m68k_intrcc,
|
||||
.msp430_interrupt => .msp430_intrcc,
|
||||
.amdgcn_kernel => .amdgpu_kernel,
|
||||
.amdgcn_cs => .amdgpu_cs,
|
||||
.nvptx_device => .ptx_device,
|
||||
|
||||
@ -3925,6 +3925,7 @@ fn updateLazyType(
|
||||
.avr_interrupt,
|
||||
.csky_interrupt,
|
||||
.m68k_interrupt,
|
||||
.msp430_interrupt,
|
||||
=> .normal,
|
||||
|
||||
else => .nocall,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user