authorgravatar for koachan@protonmail.comKoakuma <koachan@protonmail.com> 2022-04-10 20:10:06+07:00
committergravatar for koachan@protonmail.comKoakuma <koachan@protonmail.com> 2022-04-14 22:18:06+07:00
log1f63afa7c9f57a4d7657890841bdca10c3763534
tree6e5cabc565c23253b08683077b55609af617a24e
parentcfd389f927112cbc81e71118493a7b9fba18192d

stage2: sparcv9: Register the backend in stdlib & driver


3 files changed, 7 insertions(+), 1 deletions(-)

lib/std/builtin.zig+5-1
......@@ -716,6 +716,9 @@ pub const CompilerBackend = enum(u64) {
716716 /// The reference implementation self-hosted compiler of Zig, using the
717717 /// riscv64 backend.
718718 stage2_riscv64 = 9,
719 /// The reference implementation self-hosted compiler of Zig, using the
720 /// sparcv9 backend.
721 stage2_sparcv9 = 10,
719722
720723 _,
721724};
......@@ -761,7 +764,8 @@ pub fn default_panic(msg: []const u8, error_return_trace: ?*StackTrace) noreturn
761764 builtin.zig_backend == .stage2_aarch64 or
762765 builtin.zig_backend == .stage2_x86_64 or
763766 builtin.zig_backend == .stage2_x86 or
764 builtin.zig_backend == .stage2_riscv64)
767 builtin.zig_backend == .stage2_riscv64 or
768 builtin.zig_backend == .stage2_sparcv9)
765769 {
766770 while (true) {
767771 @breakpoint();
lib/std/start.zig+1
......@@ -29,6 +29,7 @@ comptime {
2929 builtin.zig_backend == .stage2_aarch64 or
3030 builtin.zig_backend == .stage2_arm or
3131 builtin.zig_backend == .stage2_riscv64 or
32 builtin.zig_backend == .stage2_sparcv9 or
3233 (builtin.zig_backend == .stage2_llvm and native_os != .linux) or
3334 (builtin.zig_backend == .stage2_llvm and native_arch != .x86_64))
3435 {
src/Compilation.zig+1
......@@ -4531,6 +4531,7 @@ pub fn generateBuiltinZigSource(comp: *Compilation, allocator: Allocator) Alloca
45314531 .i386 => .stage2_x86,
45324532 .aarch64, .aarch64_be, .aarch64_32 => .stage2_aarch64,
45334533 .riscv64 => .stage2_riscv64,
4534 .sparcv9 => .stage2_sparcv9,
45344535 else => .other,
45354536 };
45364537 };