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) {...@@ -716,6 +716,9 @@ pub const CompilerBackend = enum(u64) {
716 /// The reference implementation self-hosted compiler of Zig, using the716 /// The reference implementation self-hosted compiler of Zig, using the
717 /// riscv64 backend.717 /// riscv64 backend.
718 stage2_riscv64 = 9,718 stage2_riscv64 = 9,
719 /// The reference implementation self-hosted compiler of Zig, using the
720 /// sparcv9 backend.
721 stage2_sparcv9 = 10,
719722
720 _,723 _,
721};724};
...@@ -761,7 +764,8 @@ pub fn default_panic(msg: []const u8, error_return_trace: ?*StackTrace) noreturn...@@ -761,7 +764,8 @@ pub fn default_panic(msg: []const u8, error_return_trace: ?*StackTrace) noreturn
761 builtin.zig_backend == .stage2_aarch64 or764 builtin.zig_backend == .stage2_aarch64 or
762 builtin.zig_backend == .stage2_x86_64 or765 builtin.zig_backend == .stage2_x86_64 or
763 builtin.zig_backend == .stage2_x86 or766 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)
765 {769 {
766 while (true) {770 while (true) {
767 @breakpoint();771 @breakpoint();
lib/std/start.zig+1
...@@ -29,6 +29,7 @@ comptime {...@@ -29,6 +29,7 @@ comptime {
29 builtin.zig_backend == .stage2_aarch64 or29 builtin.zig_backend == .stage2_aarch64 or
30 builtin.zig_backend == .stage2_arm or30 builtin.zig_backend == .stage2_arm or
31 builtin.zig_backend == .stage2_riscv64 or31 builtin.zig_backend == .stage2_riscv64 or
32 builtin.zig_backend == .stage2_sparcv9 or
32 (builtin.zig_backend == .stage2_llvm and native_os != .linux) or33 (builtin.zig_backend == .stage2_llvm and native_os != .linux) or
33 (builtin.zig_backend == .stage2_llvm and native_arch != .x86_64))34 (builtin.zig_backend == .stage2_llvm and native_arch != .x86_64))
34 {35 {
src/Compilation.zig+1
...@@ -4531,6 +4531,7 @@ pub fn generateBuiltinZigSource(comp: *Compilation, allocator: Allocator) Alloca...@@ -4531,6 +4531,7 @@ pub fn generateBuiltinZigSource(comp: *Compilation, allocator: Allocator) Alloca
4531 .i386 => .stage2_x86,4531 .i386 => .stage2_x86,
4532 .aarch64, .aarch64_be, .aarch64_32 => .stage2_aarch64,4532 .aarch64, .aarch64_be, .aarch64_32 => .stage2_aarch64,
4533 .riscv64 => .stage2_riscv64,4533 .riscv64 => .stage2_riscv64,
4534 .sparcv9 => .stage2_sparcv9,
4534 else => .other,4535 else => .other,
4535 };4536 };
4536 };4537 };