-
-
Save mikdusan/e7c3f566d5d8ab38dbcc7e29f9afb002 to your computer and use it in GitHub Desktop.
minimal zig0 run...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export fn entry() void { | |
var a: u32 = 88 + 99; | |
} | |
pub fn panic(msg: []const u8, error_return_trace: ?*@import("builtin").StackTrace) noreturn { | |
while (true) {} | |
} |
diff --git a/lib/std/target.zig b/lib/std/target.zig
index 3372f617a..33be415d3 100644
--- a/lib/std/target.zig
+++ b/lib/std/target.zig
@@ -717,6 +717,7 @@ pub const Target = struct {
bpfeb,
csky,
hexagon,
+ m68k,
mips,
mipsel,
mips64,
@@ -832,6 +833,7 @@ pub const Target = struct {
.armeb => ._ARM,
.hexagon => ._HEXAGON,
.le32 => ._NONE,
+ .m68k => ._68K,
.mips => ._MIPS,
.mipsel => ._MIPS_RS3_LE,
.powerpc, .powerpcle => ._PPC,
@@ -892,6 +894,7 @@ pub const Target = struct {
.armeb => .Unknown,
.hexagon => .Unknown,
.le32 => .Unknown,
+ .m68k => .Unknown,
.mips => .Unknown,
.mipsel => .Unknown,
.powerpc, .powerpcle => .POWERPC,
@@ -994,6 +997,7 @@ pub const Target = struct {
.armeb,
.aarch64_be,
.bpfeb,
+ .m68k,
.mips,
.mips64,
.powerpc,
@@ -1021,6 +1025,7 @@ pub const Target = struct {
.csky,
.hexagon,
.le32,
+ .m68k,
.mips,
.mipsel,
.powerpc,
@@ -1532,6 +1537,7 @@ pub const Target = struct {
.arc,
.csky,
.hexagon,
+ .m68k,
.msp430,
.r600,
.amdgcn,
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig
index 94fb1de8c..c3d281e74 100644
--- a/src/codegen/llvm.zig
+++ b/src/codegen/llvm.zig
@@ -30,6 +30,7 @@ pub fn targetTriple(allocator: *Allocator, target: std.Target) ![:0]u8 {
.bpfeb => "bpfeb",
.csky => "csky",
.hexagon => "hexagon",
+ .m68k => "m68k",
.mips => "mips",
.mipsel => "mipsel",
.mips64 => "mips64",
diff --git a/src/codegen/llvm/bindings.zig b/src/codegen/llvm/bindings.zig
index 63ac7e86a..87c3443ae 100644
--- a/src/codegen/llvm/bindings.zig
+++ b/src/codegen/llvm/bindings.zig
@@ -580,6 +580,7 @@ pub const ArchType = extern enum(c_int) {
bpfeb,
csky,
hexagon,
+ m68k,
mips,
mipsel,
mips64,
diff --git a/src/target.zig b/src/target.zig
index 25ed726fe..5eee98e73 100644
--- a/src/target.zig
+++ b/src/target.zig
@@ -243,6 +243,7 @@ pub fn archToLLVM(arch_tag: std.Target.Cpu.Arch) llvm.ArchType {
.bpfeb => .bpfeb,
.csky => .csky,
.hexagon => .hexagon,
+ .m68k => .m68k,
.mips => .mips,
.mipsel => .mipsel,
.mips64 => .mips64,
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
zig0
built againstllvm12 12.0.0-rc5