aboutsummaryrefslogtreecommitdiff
path: root/lib/compiler_rt/addf3.zig
diff options
context:
space:
mode:
authorVeikka Tuominen <git@vexu.eu>2022-08-21 17:24:04 +0300
committerVeikka Tuominen <git@vexu.eu>2022-08-22 11:19:20 +0300
commit62ff8871ed9c8c4e46d8acd1d227ed3fb802be7f (patch)
treeb5bdd3f092ebc0b7e9c260df798b7019f69cdae7 /lib/compiler_rt/addf3.zig
parent6c020cdb767192757b6c4b43e2f14c5394760431 (diff)
downloadzig-62ff8871ed9c8c4e46d8acd1d227ed3fb802be7f.tar.gz
zig-62ff8871ed9c8c4e46d8acd1d227ed3fb802be7f.zip
stage2+stage1: remove type parameter from bit builtins
Closes #12529 Closes #12511 Closes #6835
Diffstat (limited to 'lib/compiler_rt/addf3.zig')
-rw-r--r--lib/compiler_rt/addf3.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/compiler_rt/addf3.zig b/lib/compiler_rt/addf3.zig
index 7f2e368121..8edfef9838 100644
--- a/lib/compiler_rt/addf3.zig
+++ b/lib/compiler_rt/addf3.zig
@@ -9,7 +9,7 @@ const normalize = common.normalize;
pub inline fn addf3(comptime T: type, a: T, b: T) T {
const bits = @typeInfo(T).Float.bits;
const Z = std.meta.Int(.unsigned, bits);
- const S = std.meta.Int(.unsigned, bits - @clz(Z, @as(Z, bits) - 1));
+ const S = std.meta.Int(.unsigned, bits - @clz(@as(Z, bits) - 1));
const typeWidth = bits;
const significandBits = math.floatMantissaBits(T);
@@ -118,7 +118,7 @@ pub inline fn addf3(comptime T: type, a: T, b: T) T {
// If partial cancellation occured, we need to left-shift the result
// and adjust the exponent:
if (aSignificand < integerBit << 3) {
- const shift = @intCast(i32, @clz(Z, aSignificand)) - @intCast(i32, @clz(std.meta.Int(.unsigned, bits), integerBit << 3));
+ const shift = @intCast(i32, @clz(aSignificand)) - @intCast(i32, @clz(integerBit << 3));
aSignificand <<= @intCast(S, shift);
aExponent -= shift;
}