| author | |
| committer | |
| log | 4fa453ce20ceaee254a7d127a4a99be2260ec605 |
| tree | 01106dafc6584838f788a8073af01ad4e71dacb8 |
| parent | abf40caeb7d85d8fc842fe82215b19902b749481 |
| signature |
Only supported in CBE.8 files changed, 49 insertions(+), 0 deletions(-)
lib/std/Target.zig+1| ... | ... | @@ -1904,6 +1904,7 @@ pub const Cpu = struct { |
| 1904 | 1904 | => &.{.m68k}, |
| 1905 | 1905 | |
| 1906 | 1906 | .microblaze_std, |
| 1907 | .microblaze_interrupt, | |
| 1907 | 1908 | => &.{ .microblaze, .microblazeel }, |
| 1908 | 1909 | |
| 1909 | 1910 | .msp430_eabi, |
lib/std/builtin.zig+20| ... | ... | @@ -323,6 +323,7 @@ pub const CallingConvention = union(enum(u8)) { |
| 323 | 323 | |
| 324 | 324 | /// The standard `microblaze`/`microblazeel` calling convention. |
| 325 | 325 | microblaze_std: CommonOptions, |
| 326 | microblaze_interrupt: MicroblazeInterruptOptions, | |
| 326 | 327 | |
| 327 | 328 | /// The standard `msp430` calling convention. |
| 328 | 329 | msp430_eabi: CommonOptions, |
| ... | ... | @@ -421,6 +422,25 @@ pub const CallingConvention = union(enum(u8)) { |
| 421 | 422 | }; |
| 422 | 423 | }; |
| 423 | 424 | |
| 425 | /// Options for the `microblaze_interrupt` calling convention. | |
| 426 | pub const MicroblazeInterruptOptions = struct { | |
| 427 | /// The boundary the stack is aligned to when the function is called. | |
| 428 | /// `null` means the default for this calling convention. | |
| 429 | incoming_stack_alignment: ?u64 = null, | |
| 430 | type: InterruptType = .regular, | |
| 431 | ||
| 432 | pub const InterruptType = enum(u2) { | |
| 433 | /// User exception; return with `rtsd`. | |
| 434 | user, | |
| 435 | /// Regular interrupt; return with `rtid`. | |
| 436 | regular, | |
| 437 | /// Fast interrupt; return with `rtid`. | |
| 438 | fast, | |
| 439 | /// Software breakpoint; return with `rtbd`. | |
| 440 | breakpoint, | |
| 441 | }; | |
| 442 | }; | |
| 443 | ||
| 424 | 444 | /// Options for the `mips_interrupt` and `mips64_interrupt` calling conventions. |
| 425 | 445 | pub const MipsInterruptOptions = struct { |
| 426 | 446 | /// The boundary the stack is aligned to when the function is called. |
src/InternPool.zig+9| ... | ... | @@ -12960,6 +12960,11 @@ const PackedCallingConvention = packed struct(u18) { |
| 12960 | 12960 | .incoming_stack_alignment = .fromByteUnits(pl.incoming_stack_alignment orelse 0), |
| 12961 | 12961 | .extra = @intFromEnum(pl.type), |
| 12962 | 12962 | }, |
| 12963 | std.builtin.CallingConvention.MicroblazeInterruptOptions => .{ | |
| 12964 | .tag = tag, | |
| 12965 | .incoming_stack_alignment = .fromByteUnits(pl.incoming_stack_alignment orelse 0), | |
| 12966 | .extra = @intFromEnum(pl.type), | |
| 12967 | }, | |
| 12963 | 12968 | std.builtin.CallingConvention.MipsInterruptOptions => .{ |
| 12964 | 12969 | .tag = tag, |
| 12965 | 12970 | .incoming_stack_alignment = .fromByteUnits(pl.incoming_stack_alignment orelse 0), |
| ... | ... | @@ -12997,6 +13002,10 @@ const PackedCallingConvention = packed struct(u18) { |
| 12997 | 13002 | .incoming_stack_alignment = cc.incoming_stack_alignment.toByteUnits(), |
| 12998 | 13003 | .type = @enumFromInt(cc.extra), |
| 12999 | 13004 | }, |
| 13005 | std.builtin.CallingConvention.MicroblazeInterruptOptions => .{ | |
| 13006 | .incoming_stack_alignment = cc.incoming_stack_alignment.toByteUnits(), | |
| 13007 | .type = @enumFromInt(cc.extra), | |
| 13008 | }, | |
| 13000 | 13009 | std.builtin.CallingConvention.MipsInterruptOptions => .{ |
| 13001 | 13010 | .incoming_stack_alignment = cc.incoming_stack_alignment.toByteUnits(), |
| 13002 | 13011 | .mode = @enumFromInt(cc.extra), |
src/Sema.zig+6| ... | ... | @@ -9135,6 +9135,7 @@ fn callConvIsCallable(cc: std.builtin.CallingConvention.Tag) bool { |
| 9135 | 9135 | .avr_signal, |
| 9136 | 9136 | .csky_interrupt, |
| 9137 | 9137 | .m68k_interrupt, |
| 9138 | .microblaze_interrupt, | |
| 9138 | 9139 | .mips_interrupt, |
| 9139 | 9140 | .mips64_interrupt, |
| 9140 | 9141 | .msp430_interrupt, |
| ... | ... | @@ -9295,6 +9296,7 @@ fn funcCommon( |
| 9295 | 9296 | }, |
| 9296 | 9297 | .arc_interrupt, |
| 9297 | 9298 | .arm_interrupt, |
| 9299 | .microblaze_interrupt, | |
| 9298 | 9300 | .mips64_interrupt, |
| 9299 | 9301 | .mips_interrupt, |
| 9300 | 9302 | .riscv64_interrupt, |
| ... | ... | @@ -9530,6 +9532,7 @@ fn finishFunc( |
| 9530 | 9532 | .avr_interrupt, |
| 9531 | 9533 | .csky_interrupt, |
| 9532 | 9534 | .m68k_interrupt, |
| 9535 | .microblaze_interrupt, | |
| 9533 | 9536 | .msp430_interrupt, |
| 9534 | 9537 | .avr_signal, |
| 9535 | 9538 | => if (return_type.zigTypeTag(zcu) != .void and return_type.zigTypeTag(zcu) != .noreturn) { |
| ... | ... | @@ -30057,6 +30060,9 @@ fn callconvCoerceAllowed( |
| 30057 | 30060 | std.builtin.CallingConvention.ArmInterruptOptions => { |
| 30058 | 30061 | if (src_data.type != dest_data.type) return false; |
| 30059 | 30062 | }, |
| 30063 | std.builtin.CallingConvention.MicroblazeInterruptOptions => { | |
| 30064 | if (src_data.type != dest_data.type) return false; | |
| 30065 | }, | |
| 30060 | 30066 | std.builtin.CallingConvention.MipsInterruptOptions => { |
| 30061 | 30067 | if (src_data.mode != dest_data.mode) return false; |
| 30062 | 30068 | }, |
src/Zcu.zig+3| ... | ... | @@ -4438,6 +4438,9 @@ pub fn callconvSupported(zcu: *Zcu, cc: std.builtin.CallingConvention) union(enu |
| 4438 | 4438 | .arm_interrupt, |
| 4439 | 4439 | => |opts| opts.incoming_stack_alignment == null, |
| 4440 | 4440 | |
| 4441 | .microblaze_interrupt, | |
| 4442 | => |opts| opts.incoming_stack_alignment == null, | |
| 4443 | ||
| 4441 | 4444 | .mips_interrupt, |
| 4442 | 4445 | .mips64_interrupt, |
| 4443 | 4446 | => |opts| opts.incoming_stack_alignment == null, |
src/codegen/c.zig+7| ... | ... | @@ -8092,6 +8092,13 @@ fn toCallingConvention(cc: std.builtin.CallingConvention, zcu: *Zcu) ?[]const u8 |
| 8092 | 8092 | |
| 8093 | 8093 | .avr_signal => "signal", |
| 8094 | 8094 | |
| 8095 | .microblaze_interrupt => |opts| switch (opts.type) { | |
| 8096 | .user => "save_volatiles", | |
| 8097 | .regular => "interrupt_handler", | |
| 8098 | .fast => "fast_interrupt", | |
| 8099 | .breakpoint => "break_handler", | |
| 8100 | }, | |
| 8101 | ||
| 8095 | 8102 | .mips_interrupt, |
| 8096 | 8103 | .mips64_interrupt, |
| 8097 | 8104 | => |opts| switch (opts.mode) { |
src/codegen/llvm.zig+2| ... | ... | @@ -11837,6 +11837,7 @@ pub fn toLlvmCallConv(cc: std.builtin.CallingConvention, target: *const std.Targ |
| 11837 | 11837 | std.builtin.CallingConvention.ArcInterruptOptions, |
| 11838 | 11838 | std.builtin.CallingConvention.ArmInterruptOptions, |
| 11839 | 11839 | std.builtin.CallingConvention.RiscvInterruptOptions, |
| 11840 | std.builtin.CallingConvention.MicroblazeInterruptOptions, | |
| 11840 | 11841 | std.builtin.CallingConvention.MipsInterruptOptions, |
| 11841 | 11842 | std.builtin.CallingConvention.CommonOptions, |
| 11842 | 11843 | => .{ pl.incoming_stack_alignment, 0 }, |
| ... | ... | @@ -11926,6 +11927,7 @@ fn toLlvmCallConvTag(cc_tag: std.builtin.CallingConvention.Tag, target: *const s |
| 11926 | 11927 | .aarch64_aapcs_win, |
| 11927 | 11928 | .alpha_osf, |
| 11928 | 11929 | .microblaze_std, |
| 11930 | .microblaze_interrupt, | |
| 11929 | 11931 | .mips64_n64, |
| 11930 | 11932 | .mips64_n32, |
| 11931 | 11933 | .mips_o32, |
src/link/Dwarf.zig+1| ... | ... | @@ -3925,6 +3925,7 @@ fn updateLazyType( |
| 3925 | 3925 | .avr_interrupt, |
| 3926 | 3926 | .csky_interrupt, |
| 3927 | 3927 | .m68k_interrupt, |
| 3928 | .microblaze_interrupt, | |
| 3928 | 3929 | .msp430_interrupt, |
| 3929 | 3930 | => .normal, |
| 3930 | 3931 |