authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-05-23 10:59:27+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-05-23 11:02:55+02:00
log07262bddd67e8c3bbf87cc2d335c07aae40e52bf
treecd14ab3fe3be355452b82676c2d7368fa704d1ce
parenta439978f055ab40ff51314df329c084b6817318f
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std: add basic target information for m88k-openbsd

closes https://codeberg.org/ziglang/zig/issues/31816

7 files changed, 97 insertions(+), 0 deletions(-)

lib/std/Target.zig+16
...@@ -751,6 +751,7 @@ pub const kvx = @import("Target/kvx.zig");...@@ -751,6 +751,7 @@ pub const kvx = @import("Target/kvx.zig");
751pub const lanai = @import("Target/lanai.zig");751pub const lanai = @import("Target/lanai.zig");
752pub const loongarch = @import("Target/loongarch.zig");752pub const loongarch = @import("Target/loongarch.zig");
753pub const m68k = @import("Target/m68k.zig");753pub const m68k = @import("Target/m68k.zig");
754pub const m88k = @import("Target/generic.zig");
754pub const microblaze = @import("Target/generic.zig");755pub const microblaze = @import("Target/generic.zig");
755pub const mips = @import("Target/mips.zig");756pub const mips = @import("Target/mips.zig");
756pub const msp430 = @import("Target/msp430.zig");757pub const msp430 = @import("Target/msp430.zig");
...@@ -1091,6 +1092,7 @@ pub fn toElfMachine(target: *const Target) std.elf.EM {...@@ -1091,6 +1092,7 @@ pub fn toElfMachine(target: *const Target) std.elf.EM {
1091 .kvx => .KVX,1092 .kvx => .KVX,
1092 .lanai => .LANAI,1093 .lanai => .LANAI,
1093 .loongarch32, .loongarch64 => .LOONGARCH,1094 .loongarch32, .loongarch64 => .LOONGARCH,
1095 .m88k => .@"88K",
1094 .m68k => .@"68K",1096 .m68k => .@"68K",
1095 .microblaze, .microblazeel => .MICROBLAZE,1097 .microblaze, .microblazeel => .MICROBLAZE,
1096 .mips, .mips64, .mipsel, .mips64el => .MIPS,1098 .mips, .mips64, .mipsel, .mips64el => .MIPS,
...@@ -1154,6 +1156,7 @@ pub fn toCoffMachine(target: *const Target) std.coff.IMAGE.FILE.MACHINE {...@@ -1154,6 +1156,7 @@ pub fn toCoffMachine(target: *const Target) std.coff.IMAGE.FILE.MACHINE {
1154 .kalimba,1156 .kalimba,
1155 .kvx,1157 .kvx,
1156 .lanai,1158 .lanai,
1159 .m88k,
1157 .m68k,1160 .m68k,
1158 .microblaze,1161 .microblaze,
1159 .microblazeel,1162 .microblazeel,
...@@ -1364,6 +1367,7 @@ pub const Cpu = struct {...@@ -1364,6 +1367,7 @@ pub const Cpu = struct {
1364 loongarch32,1367 loongarch32,
1365 loongarch64,1368 loongarch64,
1366 m68k,1369 m68k,
1370 m88k,
1367 microblaze,1371 microblaze,
1368 microblazeel,1372 microblazeel,
1369 mips,1373 mips,
...@@ -1439,6 +1443,7 @@ pub const Cpu = struct {...@@ -1439,6 +1443,7 @@ pub const Cpu = struct {
1439 lanai,1443 lanai,
1440 loongarch,1444 loongarch,
1441 m68k,1445 m68k,
1446 m88k,
1442 microblaze,1447 microblaze,
1443 mips,1448 mips,
1444 msp430,1449 msp430,
...@@ -1477,6 +1482,7 @@ pub const Cpu = struct {...@@ -1477,6 +1482,7 @@ pub const Cpu = struct {
1477 .lanai => .lanai,1482 .lanai => .lanai,
1478 .loongarch32, .loongarch64 => .loongarch,1483 .loongarch32, .loongarch64 => .loongarch,
1479 .m68k => .m68k,1484 .m68k => .m68k,
1485 .m88k => .m88k,
1480 .microblaze, .microblazeel => .microblaze,1486 .microblaze, .microblazeel => .microblaze,
1481 .mips, .mipsel, .mips64, .mips64el => .mips,1487 .mips, .mipsel, .mips64, .mips64el => .mips,
1482 .msp430 => .msp430,1488 .msp430 => .msp430,
...@@ -1710,6 +1716,7 @@ pub const Cpu = struct {...@@ -1710,6 +1716,7 @@ pub const Cpu = struct {
1710 .hppa64,1716 .hppa64,
1711 .lanai,1717 .lanai,
1712 .m68k,1718 .m68k,
1719 .m88k,
1713 .microblaze,1720 .microblaze,
1714 .mips,1721 .mips,
1715 .mips64,1722 .mips64,
...@@ -1922,6 +1929,9 @@ pub const Cpu = struct {...@@ -1922,6 +1929,9 @@ pub const Cpu = struct {
1922 .m68k_interrupt,1929 .m68k_interrupt,
1923 => &.{.m68k},1930 => &.{.m68k},
19241931
1932 .m88k_sysv,
1933 => &.{.m88k},
1934
1925 .microblaze_std,1935 .microblaze_std,
1926 .microblaze_interrupt,1936 .microblaze_interrupt,
1927 => &.{ .microblaze, .microblazeel },1937 => &.{ .microblaze, .microblazeel },
...@@ -2803,6 +2813,7 @@ pub const DynamicLinker = struct {...@@ -2803,6 +2813,7 @@ pub const DynamicLinker = struct {
2803 .arm,2813 .arm,
2804 .aarch64,2814 .aarch64,
2805 .hppa,2815 .hppa,
2816 .m88k,
2806 .mips64,2817 .mips64,
2807 .mips64el,2818 .mips64el,
2808 .powerpc,2819 .powerpc,
...@@ -2910,6 +2921,7 @@ pub fn ptrBitWidth_arch_abi(cpu_arch: Cpu.Arch, abi: Abi) u16 {...@@ -2910,6 +2921,7 @@ pub fn ptrBitWidth_arch_abi(cpu_arch: Cpu.Arch, abi: Abi) u16 {
2910 .lanai,2921 .lanai,
2911 .loongarch32,2922 .loongarch32,
2912 .m68k,2923 .m68k,
2924 .m88k,
2913 .microblaze,2925 .microblaze,
2914 .microblazeel,2926 .microblazeel,
2915 .mips,2927 .mips,
...@@ -3495,6 +3507,7 @@ pub fn cTypeAlignment(target: *const Target, c_type: CType) u16 {...@@ -3495,6 +3507,7 @@ pub fn cTypeAlignment(target: *const Target, c_type: CType) u16 {
3495 .hppa,3507 .hppa,
3496 .lanai,3508 .lanai,
3497 .m68k,3509 .m68k,
3510 .m88k,
3498 .mips,3511 .mips,
3499 .mipsel,3512 .mipsel,
3500 .nvptx,3513 .nvptx,
...@@ -3604,6 +3617,7 @@ pub fn cTypePreferredAlignment(target: *const Target, c_type: CType) u16 {...@@ -3604,6 +3617,7 @@ pub fn cTypePreferredAlignment(target: *const Target, c_type: CType) u16 {
3604 .hppa,3617 .hppa,
3605 .lanai,3618 .lanai,
3606 .m68k,3619 .m68k,
3620 .m88k,
3607 .mips,3621 .mips,
3608 .mipsel,3622 .mipsel,
3609 .nvptx,3623 .nvptx,
...@@ -3675,6 +3689,7 @@ pub fn cMaxIntAlignment(target: *const Target) u16 {...@@ -3675,6 +3689,7 @@ pub fn cMaxIntAlignment(target: *const Target) u16 {
3675 .lanai,3689 .lanai,
3676 .loongarch32,3690 .loongarch32,
3677 .m68k,3691 .m68k,
3692 .m88k,
3678 .mips,3693 .mips,
3679 .mipsel,3694 .mipsel,
3680 .powerpc,3695 .powerpc,
...@@ -3775,6 +3790,7 @@ pub fn cCallingConvention(target: *const Target) ?std.builtin.CallingConvention...@@ -3775,6 +3790,7 @@ pub fn cCallingConvention(target: *const Target) ?std.builtin.CallingConvention
3775 .loongarch64 => .{ .loongarch64_lp64 = .{} },3790 .loongarch64 => .{ .loongarch64_lp64 = .{} },
3776 .loongarch32 => .{ .loongarch32_ilp32 = .{} },3791 .loongarch32 => .{ .loongarch32_ilp32 = .{} },
3777 .m68k => .{ .m68k_gnu = .{} },3792 .m68k => .{ .m68k_gnu = .{} },
3793 .m88k => .{ .m88k_sysv = .{} },
3778 .microblaze, .microblazeel => .{ .microblaze_std = .{} },3794 .microblaze, .microblazeel => .{ .microblaze_std = .{} },
3779 .msp430 => .{ .msp430_eabi = .{} },3795 .msp430 => .{ .msp430_eabi = .{} },
3780 .or1k => .{ .or1k_sysv = .{} },3796 .or1k => .{ .or1k_sysv = .{} },
lib/std/heap.zig+2
...@@ -608,6 +608,7 @@ const page_size_min_default: ?usize = switch (builtin.os.tag) {...@@ -608,6 +608,7 @@ const page_size_min_default: ?usize = switch (builtin.os.tag) {
608 .hppa => 4 << 10,608 .hppa => 4 << 10,
609 .x86, .x86_64 => 4 << 10,609 .x86, .x86_64 => 4 << 10,
610 .thumb, .thumbeb, .arm, .armeb, .aarch64, .aarch64_be => 4 << 10,610 .thumb, .thumbeb, .arm, .armeb, .aarch64, .aarch64_be => 4 << 10,
611 .m88k => 4 << 10,
611 .mips64, .mips64el => 4 << 10,612 .mips64, .mips64el => 4 << 10,
612 .powerpc, .powerpc64, .powerpc64le, .powerpcle => 4 << 10,613 .powerpc, .powerpc64, .powerpc64le, .powerpcle => 4 << 10,
613 .riscv64 => 4 << 10,614 .riscv64 => 4 << 10,
...@@ -771,6 +772,7 @@ const page_size_max_default: ?usize = switch (builtin.os.tag) {...@@ -771,6 +772,7 @@ const page_size_max_default: ?usize = switch (builtin.os.tag) {
771 .hppa => 4 << 10,772 .hppa => 4 << 10,
772 .x86, .x86_64 => 4 << 10,773 .x86, .x86_64 => 4 << 10,
773 .thumb, .thumbeb, .arm, .armeb, .aarch64, .aarch64_be => 4 << 10,774 .thumb, .thumbeb, .arm, .armeb, .aarch64, .aarch64_be => 4 << 10,
775 .m88k => 4 << 10,
774 .mips64, .mips64el => 16 << 10,776 .mips64, .mips64el => 16 << 10,
775 .powerpc, .powerpc64, .powerpc64le, .powerpcle => 4 << 10,777 .powerpc, .powerpc64, .powerpc64le, .powerpcle => 4 << 10,
776 .riscv64 => 4 << 10,778 .riscv64 => 4 << 10,
lib/std/lang.zig+2
...@@ -292,6 +292,8 @@ pub const CallingConvention = union(enum(u8)) {...@@ -292,6 +292,8 @@ pub const CallingConvention = union(enum(u8)) {
292 m68k_rtd: CommonOptions,292 m68k_rtd: CommonOptions,
293 m68k_interrupt: CommonOptions,293 m68k_interrupt: CommonOptions,
294294
295 m88k_sysv: CommonOptions,
296
295 /// The standard `microblaze`/`microblazeel` calling convention.297 /// The standard `microblaze`/`microblazeel` calling convention.
296 microblaze_std: CommonOptions,298 microblaze_std: CommonOptions,
297 microblaze_interrupt: MicroblazeInterruptOptions,299 microblaze_interrupt: MicroblazeInterruptOptions,
lib/std/lang/assembly.zig+71
...@@ -1553,6 +1553,77 @@ pub const Clobbers = switch (@import("builtin").cpu.arch) {...@@ -1553,6 +1553,77 @@ pub const Clobbers = switch (@import("builtin").cpu.arch) {
1553 r14: bool = false,1553 r14: bool = false,
1554 r15: bool = false,1554 r15: bool = false,
1555 },1555 },
1556 .m88k => packed struct {
1557 /// Whether the inline assembly code may perform stores to memory
1558 /// addresses other than those derived from input pointer provenance.
1559 memory: bool = false,
1560
1561 r0: bool = false,
1562 r1: bool = false,
1563 r2: bool = false,
1564 r3: bool = false,
1565 r4: bool = false,
1566 r5: bool = false,
1567 r6: bool = false,
1568 r7: bool = false,
1569 r8: bool = false,
1570 r9: bool = false,
1571 r10: bool = false,
1572 r11: bool = false,
1573 r12: bool = false,
1574 r13: bool = false,
1575 r14: bool = false,
1576 r15: bool = false,
1577 r16: bool = false,
1578 r17: bool = false,
1579 r18: bool = false,
1580 r19: bool = false,
1581 r20: bool = false,
1582 r21: bool = false,
1583 r22: bool = false,
1584 r23: bool = false,
1585 r24: bool = false,
1586 r25: bool = false,
1587 r26: bool = false,
1588 r27: bool = false,
1589 r28: bool = false,
1590 r29: bool = false,
1591 r30: bool = false,
1592 r31: bool = false,
1593
1594 x0: bool = false,
1595 x1: bool = false,
1596 x2: bool = false,
1597 x3: bool = false,
1598 x4: bool = false,
1599 x5: bool = false,
1600 x6: bool = false,
1601 x7: bool = false,
1602 x8: bool = false,
1603 x9: bool = false,
1604 x10: bool = false,
1605 x11: bool = false,
1606 x12: bool = false,
1607 x13: bool = false,
1608 x14: bool = false,
1609 x15: bool = false,
1610 x16: bool = false,
1611 x17: bool = false,
1612 x18: bool = false,
1613 x19: bool = false,
1614 x20: bool = false,
1615 x21: bool = false,
1616 x22: bool = false,
1617 x23: bool = false,
1618 x24: bool = false,
1619 x25: bool = false,
1620 x26: bool = false,
1621 x27: bool = false,
1622 x28: bool = false,
1623 x29: bool = false,
1624 x30: bool = false,
1625 x31: bool = false,
1626 },
1556 .m68k => packed struct {1627 .m68k => packed struct {
1557 /// Whether the inline assembly code may perform stores to memory1628 /// Whether the inline assembly code may perform stores to memory
1558 /// addresses other than those derived from input pointer provenance.1629 /// addresses other than those derived from input pointer provenance.
src/Sema.zig+1
...@@ -8558,6 +8558,7 @@ const calling_conventions_supporting_var_args = [_]std.lang.CallingConvention.Ta...@@ -8558,6 +8558,7 @@ const calling_conventions_supporting_var_args = [_]std.lang.CallingConvention.Ta
8558 .m68k_sysv,8558 .m68k_sysv,
8559 .m68k_gnu,8559 .m68k_gnu,
8560 .m68k_rtd,8560 .m68k_rtd,
8561 .m88k_sysv,
8561 .msp430_eabi,8562 .msp430_eabi,
8562 .or1k_sysv,8563 .or1k_sysv,
8563 .s390x_sysv,8564 .s390x_sysv,
src/codegen/llvm.zig+4
...@@ -112,6 +112,7 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8...@@ -112,6 +112,7 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8
112 .hppa64,112 .hppa64,
113 .kalimba,113 .kalimba,
114 .kvx,114 .kvx,
115 .m88k,
115 .microblaze,116 .microblaze,
116 .microblazeel,117 .microblazeel,
117 .or1k,118 .or1k,
...@@ -478,6 +479,7 @@ pub fn dataLayout(target: *const std.Target) []const u8 {...@@ -478,6 +479,7 @@ pub fn dataLayout(target: *const std.Target) []const u8 {
478 .hppa64,479 .hppa64,
479 .kalimba,480 .kalimba,
480 .kvx,481 .kvx,
482 .m88k,
481 .microblaze,483 .microblaze,
482 .microblazeel,484 .microblazeel,
483 .or1k,485 .or1k,
...@@ -4531,6 +4533,7 @@ pub fn toLlvmCallConvTag(cc_tag: std.lang.CallingConvention.Tag, target: *const...@@ -4531,6 +4533,7 @@ pub fn toLlvmCallConvTag(cc_tag: std.lang.CallingConvention.Tag, target: *const
4531 .loongarch32_ilp32,4533 .loongarch32_ilp32,
4532 .m68k_sysv,4534 .m68k_sysv,
4533 .m68k_gnu,4535 .m68k_gnu,
4536 .m88k_sysv,
4534 .msp430_eabi,4537 .msp430_eabi,
4535 .or1k_sysv,4538 .or1k_sysv,
4536 .propeller_sysv,4539 .propeller_sysv,
...@@ -4903,6 +4906,7 @@ pub fn initializeLLVMTarget(arch: std.Target.Cpu.Arch) void {...@@ -4903,6 +4906,7 @@ pub fn initializeLLVMTarget(arch: std.Target.Cpu.Arch) void {
4903 .hppa64,4906 .hppa64,
4904 .kalimba,4907 .kalimba,
4905 .kvx,4908 .kvx,
4909 .m88k,
4906 .microblaze,4910 .microblaze,
4907 .microblazeel,4911 .microblazeel,
4908 .or1k,4912 .or1k,
src/target.zig+1
...@@ -245,6 +245,7 @@ pub fn hasLlvmSupport(target: *const std.Target, ofmt: std.Target.ObjectFormat)...@@ -245,6 +245,7 @@ pub fn hasLlvmSupport(target: *const std.Target, ofmt: std.Target.ObjectFormat)
245 .hppa64,245 .hppa64,
246 .kalimba,246 .kalimba,
247 .kvx,247 .kvx,
248 .m88k,
248 .microblaze,249 .microblaze,
249 .microblazeel,250 .microblazeel,
250 .or1k,251 .or1k,