diff options
| author | David Rubin <daviru007@icloud.com> | 2024-03-13 21:02:15 -0700 |
|---|---|---|
| committer | David Rubin <daviru007@icloud.com> | 2024-05-11 02:17:11 -0700 |
| commit | 28df64cba45595a201f8c2312656922a8c28a67c (patch) | |
| tree | 13679895113da1e2fa0199e1b117060bbed880cf /lib | |
| parent | 060c475fcd358eb9d05d14ec9f1bb7bfc47e4423 (diff) | |
| download | zig-28df64cba45595a201f8c2312656922a8c28a67c.tar.gz zig-28df64cba45595a201f8c2312656922a8c28a67c.zip | |
riscv: implement `@abs`
- add the `abs` MIR instruction
- implement `@abs` by shifting to the right by `bits - 1`, and xoring.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/std/builtin.zig | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/std/builtin.zig b/lib/std/builtin.zig index e0e0edf906..b28e17e38b 100644 --- a/lib/std/builtin.zig +++ b/lib/std/builtin.zig @@ -760,9 +760,7 @@ pub fn default_panic(msg: []const u8, error_return_trace: ?*StackTrace, ret_addr @setCold(true); // stage2_riscv64 backend doesn't support loops yet. - if (builtin.zig_backend == .stage2_riscv64 or - builtin.cpu.arch == .riscv64) - { + if (builtin.zig_backend == .stage2_riscv64) { unreachable; } |
