std: add basic target information for m88k-openbsd

closes https://codeberg.org/ziglang/zig/issues/31816
This commit is contained in:
Alex Rønne Petersen
2026-05-23 10:59:27 +02:00
parent a439978f05
commit 07262bddd6
7 changed files with 97 additions and 0 deletions
+16
View File
@@ -751,6 +751,7 @@ pub const kvx = @import("Target/kvx.zig");
pub const lanai = @import("Target/lanai.zig");
pub const loongarch = @import("Target/loongarch.zig");
pub const m68k = @import("Target/m68k.zig");
pub const m88k = @import("Target/generic.zig");
pub const microblaze = @import("Target/generic.zig");
pub const mips = @import("Target/mips.zig");
pub const msp430 = @import("Target/msp430.zig");
@@ -1091,6 +1092,7 @@ pub fn toElfMachine(target: *const Target) std.elf.EM {
.kvx => .KVX,
.lanai => .LANAI,
.loongarch32, .loongarch64 => .LOONGARCH,
.m88k => .@"88K",
.m68k => .@"68K",
.microblaze, .microblazeel => .MICROBLAZE,
.mips, .mips64, .mipsel, .mips64el => .MIPS,
@@ -1154,6 +1156,7 @@ pub fn toCoffMachine(target: *const Target) std.coff.IMAGE.FILE.MACHINE {
.kalimba,
.kvx,
.lanai,
.m88k,
.m68k,
.microblaze,
.microblazeel,
@@ -1364,6 +1367,7 @@ pub const Cpu = struct {
loongarch32,
loongarch64,
m68k,
m88k,
microblaze,
microblazeel,
mips,
@@ -1439,6 +1443,7 @@ pub const Cpu = struct {
lanai,
loongarch,
m68k,
m88k,
microblaze,
mips,
msp430,
@@ -1477,6 +1482,7 @@ pub const Cpu = struct {
.lanai => .lanai,
.loongarch32, .loongarch64 => .loongarch,
.m68k => .m68k,
.m88k => .m88k,
.microblaze, .microblazeel => .microblaze,
.mips, .mipsel, .mips64, .mips64el => .mips,
.msp430 => .msp430,
@@ -1710,6 +1716,7 @@ pub const Cpu = struct {
.hppa64,
.lanai,
.m68k,
.m88k,
.microblaze,
.mips,
.mips64,
@@ -1922,6 +1929,9 @@ pub const Cpu = struct {
.m68k_interrupt,
=> &.{.m68k},
.m88k_sysv,
=> &.{.m88k},
.microblaze_std,
.microblaze_interrupt,
=> &.{ .microblaze, .microblazeel },
@@ -2803,6 +2813,7 @@ pub const DynamicLinker = struct {
.arm,
.aarch64,
.hppa,
.m88k,
.mips64,
.mips64el,
.powerpc,
@@ -2910,6 +2921,7 @@ pub fn ptrBitWidth_arch_abi(cpu_arch: Cpu.Arch, abi: Abi) u16 {
.lanai,
.loongarch32,
.m68k,
.m88k,
.microblaze,
.microblazeel,
.mips,
@@ -3495,6 +3507,7 @@ pub fn cTypeAlignment(target: *const Target, c_type: CType) u16 {
.hppa,
.lanai,
.m68k,
.m88k,
.mips,
.mipsel,
.nvptx,
@@ -3604,6 +3617,7 @@ pub fn cTypePreferredAlignment(target: *const Target, c_type: CType) u16 {
.hppa,
.lanai,
.m68k,
.m88k,
.mips,
.mipsel,
.nvptx,
@@ -3675,6 +3689,7 @@ pub fn cMaxIntAlignment(target: *const Target) u16 {
.lanai,
.loongarch32,
.m68k,
.m88k,
.mips,
.mipsel,
.powerpc,
@@ -3775,6 +3790,7 @@ pub fn cCallingConvention(target: *const Target) ?std.builtin.CallingConvention
.loongarch64 => .{ .loongarch64_lp64 = .{} },
.loongarch32 => .{ .loongarch32_ilp32 = .{} },
.m68k => .{ .m68k_gnu = .{} },
.m88k => .{ .m88k_sysv = .{} },
.microblaze, .microblazeel => .{ .microblaze_std = .{} },
.msp430 => .{ .msp430_eabi = .{} },
.or1k => .{ .or1k_sysv = .{} },
+2
View File
@@ -608,6 +608,7 @@ const page_size_min_default: ?usize = switch (builtin.os.tag) {
.hppa => 4 << 10,
.x86, .x86_64 => 4 << 10,
.thumb, .thumbeb, .arm, .armeb, .aarch64, .aarch64_be => 4 << 10,
.m88k => 4 << 10,
.mips64, .mips64el => 4 << 10,
.powerpc, .powerpc64, .powerpc64le, .powerpcle => 4 << 10,
.riscv64 => 4 << 10,
@@ -771,6 +772,7 @@ const page_size_max_default: ?usize = switch (builtin.os.tag) {
.hppa => 4 << 10,
.x86, .x86_64 => 4 << 10,
.thumb, .thumbeb, .arm, .armeb, .aarch64, .aarch64_be => 4 << 10,
.m88k => 4 << 10,
.mips64, .mips64el => 16 << 10,
.powerpc, .powerpc64, .powerpc64le, .powerpcle => 4 << 10,
.riscv64 => 4 << 10,
+2
View File
@@ -292,6 +292,8 @@ pub const CallingConvention = union(enum(u8)) {
m68k_rtd: CommonOptions,
m68k_interrupt: CommonOptions,
m88k_sysv: CommonOptions,
/// The standard `microblaze`/`microblazeel` calling convention.
microblaze_std: CommonOptions,
microblaze_interrupt: MicroblazeInterruptOptions,
+71
View File
@@ -1553,6 +1553,77 @@ pub const Clobbers = switch (@import("builtin").cpu.arch) {
r14: bool = false,
r15: bool = false,
},
.m88k => packed struct {
/// Whether the inline assembly code may perform stores to memory
/// addresses other than those derived from input pointer provenance.
memory: bool = false,
r0: bool = false,
r1: bool = false,
r2: bool = false,
r3: bool = false,
r4: bool = false,
r5: bool = false,
r6: bool = false,
r7: bool = false,
r8: bool = false,
r9: bool = false,
r10: bool = false,
r11: bool = false,
r12: bool = false,
r13: bool = false,
r14: bool = false,
r15: bool = false,
r16: bool = false,
r17: bool = false,
r18: bool = false,
r19: bool = false,
r20: bool = false,
r21: bool = false,
r22: bool = false,
r23: bool = false,
r24: bool = false,
r25: bool = false,
r26: bool = false,
r27: bool = false,
r28: bool = false,
r29: bool = false,
r30: bool = false,
r31: bool = false,
x0: bool = false,
x1: bool = false,
x2: bool = false,
x3: bool = false,
x4: bool = false,
x5: bool = false,
x6: bool = false,
x7: bool = false,
x8: bool = false,
x9: bool = false,
x10: bool = false,
x11: bool = false,
x12: bool = false,
x13: bool = false,
x14: bool = false,
x15: bool = false,
x16: bool = false,
x17: bool = false,
x18: bool = false,
x19: bool = false,
x20: bool = false,
x21: bool = false,
x22: bool = false,
x23: bool = false,
x24: bool = false,
x25: bool = false,
x26: bool = false,
x27: bool = false,
x28: bool = false,
x29: bool = false,
x30: bool = false,
x31: bool = false,
},
.m68k => packed struct {
/// Whether the inline assembly code may perform stores to memory
/// addresses other than those derived from input pointer provenance.
+1
View File
@@ -8558,6 +8558,7 @@ const calling_conventions_supporting_var_args = [_]std.lang.CallingConvention.Ta
.m68k_sysv,
.m68k_gnu,
.m68k_rtd,
.m88k_sysv,
.msp430_eabi,
.or1k_sysv,
.s390x_sysv,
+4
View File
@@ -112,6 +112,7 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8
.hppa64,
.kalimba,
.kvx,
.m88k,
.microblaze,
.microblazeel,
.or1k,
@@ -478,6 +479,7 @@ pub fn dataLayout(target: *const std.Target) []const u8 {
.hppa64,
.kalimba,
.kvx,
.m88k,
.microblaze,
.microblazeel,
.or1k,
@@ -4531,6 +4533,7 @@ pub fn toLlvmCallConvTag(cc_tag: std.lang.CallingConvention.Tag, target: *const
.loongarch32_ilp32,
.m68k_sysv,
.m68k_gnu,
.m88k_sysv,
.msp430_eabi,
.or1k_sysv,
.propeller_sysv,
@@ -4903,6 +4906,7 @@ pub fn initializeLLVMTarget(arch: std.Target.Cpu.Arch) void {
.hppa64,
.kalimba,
.kvx,
.m88k,
.microblaze,
.microblazeel,
.or1k,
+1
View File
@@ -245,6 +245,7 @@ pub fn hasLlvmSupport(target: *const std.Target, ofmt: std.Target.ObjectFormat)
.hppa64,
.kalimba,
.kvx,
.m88k,
.microblaze,
.microblazeel,
.or1k,