stage2: sparcv9: Register the backend in stdlib & driver

This commit is contained in:
Koakuma 2022-04-10 20:10:06 +07:00
parent cfd389f927
commit 1f63afa7c9
3 changed files with 7 additions and 1 deletions

View File

@ -716,6 +716,9 @@ pub const CompilerBackend = enum(u64) {
/// The reference implementation self-hosted compiler of Zig, using the
/// riscv64 backend.
stage2_riscv64 = 9,
/// The reference implementation self-hosted compiler of Zig, using the
/// sparcv9 backend.
stage2_sparcv9 = 10,
_,
};
@ -761,7 +764,8 @@ pub fn default_panic(msg: []const u8, error_return_trace: ?*StackTrace) noreturn
builtin.zig_backend == .stage2_aarch64 or
builtin.zig_backend == .stage2_x86_64 or
builtin.zig_backend == .stage2_x86 or
builtin.zig_backend == .stage2_riscv64)
builtin.zig_backend == .stage2_riscv64 or
builtin.zig_backend == .stage2_sparcv9)
{
while (true) {
@breakpoint();

View File

@ -29,6 +29,7 @@ comptime {
builtin.zig_backend == .stage2_aarch64 or
builtin.zig_backend == .stage2_arm or
builtin.zig_backend == .stage2_riscv64 or
builtin.zig_backend == .stage2_sparcv9 or
(builtin.zig_backend == .stage2_llvm and native_os != .linux) or
(builtin.zig_backend == .stage2_llvm and native_arch != .x86_64))
{

View File

@ -4531,6 +4531,7 @@ pub fn generateBuiltinZigSource(comp: *Compilation, allocator: Allocator) Alloca
.i386 => .stage2_x86,
.aarch64, .aarch64_be, .aarch64_32 => .stage2_aarch64,
.riscv64 => .stage2_riscv64,
.sparcv9 => .stage2_sparcv9,
else => .other,
};
};