diff --git a/lib/compiler_rt/extendhfsf2.zig b/lib/compiler_rt/extendhfsf2.zig index 0c204ec1881d9b34632cb4b874614986d5da4f12..f019b42cb622905047f4e2f87eb397fc9d76fd0c 100644 --- a/lib/compiler_rt/extendhfsf2.zig +++ b/lib/compiler_rt/extendhfsf2.zig @@ -5,7 +5,7 @@ pub const panic = common.panic; comptime { if (common.gnu_f16_abi) { - @export(__extendhfsf2, .{ .name = "__gnu_h2f_ieee", .linkage = common.linkage }); + @export(__gnu_h2f_ieee, .{ .name = "__gnu_h2f_ieee", .linkage = common.linkage }); } else if (common.want_aeabi) { @export(__aeabi_h2f, .{ .name = "__aeabi_h2f", .linkage = common.linkage }); } @@ -16,6 +16,10 @@ pub fn __extendhfsf2(a: common.F16T) callconv(.C) f32 { return extendf(f32, f16, @bitCast(u16, a)); } +fn __gnu_h2f_ieee(a: common.F16T) callconv(.C) f32 { + return extendf(f32, f16, @bitCast(u16, a)); +} + fn __aeabi_h2f(a: u16) callconv(.AAPCS) f32 { return extendf(f32, f16, @bitCast(u16, a)); } diff --git a/lib/compiler_rt/truncsfhf2.zig b/lib/compiler_rt/truncsfhf2.zig index 010e257923eb88394933029693fe8e9390532662..403306979ce06d97d86b50fdc591b7dd0445b151 100644 --- a/lib/compiler_rt/truncsfhf2.zig +++ b/lib/compiler_rt/truncsfhf2.zig @@ -5,7 +5,7 @@ pub const panic = common.panic; comptime { if (common.gnu_f16_abi) { - @export(__truncsfhf2, .{ .name = "__gnu_f2h_ieee", .linkage = common.linkage }); + @export(__gnu_f2h_ieee, .{ .name = "__gnu_f2h_ieee", .linkage = common.linkage }); } else if (common.want_aeabi) { @export(__aeabi_f2h, .{ .name = "__aeabi_f2h", .linkage = common.linkage }); } @@ -16,6 +16,10 @@ pub fn __truncsfhf2(a: f32) callconv(.C) common.F16T { return @bitCast(common.F16T, truncf(f16, f32, a)); } +fn __gnu_f2h_ieee(a: f32) callconv(.C) common.F16T { + return @bitCast(common.F16T, truncf(f16, f32, a)); +} + fn __aeabi_f2h(a: f32) callconv(.AAPCS) u16 { return @bitCast(common.F16T, truncf(f16, f32, a)); }