From bfbfb7b3b04b9c98dd14f932b08d1c058e2c5b25 Mon Sep 17 00:00:00 2001 From: vegecode Date: Sun, 31 Mar 2019 21:00:36 -0500 Subject: [PATCH] Remove inline keywords in addXf3.zig pending #2154 --- std/special/compiler_rt/addXf3.zig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/std/special/compiler_rt/addXf3.zig b/std/special/compiler_rt/addXf3.zig index 37c910bd45..3a70461eca 100644 --- a/std/special/compiler_rt/addXf3.zig +++ b/std/special/compiler_rt/addXf3.zig @@ -33,7 +33,8 @@ pub extern fn __subtf3(a: f128, b: f128) f128 { return addXf3(f128, a, neg_b); } -inline fn normalize(comptime T: type, significand: *@IntType(false, T.bit_count)) i32 { +// TODO: restore inline keyword, see: https://github.com/ziglang/zig/issues/2154 +fn normalize(comptime T: type, significand: *@IntType(false, T.bit_count)) i32 { const Z = @IntType(false, T.bit_count); const S = @IntType(false, T.bit_count - @clz(Z(T.bit_count) - 1)); const significandBits = std.math.floatMantissaBits(T); @@ -44,7 +45,8 @@ inline fn normalize(comptime T: type, significand: *@IntType(false, T.bit_count) return 1 - shift; } -inline fn addXf3(comptime T: type, a: T, b: T) T { +// TODO: restore inline keyword, see: https://github.com/ziglang/zig/issues/2154 +fn addXf3(comptime T: type, a: T, b: T) T { const Z = @IntType(false, T.bit_count); const S = @IntType(false, T.bit_count - @clz(Z(T.bit_count) - 1));