Commit 1c02e58fc0
Changed files (3)
src
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 '+'),
- std.math.absCast(rip.disp),
+ @abs(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}", .{std.math.absCast(sib.disp)});
+ try writer.print("0x{x}", .{@abs(sib.disp)});
any = true;
}
src/Sema.zig
@@ -37530,7 +37530,7 @@ fn float128IntPartToBigInt(
float: f128,
) !std.math.big.int.Managed {
const is_negative = std.math.signbit(float);
- const floored = @floor(@fabs(float));
+ const floored = @floor(@abs(float));
var rational = try std.math.big.Rational.init(arena);
defer rational.q.deinit();
src/value.zig
@@ -1989,7 +1989,7 @@ pub const Value = struct {
return 1;
}
- const w_value = @fabs(scalar);
+ const w_value = @abs(scalar);
return @divFloor(@as(std.math.big.Limb, @intFromFloat(std.math.log2(w_value))), @typeInfo(std.math.big.Limb).Int.bits) + 1;
}
@@ -3741,11 +3741,11 @@ pub const Value = struct {
.ComptimeFloat, .Float => {
const target = mod.getTarget();
const storage: InternPool.Key.Float.Storage = switch (ty.floatBits(target)) {
- 16 => .{ .f16 = @fabs(val.toFloat(f16, mod)) },
- 32 => .{ .f32 = @fabs(val.toFloat(f32, mod)) },
- 64 => .{ .f64 = @fabs(val.toFloat(f64, mod)) },
- 80 => .{ .f80 = @fabs(val.toFloat(f80, mod)) },
- 128 => .{ .f128 = @fabs(val.toFloat(f128, mod)) },
+ 16 => .{ .f16 = @abs(val.toFloat(f16, mod)) },
+ 32 => .{ .f32 = @abs(val.toFloat(f32, mod)) },
+ 64 => .{ .f64 = @abs(val.toFloat(f64, mod)) },
+ 80 => .{ .f80 = @abs(val.toFloat(f80, mod)) },
+ 128 => .{ .f128 = @abs(val.toFloat(f128, mod)) },
else => unreachable,
};
return (try mod.intern(.{ .float = .{