From c50f33b1118f2e81597bd9ef5976fcb3eb961dee Mon Sep 17 00:00:00 2001 From: Cody Tapscott Date: Sat, 22 Oct 2022 13:31:09 -0700 Subject: [PATCH] compiler_rt: Always export "standard" symbol names The Zig LLVM backend emits calls to softfloat methods with the "standard compiler-rt" names. Rather than add complexity to the backend and have to synchronize the naming scheme across all targets, the simplest fix is just to export these symbols under both the "standard" and the platform-specific naming convention. --- lib/compiler_rt/addtf3.zig | 9 ++------- lib/compiler_rt/ceil.zig | 6 ++++-- lib/compiler_rt/cmptf2.zig | 35 +++++++++------------------------ lib/compiler_rt/cos.zig | 6 ++++-- lib/compiler_rt/divtf3.zig | 10 +++------- lib/compiler_rt/exp.zig | 6 ++++-- lib/compiler_rt/exp2.zig | 6 ++++-- lib/compiler_rt/extenddftf2.zig | 9 ++------- lib/compiler_rt/extendsftf2.zig | 9 ++------- lib/compiler_rt/fabs.zig | 6 ++++-- lib/compiler_rt/fixtfdi.zig | 9 ++------- lib/compiler_rt/fixtfsi.zig | 9 ++------- lib/compiler_rt/fixunstfdi.zig | 9 ++------- lib/compiler_rt/fixunstfsi.zig | 9 ++------- lib/compiler_rt/floatditf.zig | 9 ++------- lib/compiler_rt/floatsitf.zig | 9 ++------- lib/compiler_rt/floatunditf.zig | 9 ++------- lib/compiler_rt/floatunsitf.zig | 9 ++------- lib/compiler_rt/floatuntitf.zig | 9 +++++---- lib/compiler_rt/floor.zig | 6 ++++-- lib/compiler_rt/fma.zig | 6 ++++-- lib/compiler_rt/fmax.zig | 6 ++++-- lib/compiler_rt/fmin.zig | 6 ++++-- lib/compiler_rt/fmod.zig | 6 ++++-- lib/compiler_rt/getf2.zig | 17 ++++------------ lib/compiler_rt/log.zig | 6 ++++-- lib/compiler_rt/log10.zig | 6 ++++-- lib/compiler_rt/log2.zig | 6 ++++-- lib/compiler_rt/multf3.zig | 9 ++------- lib/compiler_rt/round.zig | 6 ++++-- lib/compiler_rt/sin.zig | 6 ++++-- lib/compiler_rt/sincos.zig | 6 ++++-- lib/compiler_rt/sqrt.zig | 6 ++++-- lib/compiler_rt/subtf3.zig | 9 ++------- lib/compiler_rt/trunc.zig | 6 ++++-- lib/compiler_rt/trunctfdf2.zig | 9 ++------- lib/compiler_rt/trunctfsf2.zig | 9 ++------- lib/compiler_rt/unordtf2.zig | 9 ++------- 38 files changed, 125 insertions(+), 198 deletions(-) diff --git a/lib/compiler_rt/addtf3.zig b/lib/compiler_rt/addtf3.zig index 2a22493ded3112cf36180fb92313a29c5e6d134c..15c450e193d5e70e94c79ba4310870c4da14f4b8 100644 --- a/lib/compiler_rt/addtf3.zig +++ b/lib/compiler_rt/addtf3.zig @@ -5,22 +5,17 @@ pub const panic = common.panic; comptime { if (common.want_ppc_abi) { - @export(__addkf3, .{ .name = "__addkf3", .linkage = common.linkage }); + @export(__addtf3, .{ .name = "__addkf3", .linkage = common.linkage }); } else if (common.want_sparc_abi) { @export(_Qp_add, .{ .name = "_Qp_add", .linkage = common.linkage }); - } else { - @export(__addtf3, .{ .name = "__addtf3", .linkage = common.linkage }); } + @export(__addtf3, .{ .name = "__addtf3", .linkage = common.linkage }); } pub fn __addtf3(a: f128, b: f128) callconv(.C) f128 { return addf3(f128, a, b); } -fn __addkf3(a: f128, b: f128) callconv(.C) f128 { - return addf3(f128, a, b); -} - fn _Qp_add(c: *f128, a: *f128, b: *f128) callconv(.C) void { c.* = addf3(f128, a.*, b.*); } diff --git a/lib/compiler_rt/ceil.zig b/lib/compiler_rt/ceil.zig index 406f61fbb969f80d695577b58a75fd81f7222dd5..6622546501047775a9594de60f1b592e920b77de 100644 --- a/lib/compiler_rt/ceil.zig +++ b/lib/compiler_rt/ceil.zig @@ -18,8 +18,10 @@ comptime { @export(ceilf, .{ .name = "ceilf", .linkage = common.linkage }); @export(ceil, .{ .name = "ceil", .linkage = common.linkage }); @export(__ceilx, .{ .name = "__ceilx", .linkage = common.linkage }); - const ceilq_sym_name = if (common.want_ppc_abi) "ceilf128" else "ceilq"; - @export(ceilq, .{ .name = ceilq_sym_name, .linkage = common.linkage }); + if (common.want_ppc_abi) { + @export(ceilq, .{ .name = "ceilf128", .linkage = common.linkage }); + } + @export(ceilq, .{ .name = "ceilq", .linkage = common.linkage }); @export(ceill, .{ .name = "ceill", .linkage = common.linkage }); } diff --git a/lib/compiler_rt/cmptf2.zig b/lib/compiler_rt/cmptf2.zig index 00263f943a3b44eed3a8d75995bea4888ca38cd2..98137e3dfcdb4a115cf998c61e6936f84b9788c6 100644 --- a/lib/compiler_rt/cmptf2.zig +++ b/lib/compiler_rt/cmptf2.zig @@ -7,10 +7,10 @@ pub const panic = common.panic; comptime { if (common.want_ppc_abi) { - @export(__eqkf2, .{ .name = "__eqkf2", .linkage = common.linkage }); - @export(__nekf2, .{ .name = "__nekf2", .linkage = common.linkage }); - @export(__ltkf2, .{ .name = "__ltkf2", .linkage = common.linkage }); - @export(__lekf2, .{ .name = "__lekf2", .linkage = common.linkage }); + @export(__eqtf2, .{ .name = "__eqkf2", .linkage = common.linkage }); + @export(__netf2, .{ .name = "__nekf2", .linkage = common.linkage }); + @export(__lttf2, .{ .name = "__ltkf2", .linkage = common.linkage }); + @export(__letf2, .{ .name = "__lekf2", .linkage = common.linkage }); } else if (common.want_sparc_abi) { @export(_Qp_cmp, .{ .name = "_Qp_cmp", .linkage = common.linkage }); @export(_Qp_feq, .{ .name = "_Qp_feq", .linkage = common.linkage }); @@ -19,13 +19,12 @@ comptime { @export(_Qp_fle, .{ .name = "_Qp_fle", .linkage = common.linkage }); @export(_Qp_fgt, .{ .name = "_Qp_fgt", .linkage = common.linkage }); @export(_Qp_fge, .{ .name = "_Qp_fge", .linkage = common.linkage }); - } else { - @export(__eqtf2, .{ .name = "__eqtf2", .linkage = common.linkage }); - @export(__netf2, .{ .name = "__netf2", .linkage = common.linkage }); - @export(__letf2, .{ .name = "__letf2", .linkage = common.linkage }); - @export(__cmptf2, .{ .name = "__cmptf2", .linkage = common.linkage }); - @export(__lttf2, .{ .name = "__lttf2", .linkage = common.linkage }); } + @export(__eqtf2, .{ .name = "__eqtf2", .linkage = common.linkage }); + @export(__netf2, .{ .name = "__netf2", .linkage = common.linkage }); + @export(__letf2, .{ .name = "__letf2", .linkage = common.linkage }); + @export(__cmptf2, .{ .name = "__cmptf2", .linkage = common.linkage }); + @export(__lttf2, .{ .name = "__lttf2", .linkage = common.linkage }); } /// "These functions calculate a <=> b. That is, if a is less than b, they return -1; @@ -64,22 +63,6 @@ fn __lttf2(a: f128, b: f128) callconv(.C) i32 { return __cmptf2(a, b); } -fn __eqkf2(a: f128, b: f128) callconv(.C) i32 { - return __cmptf2(a, b); -} - -fn __nekf2(a: f128, b: f128) callconv(.C) i32 { - return __cmptf2(a, b); -} - -fn __ltkf2(a: f128, b: f128) callconv(.C) i32 { - return __cmptf2(a, b); -} - -fn __lekf2(a: f128, b: f128) callconv(.C) i32 { - return __cmptf2(a, b); -} - const SparcFCMP = enum(i32) { Equal = 0, Less = 1, diff --git a/lib/compiler_rt/cos.zig b/lib/compiler_rt/cos.zig index 311d9271688fcb5a481acc895d9e44a80ddc1e84..664f6550a4ed431a14c5d17ca5c197c75ac7ca20 100644 --- a/lib/compiler_rt/cos.zig +++ b/lib/compiler_rt/cos.zig @@ -16,8 +16,10 @@ comptime { @export(cosf, .{ .name = "cosf", .linkage = common.linkage }); @export(cos, .{ .name = "cos", .linkage = common.linkage }); @export(__cosx, .{ .name = "__cosx", .linkage = common.linkage }); - const cosq_sym_name = if (common.want_ppc_abi) "cosf128" else "cosq"; - @export(cosq, .{ .name = cosq_sym_name, .linkage = common.linkage }); + if (common.want_ppc_abi) { + @export(cosq, .{ .name = "cosf128", .linkage = common.linkage }); + } + @export(cosq, .{ .name = "cosq", .linkage = common.linkage }); @export(cosl, .{ .name = "cosl", .linkage = common.linkage }); } diff --git a/lib/compiler_rt/divtf3.zig b/lib/compiler_rt/divtf3.zig index b6cabeab91aaf4dc539f1c0e60f7fa3d47fd33ea..736068e81977c74c5a84997eb4a57b72f783e5a0 100644 --- a/lib/compiler_rt/divtf3.zig +++ b/lib/compiler_rt/divtf3.zig @@ -9,22 +9,18 @@ pub const panic = common.panic; comptime { if (common.want_ppc_abi) { - @export(__divkf3, .{ .name = "__divkf3", .linkage = common.linkage }); + // TODO: why did this not error? + @export(__divtf3, .{ .name = "__divkf3", .linkage = common.linkage }); } else if (common.want_sparc_abi) { @export(_Qp_div, .{ .name = "_Qp_div", .linkage = common.linkage }); - } else { - @export(__divtf3, .{ .name = "__divtf3", .linkage = common.linkage }); } + @export(__divtf3, .{ .name = "__divtf3", .linkage = common.linkage }); } pub fn __divtf3(a: f128, b: f128) callconv(.C) f128 { return div(a, b); } -fn __divkf3(a: f128, b: f128) callconv(.C) f128 { - return div(a, b); -} - fn _Qp_div(c: *f128, a: *const f128, b: *const f128) callconv(.C) void { c.* = div(a.*, b.*); } diff --git a/lib/compiler_rt/exp.zig b/lib/compiler_rt/exp.zig index f34f226be4593eeff20e55424149405ab064d1fe..7dfac7328ca817215b421f5714aa1cbaf3e23fe6 100644 --- a/lib/compiler_rt/exp.zig +++ b/lib/compiler_rt/exp.zig @@ -18,8 +18,10 @@ comptime { @export(expf, .{ .name = "expf", .linkage = common.linkage }); @export(exp, .{ .name = "exp", .linkage = common.linkage }); @export(__expx, .{ .name = "__expx", .linkage = common.linkage }); - const expq_sym_name = if (common.want_ppc_abi) "expf128" else "expq"; - @export(expq, .{ .name = expq_sym_name, .linkage = common.linkage }); + if (common.want_ppc_abi) { + @export(expq, .{ .name = "expf128", .linkage = common.linkage }); + } + @export(expq, .{ .name = "expq", .linkage = common.linkage }); @export(expl, .{ .name = "expl", .linkage = common.linkage }); } diff --git a/lib/compiler_rt/exp2.zig b/lib/compiler_rt/exp2.zig index e89a918501426e0575ab91155becbd86f49d175d..daca339baecc1de078a06f0152274c0a01720110 100644 --- a/lib/compiler_rt/exp2.zig +++ b/lib/compiler_rt/exp2.zig @@ -18,8 +18,10 @@ comptime { @export(exp2f, .{ .name = "exp2f", .linkage = common.linkage }); @export(exp2, .{ .name = "exp2", .linkage = common.linkage }); @export(__exp2x, .{ .name = "__exp2x", .linkage = common.linkage }); - const exp2q_sym_name = if (common.want_ppc_abi) "exp2f128" else "exp2q"; - @export(exp2q, .{ .name = exp2q_sym_name, .linkage = common.linkage }); + if (common.want_ppc_abi) { + @export(exp2q, .{ .name = "exp2f128", .linkage = common.linkage }); + } + @export(exp2q, .{ .name = "exp2q", .linkage = common.linkage }); @export(exp2l, .{ .name = "exp2l", .linkage = common.linkage }); } diff --git a/lib/compiler_rt/extenddftf2.zig b/lib/compiler_rt/extenddftf2.zig index 21e497b3a43f1701d890d2aa332cfd09f0026679..3005987530795d9635a2a58936bc3136701622b5 100644 --- a/lib/compiler_rt/extenddftf2.zig +++ b/lib/compiler_rt/extenddftf2.zig @@ -5,22 +5,17 @@ pub const panic = common.panic; comptime { if (common.want_ppc_abi) { - @export(__extenddfkf2, .{ .name = "__extenddfkf2", .linkage = common.linkage }); + @export(__extenddftf2, .{ .name = "__extenddfkf2", .linkage = common.linkage }); } else if (common.want_sparc_abi) { @export(_Qp_dtoq, .{ .name = "_Qp_dtoq", .linkage = common.linkage }); - } else { - @export(__extenddftf2, .{ .name = "__extenddftf2", .linkage = common.linkage }); } + @export(__extenddftf2, .{ .name = "__extenddftf2", .linkage = common.linkage }); } pub fn __extenddftf2(a: f64) callconv(.C) f128 { return extendf(f128, f64, @bitCast(u64, a)); } -fn __extenddfkf2(a: f64) callconv(.C) f128 { - return extendf(f128, f64, @bitCast(u64, a)); -} - fn _Qp_dtoq(c: *f128, a: f64) callconv(.C) void { c.* = extendf(f128, f64, @bitCast(u64, a)); } diff --git a/lib/compiler_rt/extendsftf2.zig b/lib/compiler_rt/extendsftf2.zig index acdc0d586d75f255bbba17a35c9056811ffb9d17..68b07470423a61b5130e20df5bcd0d755bb1c3dc 100644 --- a/lib/compiler_rt/extendsftf2.zig +++ b/lib/compiler_rt/extendsftf2.zig @@ -5,22 +5,17 @@ pub const panic = common.panic; comptime { if (common.want_ppc_abi) { - @export(__extendsfkf2, .{ .name = "__extendsfkf2", .linkage = common.linkage }); + @export(__extendsftf2, .{ .name = "__extendsfkf2", .linkage = common.linkage }); } else if (common.want_sparc_abi) { @export(_Qp_stoq, .{ .name = "_Qp_stoq", .linkage = common.linkage }); - } else { - @export(__extendsftf2, .{ .name = "__extendsftf2", .linkage = common.linkage }); } + @export(__extendsftf2, .{ .name = "__extendsftf2", .linkage = common.linkage }); } pub fn __extendsftf2(a: f32) callconv(.C) f128 { return extendf(f128, f32, @bitCast(u32, a)); } -fn __extendsfkf2(a: f32) callconv(.C) f128 { - return extendf(f128, f32, @bitCast(u32, a)); -} - fn _Qp_stoq(c: *f128, a: f32) callconv(.C) void { c.* = extendf(f128, f32, @bitCast(u32, a)); } diff --git a/lib/compiler_rt/fabs.zig b/lib/compiler_rt/fabs.zig index fd3a58a9b756346886101bde063b54c68ff71baf..e9ce98bb7aa292eef3d010a15abe3cb2974f4969 100644 --- a/lib/compiler_rt/fabs.zig +++ b/lib/compiler_rt/fabs.zig @@ -10,8 +10,10 @@ comptime { @export(fabsf, .{ .name = "fabsf", .linkage = common.linkage }); @export(fabs, .{ .name = "fabs", .linkage = common.linkage }); @export(__fabsx, .{ .name = "__fabsx", .linkage = common.linkage }); - const fabsq_sym_name = if (common.want_ppc_abi) "fabsf128" else "fabsq"; - @export(fabsq, .{ .name = fabsq_sym_name, .linkage = common.linkage }); + if (common.want_ppc_abi) { + @export(fabsq, .{ .name = "fabsf128", .linkage = common.linkage }); + } + @export(fabsq, .{ .name = "fabsq", .linkage = common.linkage }); @export(fabsl, .{ .name = "fabsl", .linkage = common.linkage }); } diff --git a/lib/compiler_rt/fixtfdi.zig b/lib/compiler_rt/fixtfdi.zig index 9cc9835352acee665189c9b4ab11a084754e1890..f9a32828f18c04c6e423eb3ba5937de6afbd033f 100644 --- a/lib/compiler_rt/fixtfdi.zig +++ b/lib/compiler_rt/fixtfdi.zig @@ -5,22 +5,17 @@ pub const panic = common.panic; comptime { if (common.want_ppc_abi) { - @export(__fixkfdi, .{ .name = "__fixkfdi", .linkage = common.linkage }); + @export(__fixtfdi, .{ .name = "__fixkfdi", .linkage = common.linkage }); } else if (common.want_sparc_abi) { @export(_Qp_qtox, .{ .name = "_Qp_qtox", .linkage = common.linkage }); - } else { - @export(__fixtfdi, .{ .name = "__fixtfdi", .linkage = common.linkage }); } + @export(__fixtfdi, .{ .name = "__fixtfdi", .linkage = common.linkage }); } pub fn __fixtfdi(a: f128) callconv(.C) i64 { return floatToInt(i64, a); } -fn __fixkfdi(a: f128) callconv(.C) i64 { - return floatToInt(i64, a); -} - fn _Qp_qtox(a: *const f128) callconv(.C) i64 { return floatToInt(i64, a.*); } diff --git a/lib/compiler_rt/fixtfsi.zig b/lib/compiler_rt/fixtfsi.zig index f46208f02b9eff8001cda20445918b5f0620a6b7..0f5e3924ae3d12d0bd41039618e96f85657347b7 100644 --- a/lib/compiler_rt/fixtfsi.zig +++ b/lib/compiler_rt/fixtfsi.zig @@ -5,22 +5,17 @@ pub const panic = common.panic; comptime { if (common.want_ppc_abi) { - @export(__fixkfsi, .{ .name = "__fixkfsi", .linkage = common.linkage }); + @export(__fixtfsi, .{ .name = "__fixkfsi", .linkage = common.linkage }); } else if (common.want_sparc_abi) { @export(_Qp_qtoi, .{ .name = "_Qp_qtoi", .linkage = common.linkage }); - } else { - @export(__fixtfsi, .{ .name = "__fixtfsi", .linkage = common.linkage }); } + @export(__fixtfsi, .{ .name = "__fixtfsi", .linkage = common.linkage }); } pub fn __fixtfsi(a: f128) callconv(.C) i32 { return floatToInt(i32, a); } -fn __fixkfsi(a: f128) callconv(.C) i32 { - return floatToInt(i32, a); -} - fn _Qp_qtoi(a: *const f128) callconv(.C) i32 { return floatToInt(i32, a.*); } diff --git a/lib/compiler_rt/fixunstfdi.zig b/lib/compiler_rt/fixunstfdi.zig index 0657bf20c17e06849a30ecfb6abf25fb01aeadb3..fb9ff5b330382d2f7629dcce14c5639d8feda728 100644 --- a/lib/compiler_rt/fixunstfdi.zig +++ b/lib/compiler_rt/fixunstfdi.zig @@ -5,22 +5,17 @@ pub const panic = common.panic; comptime { if (common.want_ppc_abi) { - @export(__fixunskfdi, .{ .name = "__fixunskfdi", .linkage = common.linkage }); + @export(__fixunstfdi, .{ .name = "__fixunskfdi", .linkage = common.linkage }); } else if (common.want_sparc_abi) { @export(_Qp_qtoux, .{ .name = "_Qp_qtoux", .linkage = common.linkage }); - } else { - @export(__fixunstfdi, .{ .name = "__fixunstfdi", .linkage = common.linkage }); } + @export(__fixunstfdi, .{ .name = "__fixunstfdi", .linkage = common.linkage }); } pub fn __fixunstfdi(a: f128) callconv(.C) u64 { return floatToInt(u64, a); } -fn __fixunskfdi(a: f128) callconv(.C) u64 { - return floatToInt(u64, a); -} - fn _Qp_qtoux(a: *const f128) callconv(.C) u64 { return floatToInt(u64, a.*); } diff --git a/lib/compiler_rt/fixunstfsi.zig b/lib/compiler_rt/fixunstfsi.zig index 70725ddf3802bea64b6d6f5bcc487efc46b640b1..79cacbe34062a28435c857eb606b272b4d710760 100644 --- a/lib/compiler_rt/fixunstfsi.zig +++ b/lib/compiler_rt/fixunstfsi.zig @@ -5,22 +5,17 @@ pub const panic = common.panic; comptime { if (common.want_ppc_abi) { - @export(__fixunskfsi, .{ .name = "__fixunskfsi", .linkage = common.linkage }); + @export(__fixunstfsi, .{ .name = "__fixunskfsi", .linkage = common.linkage }); } else if (common.want_sparc_abi) { @export(_Qp_qtoui, .{ .name = "_Qp_qtoui", .linkage = common.linkage }); - } else { - @export(__fixunstfsi, .{ .name = "__fixunstfsi", .linkage = common.linkage }); } + @export(__fixunstfsi, .{ .name = "__fixunstfsi", .linkage = common.linkage }); } pub fn __fixunstfsi(a: f128) callconv(.C) u32 { return floatToInt(u32, a); } -fn __fixunskfsi(a: f128) callconv(.C) u32 { - return floatToInt(u32, a); -} - fn _Qp_qtoui(a: *const f128) callconv(.C) u32 { return floatToInt(u32, a.*); } diff --git a/lib/compiler_rt/floatditf.zig b/lib/compiler_rt/floatditf.zig index 731c6d8d865276320fac3501cbcd10826bfb86cb..1f651b817b53a381d7b85bb8d3d6911c1135cc26 100644 --- a/lib/compiler_rt/floatditf.zig +++ b/lib/compiler_rt/floatditf.zig @@ -5,22 +5,17 @@ pub const panic = common.panic; comptime { if (common.want_ppc_abi) { - @export(__floatdikf, .{ .name = "__floatdikf", .linkage = common.linkage }); + @export(__floatditf, .{ .name = "__floatdikf", .linkage = common.linkage }); } else if (common.want_sparc_abi) { @export(_Qp_xtoq, .{ .name = "_Qp_xtoq", .linkage = common.linkage }); - } else { - @export(__floatditf, .{ .name = "__floatditf", .linkage = common.linkage }); } + @export(__floatditf, .{ .name = "__floatditf", .linkage = common.linkage }); } pub fn __floatditf(a: i64) callconv(.C) f128 { return intToFloat(f128, a); } -fn __floatdikf(a: i64) callconv(.C) f128 { - return intToFloat(f128, a); -} - fn _Qp_xtoq(c: *f128, a: i64) callconv(.C) void { c.* = intToFloat(f128, a); } diff --git a/lib/compiler_rt/floatsitf.zig b/lib/compiler_rt/floatsitf.zig index 0954199170e13673c109aa32cbc608292a9d35d3..20473fa1d03a813c846ca17e1f4cef5b002f6533 100644 --- a/lib/compiler_rt/floatsitf.zig +++ b/lib/compiler_rt/floatsitf.zig @@ -5,22 +5,17 @@ pub const panic = common.panic; comptime { if (common.want_ppc_abi) { - @export(__floatsikf, .{ .name = "__floatsikf", .linkage = common.linkage }); + @export(__floatsitf, .{ .name = "__floatsikf", .linkage = common.linkage }); } else if (common.want_sparc_abi) { @export(_Qp_itoq, .{ .name = "_Qp_itoq", .linkage = common.linkage }); - } else { - @export(__floatsitf, .{ .name = "__floatsitf", .linkage = common.linkage }); } + @export(__floatsitf, .{ .name = "__floatsitf", .linkage = common.linkage }); } pub fn __floatsitf(a: i32) callconv(.C) f128 { return intToFloat(f128, a); } -fn __floatsikf(a: i32) callconv(.C) f128 { - return intToFloat(f128, a); -} - fn _Qp_itoq(c: *f128, a: i32) callconv(.C) void { c.* = intToFloat(f128, a); } diff --git a/lib/compiler_rt/floatunditf.zig b/lib/compiler_rt/floatunditf.zig index 1eda21891d07338b71aac798a04eda57a277f842..9236f4705f1fda1805b39240822daa8007ffc60b 100644 --- a/lib/compiler_rt/floatunditf.zig +++ b/lib/compiler_rt/floatunditf.zig @@ -5,22 +5,17 @@ pub const panic = common.panic; comptime { if (common.want_ppc_abi) { - @export(__floatundikf, .{ .name = "__floatundikf", .linkage = common.linkage }); + @export(__floatunditf, .{ .name = "__floatundikf", .linkage = common.linkage }); } else if (common.want_sparc_abi) { @export(_Qp_uxtoq, .{ .name = "_Qp_uxtoq", .linkage = common.linkage }); - } else { - @export(__floatunditf, .{ .name = "__floatunditf", .linkage = common.linkage }); } + @export(__floatunditf, .{ .name = "__floatunditf", .linkage = common.linkage }); } pub fn __floatunditf(a: u64) callconv(.C) f128 { return intToFloat(f128, a); } -fn __floatundikf(a: u64) callconv(.C) f128 { - return intToFloat(f128, a); -} - fn _Qp_uxtoq(c: *f128, a: u64) callconv(.C) void { c.* = intToFloat(f128, a); } diff --git a/lib/compiler_rt/floatunsitf.zig b/lib/compiler_rt/floatunsitf.zig index bee656c8016f18d26d84028c728ccef130850c4f..af454e1e028d555ef07a14aa0923648525ba57bf 100644 --- a/lib/compiler_rt/floatunsitf.zig +++ b/lib/compiler_rt/floatunsitf.zig @@ -5,22 +5,17 @@ pub const panic = common.panic; comptime { if (common.want_ppc_abi) { - @export(__floatunsikf, .{ .name = "__floatunsikf", .linkage = common.linkage }); + @export(__floatunsitf, .{ .name = "__floatunsikf", .linkage = common.linkage }); } else if (common.want_sparc_abi) { @export(_Qp_uitoq, .{ .name = "_Qp_uitoq", .linkage = common.linkage }); - } else { - @export(__floatunsitf, .{ .name = "__floatunsitf", .linkage = common.linkage }); } + @export(__floatunsitf, .{ .name = "__floatunsitf", .linkage = common.linkage }); } pub fn __floatunsitf(a: u32) callconv(.C) f128 { return intToFloat(f128, a); } -fn __floatunsikf(a: u32) callconv(.C) f128 { - return intToFloat(f128, a); -} - fn _Qp_uitoq(c: *f128, a: u32) callconv(.C) void { c.* = intToFloat(f128, a); } diff --git a/lib/compiler_rt/floatuntitf.zig b/lib/compiler_rt/floatuntitf.zig index eb5d7037e9be26a416055aace21c622e51a1217e..ee386bc96ba520de95df08eee1ac2025eaf4b072 100644 --- a/lib/compiler_rt/floatuntitf.zig +++ b/lib/compiler_rt/floatuntitf.zig @@ -5,12 +5,13 @@ const intToFloat = @import("./int_to_float.zig").intToFloat; pub const panic = common.panic; comptime { - const symbol_name = if (common.want_ppc_abi) "__floatuntikf" else "__floatuntitf"; - if (common.want_windows_v2u64_abi) { - @export(__floatuntitf_windows_x86_64, .{ .name = symbol_name, .linkage = common.linkage }); + @export(__floatuntitf_windows_x86_64, .{ .name = "__floatuntitf", .linkage = common.linkage }); } else { - @export(__floatuntitf, .{ .name = symbol_name, .linkage = common.linkage }); + if (common.want_ppc_abi) { + @export(__floatuntitf, .{ .name = "__floatuntikf", .linkage = common.linkage }); + } + @export(__floatuntitf, .{ .name = "__floatuntitf", .linkage = common.linkage }); } } diff --git a/lib/compiler_rt/floor.zig b/lib/compiler_rt/floor.zig index ef02786eb47925c54f09a8fc9357fa5ded42a251..afdc825f9f8353d7cfaf22dac6bc9b6ce7fcbcd9 100644 --- a/lib/compiler_rt/floor.zig +++ b/lib/compiler_rt/floor.zig @@ -18,8 +18,10 @@ comptime { @export(floorf, .{ .name = "floorf", .linkage = common.linkage }); @export(floor, .{ .name = "floor", .linkage = common.linkage }); @export(__floorx, .{ .name = "__floorx", .linkage = common.linkage }); - const floorq_sym_name = if (common.want_ppc_abi) "floorf128" else "floorq"; - @export(floorq, .{ .name = floorq_sym_name, .linkage = common.linkage }); + if (common.want_ppc_abi) { + @export(floorq, .{ .name = "floorf128", .linkage = common.linkage }); + } + @export(floorq, .{ .name = "floorq", .linkage = common.linkage }); @export(floorl, .{ .name = "floorl", .linkage = common.linkage }); } diff --git a/lib/compiler_rt/fma.zig b/lib/compiler_rt/fma.zig index aa37276ac3cacb85507ad19dc62cf5c4ac95f3bd..4bde30f50f16f7ef23799c82d59bdba812305e10 100644 --- a/lib/compiler_rt/fma.zig +++ b/lib/compiler_rt/fma.zig @@ -19,8 +19,10 @@ comptime { @export(fmaf, .{ .name = "fmaf", .linkage = common.linkage }); @export(fma, .{ .name = "fma", .linkage = common.linkage }); @export(__fmax, .{ .name = "__fmax", .linkage = common.linkage }); - const fmaq_sym_name = if (common.want_ppc_abi) "fmaf128" else "fmaq"; - @export(fmaq, .{ .name = fmaq_sym_name, .linkage = common.linkage }); + if (common.want_ppc_abi) { + @export(fmaq, .{ .name = "fmaf128", .linkage = common.linkage }); + } + @export(fmaq, .{ .name = "fmaq", .linkage = common.linkage }); @export(fmal, .{ .name = "fmal", .linkage = common.linkage }); } diff --git a/lib/compiler_rt/fmax.zig b/lib/compiler_rt/fmax.zig index 5fb87e0183d89b8fcf60ab5cc5d7ac3162aed809..df7c4a7f2e9e8fa0e2e8480e8a16900092ed24b8 100644 --- a/lib/compiler_rt/fmax.zig +++ b/lib/compiler_rt/fmax.zig @@ -11,8 +11,10 @@ comptime { @export(fmaxf, .{ .name = "fmaxf", .linkage = common.linkage }); @export(fmax, .{ .name = "fmax", .linkage = common.linkage }); @export(__fmaxx, .{ .name = "__fmaxx", .linkage = common.linkage }); - const fmaxq_sym_name = if (common.want_ppc_abi) "fmaxf128" else "fmaxq"; - @export(fmaxq, .{ .name = fmaxq_sym_name, .linkage = common.linkage }); + if (common.want_ppc_abi) { + @export(fmaxq, .{ .name = "fmaxf128", .linkage = common.linkage }); + } + @export(fmaxq, .{ .name = "fmaxq", .linkage = common.linkage }); @export(fmaxl, .{ .name = "fmaxl", .linkage = common.linkage }); } diff --git a/lib/compiler_rt/fmin.zig b/lib/compiler_rt/fmin.zig index cc2fd7b3ac5bd272bb4633b11afdaffc897f6c19..7565f3a572db967ea1e52c0758da20403c3b4745 100644 --- a/lib/compiler_rt/fmin.zig +++ b/lib/compiler_rt/fmin.zig @@ -11,8 +11,10 @@ comptime { @export(fminf, .{ .name = "fminf", .linkage = common.linkage }); @export(fmin, .{ .name = "fmin", .linkage = common.linkage }); @export(__fminx, .{ .name = "__fminx", .linkage = common.linkage }); - const fminq_sym_name = if (common.want_ppc_abi) "fminf128" else "fminq"; - @export(fminq, .{ .name = fminq_sym_name, .linkage = common.linkage }); + if (common.want_ppc_abi) { + @export(fminq, .{ .name = "fminf128", .linkage = common.linkage }); + } + @export(fminq, .{ .name = "fminq", .linkage = common.linkage }); @export(fminl, .{ .name = "fminl", .linkage = common.linkage }); } diff --git a/lib/compiler_rt/fmod.zig b/lib/compiler_rt/fmod.zig index 22b20438cc3a4b8317a6e3c4d8f0d26465a53694..e276b9988476699f863eac2dc26ed954ed6a54fc 100644 --- a/lib/compiler_rt/fmod.zig +++ b/lib/compiler_rt/fmod.zig @@ -13,8 +13,10 @@ comptime { @export(fmodf, .{ .name = "fmodf", .linkage = common.linkage }); @export(fmod, .{ .name = "fmod", .linkage = common.linkage }); @export(__fmodx, .{ .name = "__fmodx", .linkage = common.linkage }); - const fmodq_sym_name = if (common.want_ppc_abi) "fmodf128" else "fmodq"; - @export(fmodq, .{ .name = fmodq_sym_name, .linkage = common.linkage }); + if (common.want_ppc_abi) { + @export(fmodq, .{ .name = "fmodf128", .linkage = common.linkage }); + } + @export(fmodq, .{ .name = "fmodq", .linkage = common.linkage }); @export(fmodl, .{ .name = "fmodl", .linkage = common.linkage }); } diff --git a/lib/compiler_rt/getf2.zig b/lib/compiler_rt/getf2.zig index 8d9d39c1f9b9a2a63c12d77c5d6d07cf4d996030..831736250fd161fe747a1f8e86b77014a7a432cb 100644 --- a/lib/compiler_rt/getf2.zig +++ b/lib/compiler_rt/getf2.zig @@ -7,15 +7,14 @@ pub const panic = common.panic; comptime { if (common.want_ppc_abi) { - @export(__gekf2, .{ .name = "__gekf2", .linkage = common.linkage }); - @export(__gtkf2, .{ .name = "__gtkf2", .linkage = common.linkage }); + @export(__getf2, .{ .name = "__gekf2", .linkage = common.linkage }); + @export(__gttf2, .{ .name = "__gtkf2", .linkage = common.linkage }); } else if (common.want_sparc_abi) { // These exports are handled in cmptf2.zig because gt and ge on sparc // are based on calling _Qp_cmp. - } else { - @export(__getf2, .{ .name = "__getf2", .linkage = common.linkage }); - @export(__gttf2, .{ .name = "__gttf2", .linkage = common.linkage }); } + @export(__getf2, .{ .name = "__getf2", .linkage = common.linkage }); + @export(__gttf2, .{ .name = "__gttf2", .linkage = common.linkage }); } /// "These functions return a value greater than or equal to zero if neither @@ -29,11 +28,3 @@ fn __getf2(a: f128, b: f128) callconv(.C) i32 { fn __gttf2(a: f128, b: f128) callconv(.C) i32 { return __getf2(a, b); } - -fn __gekf2(a: f128, b: f128) callconv(.C) i32 { - return __getf2(a, b); -} - -fn __gtkf2(a: f128, b: f128) callconv(.C) i32 { - return __getf2(a, b); -} diff --git a/lib/compiler_rt/log.zig b/lib/compiler_rt/log.zig index 90a38ba3818c61240138fdebd18cf533478ffe8a..5e7085a41bd81c79ab49cbe5b92b4f68d0a87a1d 100644 --- a/lib/compiler_rt/log.zig +++ b/lib/compiler_rt/log.zig @@ -18,8 +18,10 @@ comptime { @export(logf, .{ .name = "logf", .linkage = common.linkage }); @export(log, .{ .name = "log", .linkage = common.linkage }); @export(__logx, .{ .name = "__logx", .linkage = common.linkage }); - const logq_sym_name = if (common.want_ppc_abi) "logf128" else "logq"; - @export(logq, .{ .name = logq_sym_name, .linkage = common.linkage }); + if (common.want_ppc_abi) { + @export(logq, .{ .name = "logf128", .linkage = common.linkage }); + } + @export(logq, .{ .name = "logq", .linkage = common.linkage }); @export(logl, .{ .name = "logl", .linkage = common.linkage }); } diff --git a/lib/compiler_rt/log10.zig b/lib/compiler_rt/log10.zig index 406eb8d0c1dd908a0a4a5c8f0d79284ef2496fe6..54638cc6458f27cff16a14d9c67b50a342401bd7 100644 --- a/lib/compiler_rt/log10.zig +++ b/lib/compiler_rt/log10.zig @@ -19,8 +19,10 @@ comptime { @export(log10f, .{ .name = "log10f", .linkage = common.linkage }); @export(log10, .{ .name = "log10", .linkage = common.linkage }); @export(__log10x, .{ .name = "__log10x", .linkage = common.linkage }); - const log10q_sym_name = if (common.want_ppc_abi) "log10f128" else "log10q"; - @export(log10q, .{ .name = log10q_sym_name, .linkage = common.linkage }); + if (common.want_ppc_abi) { + @export(log10q, .{ .name = "log10f128", .linkage = common.linkage }); + } + @export(log10q, .{ .name = "log10q", .linkage = common.linkage }); @export(log10l, .{ .name = "log10l", .linkage = common.linkage }); } diff --git a/lib/compiler_rt/log2.zig b/lib/compiler_rt/log2.zig index 6f6c07212a3f69267a1aebdd01e209f5890e68f2..8298c3dbe3251c520bfe3e0d9c27b2d8398c163b 100644 --- a/lib/compiler_rt/log2.zig +++ b/lib/compiler_rt/log2.zig @@ -19,8 +19,10 @@ comptime { @export(log2f, .{ .name = "log2f", .linkage = common.linkage }); @export(log2, .{ .name = "log2", .linkage = common.linkage }); @export(__log2x, .{ .name = "__log2x", .linkage = common.linkage }); - const log2q_sym_name = if (common.want_ppc_abi) "log2f128" else "log2q"; - @export(log2q, .{ .name = log2q_sym_name, .linkage = common.linkage }); + if (common.want_ppc_abi) { + @export(log2q, .{ .name = "log2f128", .linkage = common.linkage }); + } + @export(log2q, .{ .name = "log2q", .linkage = common.linkage }); @export(log2l, .{ .name = "log2l", .linkage = common.linkage }); } diff --git a/lib/compiler_rt/multf3.zig b/lib/compiler_rt/multf3.zig index d4449ab72e56c9f9f92280c889840aa2068f9910..878cd5c4ac614f6b9fad68e6743334b1c96a3630 100644 --- a/lib/compiler_rt/multf3.zig +++ b/lib/compiler_rt/multf3.zig @@ -5,22 +5,17 @@ pub const panic = common.panic; comptime { if (common.want_ppc_abi) { - @export(__mulkf3, .{ .name = "__mulkf3", .linkage = common.linkage }); + @export(__multf3, .{ .name = "__mulkf3", .linkage = common.linkage }); } else if (common.want_sparc_abi) { @export(_Qp_mul, .{ .name = "_Qp_mul", .linkage = common.linkage }); - } else { - @export(__multf3, .{ .name = "__multf3", .linkage = common.linkage }); } + @export(__multf3, .{ .name = "__multf3", .linkage = common.linkage }); } pub fn __multf3(a: f128, b: f128) callconv(.C) f128 { return mulf3(f128, a, b); } -fn __mulkf3(a: f128, b: f128) callconv(.C) f128 { - return mulf3(f128, a, b); -} - fn _Qp_mul(c: *f128, a: *const f128, b: *const f128) callconv(.C) void { c.* = mulf3(f128, a.*, b.*); } diff --git a/lib/compiler_rt/round.zig b/lib/compiler_rt/round.zig index acd26d882328549e7cdcfd7aafd6446d52f8eca7..8f4b3903613eb26973038289df69f48c5a56131a 100644 --- a/lib/compiler_rt/round.zig +++ b/lib/compiler_rt/round.zig @@ -18,8 +18,10 @@ comptime { @export(roundf, .{ .name = "roundf", .linkage = common.linkage }); @export(round, .{ .name = "round", .linkage = common.linkage }); @export(__roundx, .{ .name = "__roundx", .linkage = common.linkage }); - const roundq_sym_name = if (common.want_ppc_abi) "roundf128" else "roundq"; - @export(roundq, .{ .name = roundq_sym_name, .linkage = common.linkage }); + if (common.want_ppc_abi) { + @export(roundq, .{ .name = "roundf128", .linkage = common.linkage }); + } + @export(roundq, .{ .name = "roundq", .linkage = common.linkage }); @export(roundl, .{ .name = "roundl", .linkage = common.linkage }); } diff --git a/lib/compiler_rt/sin.zig b/lib/compiler_rt/sin.zig index 1b93aab948a2a73f75a5caaf9312a71be6009e33..b6d388bf0adee473f9f5ec149a30ef77d845f3b2 100644 --- a/lib/compiler_rt/sin.zig +++ b/lib/compiler_rt/sin.zig @@ -22,8 +22,10 @@ comptime { @export(sinf, .{ .name = "sinf", .linkage = common.linkage }); @export(sin, .{ .name = "sin", .linkage = common.linkage }); @export(__sinx, .{ .name = "__sinx", .linkage = common.linkage }); - const sinq_sym_name = if (common.want_ppc_abi) "sinf128" else "sinq"; - @export(sinq, .{ .name = sinq_sym_name, .linkage = common.linkage }); + if (common.want_ppc_abi) { + @export(sinq, .{ .name = "sinf128", .linkage = common.linkage }); + } + @export(sinq, .{ .name = "sinq", .linkage = common.linkage }); @export(sinl, .{ .name = "sinl", .linkage = common.linkage }); } diff --git a/lib/compiler_rt/sincos.zig b/lib/compiler_rt/sincos.zig index c839356a360fb65b21b4450dd779006a661aa7e5..30a2b55d959c2c3b96dcbc1b3743a0ae06f6972b 100644 --- a/lib/compiler_rt/sincos.zig +++ b/lib/compiler_rt/sincos.zig @@ -14,8 +14,10 @@ comptime { @export(sincosf, .{ .name = "sincosf", .linkage = common.linkage }); @export(sincos, .{ .name = "sincos", .linkage = common.linkage }); @export(__sincosx, .{ .name = "__sincosx", .linkage = common.linkage }); - const sincosq_sym_name = if (common.want_ppc_abi) "sincosf128" else "sincosq"; - @export(sincosq, .{ .name = sincosq_sym_name, .linkage = common.linkage }); + if (common.want_ppc_abi) { + @export(sincosq, .{ .name = "sincosf128", .linkage = common.linkage }); + } + @export(sincosq, .{ .name = "sincosq", .linkage = common.linkage }); @export(sincosl, .{ .name = "sincosl", .linkage = common.linkage }); } diff --git a/lib/compiler_rt/sqrt.zig b/lib/compiler_rt/sqrt.zig index 01b09213fed2e07749c43d56cf3faee2a6f9d351..924a8dc9f95dc2377b77f5bb24d5d59d146bf9cb 100644 --- a/lib/compiler_rt/sqrt.zig +++ b/lib/compiler_rt/sqrt.zig @@ -11,8 +11,10 @@ comptime { @export(sqrtf, .{ .name = "sqrtf", .linkage = common.linkage }); @export(sqrt, .{ .name = "sqrt", .linkage = common.linkage }); @export(__sqrtx, .{ .name = "__sqrtx", .linkage = common.linkage }); - const sqrtq_sym_name = if (common.want_ppc_abi) "sqrtf128" else "sqrtq"; - @export(sqrtq, .{ .name = sqrtq_sym_name, .linkage = common.linkage }); + if (common.want_ppc_abi) { + @export(sqrtq, .{ .name = "sqrtf128", .linkage = common.linkage }); + } + @export(sqrtq, .{ .name = "sqrtq", .linkage = common.linkage }); @export(sqrtl, .{ .name = "sqrtl", .linkage = common.linkage }); } diff --git a/lib/compiler_rt/subtf3.zig b/lib/compiler_rt/subtf3.zig index 9477f96917a0a2a141fa7fc69dabe54b8548f0d4..4a0d833f57adbd4e6b1519729520537323bf6bed 100644 --- a/lib/compiler_rt/subtf3.zig +++ b/lib/compiler_rt/subtf3.zig @@ -4,22 +4,17 @@ pub const panic = common.panic; comptime { if (common.want_ppc_abi) { - @export(__subkf3, .{ .name = "__subkf3", .linkage = common.linkage }); + @export(__subtf3, .{ .name = "__subkf3", .linkage = common.linkage }); } else if (common.want_sparc_abi) { @export(_Qp_sub, .{ .name = "_Qp_sub", .linkage = common.linkage }); - } else { - @export(__subtf3, .{ .name = "__subtf3", .linkage = common.linkage }); } + @export(__subtf3, .{ .name = "__subtf3", .linkage = common.linkage }); } pub fn __subtf3(a: f128, b: f128) callconv(.C) f128 { return sub(a, b); } -fn __subkf3(a: f128, b: f128) callconv(.C) f128 { - return sub(a, b); -} - fn _Qp_sub(c: *f128, a: *const f128, b: *const f128) callconv(.C) void { c.* = sub(a.*, b.*); } diff --git a/lib/compiler_rt/trunc.zig b/lib/compiler_rt/trunc.zig index 9ced5bc92cddd2dfbe83771fe959435f99c03457..f600dff61f1942fa18297333677c645a551b5447 100644 --- a/lib/compiler_rt/trunc.zig +++ b/lib/compiler_rt/trunc.zig @@ -18,8 +18,10 @@ comptime { @export(truncf, .{ .name = "truncf", .linkage = common.linkage }); @export(trunc, .{ .name = "trunc", .linkage = common.linkage }); @export(__truncx, .{ .name = "__truncx", .linkage = common.linkage }); - const truncq_sym_name = if (common.want_ppc_abi) "truncf128" else "truncq"; - @export(truncq, .{ .name = truncq_sym_name, .linkage = common.linkage }); + if (common.want_ppc_abi) { + @export(truncq, .{ .name = "truncf128", .linkage = common.linkage }); + } + @export(truncq, .{ .name = "truncq", .linkage = common.linkage }); @export(truncl, .{ .name = "truncl", .linkage = common.linkage }); } diff --git a/lib/compiler_rt/trunctfdf2.zig b/lib/compiler_rt/trunctfdf2.zig index e084d63d8836f31adafa8f26ce0116e621e6d049..02be252856a9fcceec29332680d1e2686a9133d9 100644 --- a/lib/compiler_rt/trunctfdf2.zig +++ b/lib/compiler_rt/trunctfdf2.zig @@ -5,22 +5,17 @@ pub const panic = common.panic; comptime { if (common.want_ppc_abi) { - @export(__trunckfdf2, .{ .name = "__trunckfdf2", .linkage = common.linkage }); + @export(__trunctfdf2, .{ .name = "__trunckfdf2", .linkage = common.linkage }); } else if (common.want_sparc_abi) { @export(_Qp_qtod, .{ .name = "_Qp_qtod", .linkage = common.linkage }); - } else { - @export(__trunctfdf2, .{ .name = "__trunctfdf2", .linkage = common.linkage }); } + @export(__trunctfdf2, .{ .name = "__trunctfdf2", .linkage = common.linkage }); } pub fn __trunctfdf2(a: f128) callconv(.C) f64 { return truncf(f64, f128, a); } -fn __trunckfdf2(a: f128) callconv(.C) f64 { - return truncf(f64, f128, a); -} - fn _Qp_qtod(a: *const f128) callconv(.C) f64 { return truncf(f64, f128, a.*); } diff --git a/lib/compiler_rt/trunctfsf2.zig b/lib/compiler_rt/trunctfsf2.zig index 0fcd5e1e086819c1768476876ef3cb4c17505526..88a3668a93f48b01e676799806cd7b2161e9cc2d 100644 --- a/lib/compiler_rt/trunctfsf2.zig +++ b/lib/compiler_rt/trunctfsf2.zig @@ -5,22 +5,17 @@ pub const panic = common.panic; comptime { if (common.want_ppc_abi) { - @export(__trunckfsf2, .{ .name = "__trunckfsf2", .linkage = common.linkage }); + @export(__trunctfsf2, .{ .name = "__trunckfsf2", .linkage = common.linkage }); } else if (common.want_sparc_abi) { @export(_Qp_qtos, .{ .name = "_Qp_qtos", .linkage = common.linkage }); - } else { - @export(__trunctfsf2, .{ .name = "__trunctfsf2", .linkage = common.linkage }); } + @export(__trunctfsf2, .{ .name = "__trunctfsf2", .linkage = common.linkage }); } pub fn __trunctfsf2(a: f128) callconv(.C) f32 { return truncf(f32, f128, a); } -fn __trunckfsf2(a: f128) callconv(.C) f32 { - return truncf(f32, f128, a); -} - fn _Qp_qtos(a: *const f128) callconv(.C) f32 { return truncf(f32, f128, a.*); } diff --git a/lib/compiler_rt/unordtf2.zig b/lib/compiler_rt/unordtf2.zig index 41d1d7008eb3a482b169d088e1bd7797689dd157..e00d9cc6d14d2d33ca84048bf74c5d039f189b96 100644 --- a/lib/compiler_rt/unordtf2.zig +++ b/lib/compiler_rt/unordtf2.zig @@ -5,19 +5,14 @@ pub const panic = common.panic; comptime { if (common.want_ppc_abi) { - @export(__unordkf2, .{ .name = "__unordkf2", .linkage = common.linkage }); + @export(__unordtf2, .{ .name = "__unordkf2", .linkage = common.linkage }); } else if (common.want_sparc_abi) { // These exports are handled in cmptf2.zig because unordered comparisons // are based on calling _Qp_cmp. - } else { - @export(__unordtf2, .{ .name = "__unordtf2", .linkage = common.linkage }); } + @export(__unordtf2, .{ .name = "__unordtf2", .linkage = common.linkage }); } fn __unordtf2(a: f128, b: f128) callconv(.C) i32 { return comparef.unordcmp(f128, a, b); } - -fn __unordkf2(a: f128, b: f128) callconv(.C) i32 { - return comparef.unordcmp(f128, a, b); -} -- 2.54.0