| ... | @@ -33,7 +33,8 @@ pub extern fn __subtf3(a: f128, b: f128) f128 { | ... | @@ -33,7 +33,8 @@ pub extern fn __subtf3(a: f128, b: f128) f128 { |
| 33 | return addXf3(f128, a, neg_b); | 33 | return addXf3(f128, a, neg_b); |
| 34 | } | 34 | } |
| 35 | | 35 | |
| 36 | inline fn normalize(comptime T: type, significand: *@IntType(false, T.bit_count)) i32 { | 36 | // TODO: restore inline keyword, see: https://github.com/ziglang/zig/issues/2154 |
| | 37 | fn normalize(comptime T: type, significand: *@IntType(false, T.bit_count)) i32 { |
| 37 | const Z = @IntType(false, T.bit_count); | 38 | const Z = @IntType(false, T.bit_count); |
| 38 | const S = @IntType(false, T.bit_count - @clz(Z(T.bit_count) - 1)); | 39 | const S = @IntType(false, T.bit_count - @clz(Z(T.bit_count) - 1)); |
| 39 | const significandBits = std.math.floatMantissaBits(T); | 40 | const significandBits = std.math.floatMantissaBits(T); |
| ... | @@ -44,7 +45,8 @@ inline fn normalize(comptime T: type, significand: *@IntType(false, T.bit_count) | ... | @@ -44,7 +45,8 @@ inline fn normalize(comptime T: type, significand: *@IntType(false, T.bit_count) |
| 44 | return 1 - shift; | 45 | return 1 - shift; |
| 45 | } | 46 | } |
| 46 | | 47 | |
| 47 | inline fn addXf3(comptime T: type, a: T, b: T) T { | 48 | // TODO: restore inline keyword, see: https://github.com/ziglang/zig/issues/2154 |
| | 49 | fn addXf3(comptime T: type, a: T, b: T) T { |
| 48 | const Z = @IntType(false, T.bit_count); | 50 | const Z = @IntType(false, T.bit_count); |
| 49 | const S = @IntType(false, T.bit_count - @clz(Z(T.bit_count) - 1)); | 51 | const S = @IntType(false, T.bit_count - @clz(Z(T.bit_count) - 1)); |
| 50 | | 52 | |