diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-09-27 11:21:59 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-09-27 11:21:59 -0700 |
| commit | 21780899eb17a0cb795ff40e5fae6556c38ea13e (patch) | |
| tree | ebcc838e5f251525413a67f904890f9756ec9b49 /src/arch | |
| parent | 6a29646a553a93fc6a4cbf0fee5fa5362483c326 (diff) | |
| download | zig-21780899eb17a0cb795ff40e5fae6556c38ea13e.tar.gz zig-21780899eb17a0cb795ff40e5fae6556c38ea13e.zip | |
compiler: don't use `@abs` builtin yet
This commit can be used to rebuild zig1.wasm
Diffstat (limited to 'src/arch')
| -rw-r--r-- | src/arch/x86_64/encoder.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/arch/x86_64/encoder.zig b/src/arch/x86_64/encoder.zig index 0923a43a77..bc4c59dc86 100644 --- a/src/arch/x86_64/encoder.zig +++ b/src/arch/x86_64/encoder.zig @@ -105,7 +105,7 @@ pub const Instruction = struct { try writer.print("{s} ptr [rip", .{@tagName(rip.ptr_size)}); if (rip.disp != 0) try writer.print(" {c} 0x{x}", .{ @as(u8, if (rip.disp < 0) '-' else '+'), - @abs(rip.disp), + std.math.absCast(rip.disp), }); try writer.writeByte(']'); }, @@ -140,7 +140,7 @@ pub const Instruction = struct { try writer.print(" {c} ", .{@as(u8, if (sib.disp < 0) '-' else '+')}) else if (sib.disp < 0) try writer.writeByte('-'); - try writer.print("0x{x}", .{@abs(sib.disp)}); + try writer.print("0x{x}", .{std.math.absCast(sib.disp)}); any = true; } |
