diff options
| author | David Rubin <daviru007@icloud.com> | 2024-03-10 19:06:37 -0700 |
|---|---|---|
| committer | David Rubin <daviru007@icloud.com> | 2024-05-11 02:17:11 -0700 |
| commit | dceff2592f6a6305770916499c688071563ddf0d (patch) | |
| tree | 421186eb8d27e095891ee211099eda57052dda20 /lib/std | |
| parent | 1550b5b16d4899cb4f7184ee3d392b4a6197ed42 (diff) | |
| download | zig-dceff2592f6a6305770916499c688071563ddf0d.tar.gz zig-dceff2592f6a6305770916499c688071563ddf0d.zip | |
riscv: initial cleanup and work
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/builtin.zig | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/std/builtin.zig b/lib/std/builtin.zig index 6354cb261a..e0e0edf906 100644 --- a/lib/std/builtin.zig +++ b/lib/std/builtin.zig @@ -759,6 +759,13 @@ else pub fn default_panic(msg: []const u8, error_return_trace: ?*StackTrace, ret_addr: ?usize) noreturn { @setCold(true); + // stage2_riscv64 backend doesn't support loops yet. + if (builtin.zig_backend == .stage2_riscv64 or + builtin.cpu.arch == .riscv64) + { + unreachable; + } + // For backends that cannot handle the language features depended on by the // default panic handler, we have a simpler panic handler: if (builtin.zig_backend == .stage2_wasm or @@ -766,7 +773,6 @@ pub fn default_panic(msg: []const u8, error_return_trace: ?*StackTrace, ret_addr builtin.zig_backend == .stage2_aarch64 or builtin.zig_backend == .stage2_x86 or (builtin.zig_backend == .stage2_x86_64 and (builtin.target.ofmt != .elf and builtin.target.ofmt != .macho)) or - builtin.zig_backend == .stage2_riscv64 or builtin.zig_backend == .stage2_sparc64 or builtin.zig_backend == .stage2_spirv64) { |
