| ... | @@ -767,13 +767,31 @@ pub fn default_panic(msg: []const u8, error_return_trace: ?*StackTrace, ret_addr | ... | @@ -767,13 +767,31 @@ pub fn default_panic(msg: []const u8, error_return_trace: ?*StackTrace, ret_addr |
| 767 | builtin.zig_backend == .stage2_x86 or | 767 | builtin.zig_backend == .stage2_x86 or |
| 768 | (builtin.zig_backend == .stage2_x86_64 and (builtin.target.ofmt != .elf and builtin.target.ofmt != .macho)) or | 768 | (builtin.zig_backend == .stage2_x86_64 and (builtin.target.ofmt != .elf and builtin.target.ofmt != .macho)) or |
| 769 | builtin.zig_backend == .stage2_sparc64 or | 769 | builtin.zig_backend == .stage2_sparc64 or |
| 770 | builtin.zig_backend == .stage2_spirv64 or | 770 | builtin.zig_backend == .stage2_spirv64) |
| 771 | builtin.zig_backend == .stage2_riscv64) | | |
| 772 | { | 771 | { |
| 773 | while (true) { | 772 | while (true) { |
| 774 | @breakpoint(); | 773 | @breakpoint(); |
| 775 | } | 774 | } |
| 776 | } | 775 | } |
| | 776 | |
| | 777 | if (builtin.zig_backend == .stage2_riscv64) { |
| | 778 | asm volatile ("ecall" |
| | 779 | : |
| | 780 | : [number] "{a7}" (64), |
| | 781 | [arg1] "{a0}" (1), |
| | 782 | [arg2] "{a1}" (@intFromPtr("panicking!\n")), |
| | 783 | [arg3] "{a2}" ("panicking!\n".len), |
| | 784 | : "rcx", "r11", "memory" |
| | 785 | ); |
| | 786 | asm volatile ("ecall" |
| | 787 | : |
| | 788 | : [number] "{a7}" (94), |
| | 789 | [arg1] "{a0}" (127), |
| | 790 | : "rcx", "r11", "memory" |
| | 791 | ); |
| | 792 | unreachable; |
| | 793 | } |
| | 794 | |
| 777 | switch (builtin.os.tag) { | 795 | switch (builtin.os.tag) { |
| 778 | .freestanding => { | 796 | .freestanding => { |
| 779 | while (true) { | 797 | while (true) { |