| ... | @@ -1,23 +1,23 @@ | ... | @@ -1,23 +1,23 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | | 2 | |
| 3 | pub fn __truncsfhf2(a: f32) callconv(.C) u16 { | 3 | pub fn __truncsfhf2(a: f32) callconv(.C) u16 { |
| 4 | return @bitCast(u16, truncXfYf2(f16, f32, a)); | 4 | return @bitCast(u16, @call(.{ .modifier = .always_inline }, truncXfYf2, .{ f16, f32, a })); |
| 5 | } | 5 | } |
| 6 | | 6 | |
| 7 | pub fn __truncdfhf2(a: f64) callconv(.C) u16 { | 7 | pub fn __truncdfhf2(a: f64) callconv(.C) u16 { |
| 8 | return @bitCast(u16, truncXfYf2(f16, f64, a)); | 8 | return @bitCast(u16, @call(.{ .modifier = .always_inline }, truncXfYf2, .{ f16, f64, a })); |
| 9 | } | 9 | } |
| 10 | | 10 | |
| 11 | pub fn __trunctfsf2(a: f128) callconv(.C) f32 { | 11 | pub fn __trunctfsf2(a: f128) callconv(.C) f32 { |
| 12 | return truncXfYf2(f32, f128, a); | 12 | return @call(.{ .modifier = .always_inline }, truncXfYf2, .{ f32, f128, a }); |
| 13 | } | 13 | } |
| 14 | | 14 | |
| 15 | pub fn __trunctfdf2(a: f128) callconv(.C) f64 { | 15 | pub fn __trunctfdf2(a: f128) callconv(.C) f64 { |
| 16 | return truncXfYf2(f64, f128, a); | 16 | return @call(.{ .modifier = .always_inline }, truncXfYf2, .{ f64, f128, a }); |
| 17 | } | 17 | } |
| 18 | | 18 | |
| 19 | pub fn __truncdfsf2(a: f64) callconv(.C) f32 { | 19 | pub fn __truncdfsf2(a: f64) callconv(.C) f32 { |
| 20 | return truncXfYf2(f32, f64, a); | 20 | return @call(.{ .modifier = .always_inline }, truncXfYf2, .{ f32, f64, a }); |
| 21 | } | 21 | } |
| 22 | | 22 | |
| 23 | pub fn __aeabi_d2f(a: f64) callconv(.AAPCS) f32 { | 23 | pub fn __aeabi_d2f(a: f64) callconv(.AAPCS) f32 { |
| ... | @@ -35,7 +35,7 @@ pub fn __aeabi_f2h(a: f32) callconv(.AAPCS) u16 { | ... | @@ -35,7 +35,7 @@ pub fn __aeabi_f2h(a: f32) callconv(.AAPCS) u16 { |
| 35 | return @call(.{ .modifier = .always_inline }, __truncsfhf2, .{a}); | 35 | return @call(.{ .modifier = .always_inline }, __truncsfhf2, .{a}); |
| 36 | } | 36 | } |
| 37 | | 37 | |
| 38 | inline fn truncXfYf2(comptime dst_t: type, comptime src_t: type, a: src_t) dst_t { | 38 | fn truncXfYf2(comptime dst_t: type, comptime src_t: type, a: src_t) dst_t { |
| 39 | const src_rep_t = std.meta.IntType(false, @typeInfo(src_t).Float.bits); | 39 | const src_rep_t = std.meta.IntType(false, @typeInfo(src_t).Float.bits); |
| 40 | const dst_rep_t = std.meta.IntType(false, @typeInfo(dst_t).Float.bits); | 40 | const dst_rep_t = std.meta.IntType(false, @typeInfo(dst_t).Float.bits); |
| 41 | const srcSigBits = std.math.floatMantissaBits(src_t); | 41 | const srcSigBits = std.math.floatMantissaBits(src_t); |