| author | |
| committer | |
| log | c50f33b1118f2e81597bd9ef5976fcb3eb961dee |
| tree | bddc809af52345f073502e9d8a7acf43ffd14d6c |
| parent | 94945864b9d8ffa7b707432fb877ae42e383db68 |
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.38 files changed, 125 insertions(+), 198 deletions(-)
lib/compiler_rt/addtf3.zig+2-7| ... | ... | @@ -5,22 +5,17 @@ pub const panic = common.panic; |
| 5 | 5 | |
| 6 | 6 | comptime { |
| 7 | 7 | if (common.want_ppc_abi) { |
| 8 | @export(__addkf3, .{ .name = "__addkf3", .linkage = common.linkage }); | |
| 8 | @export(__addtf3, .{ .name = "__addkf3", .linkage = common.linkage }); | |
| 9 | 9 | } else if (common.want_sparc_abi) { |
| 10 | 10 | @export(_Qp_add, .{ .name = "_Qp_add", .linkage = common.linkage }); |
| 11 | } else { | |
| 12 | @export(__addtf3, .{ .name = "__addtf3", .linkage = common.linkage }); | |
| 13 | 11 | } |
| 12 | @export(__addtf3, .{ .name = "__addtf3", .linkage = common.linkage }); | |
| 14 | 13 | } |
| 15 | 14 | |
| 16 | 15 | pub fn __addtf3(a: f128, b: f128) callconv(.C) f128 { |
| 17 | 16 | return addf3(f128, a, b); |
| 18 | 17 | } |
| 19 | 18 | |
| 20 | fn __addkf3(a: f128, b: f128) callconv(.C) f128 { | |
| 21 | return addf3(f128, a, b); | |
| 22 | } | |
| 23 | ||
| 24 | 19 | fn _Qp_add(c: *f128, a: *f128, b: *f128) callconv(.C) void { |
| 25 | 20 | c.* = addf3(f128, a.*, b.*); |
| 26 | 21 | } |
lib/compiler_rt/ceil.zig+4-2| ... | ... | @@ -18,8 +18,10 @@ comptime { |
| 18 | 18 | @export(ceilf, .{ .name = "ceilf", .linkage = common.linkage }); |
| 19 | 19 | @export(ceil, .{ .name = "ceil", .linkage = common.linkage }); |
| 20 | 20 | @export(__ceilx, .{ .name = "__ceilx", .linkage = common.linkage }); |
| 21 | const ceilq_sym_name = if (common.want_ppc_abi) "ceilf128" else "ceilq"; | |
| 22 | @export(ceilq, .{ .name = ceilq_sym_name, .linkage = common.linkage }); | |
| 21 | if (common.want_ppc_abi) { | |
| 22 | @export(ceilq, .{ .name = "ceilf128", .linkage = common.linkage }); | |
| 23 | } | |
| 24 | @export(ceilq, .{ .name = "ceilq", .linkage = common.linkage }); | |
| 23 | 25 | @export(ceill, .{ .name = "ceill", .linkage = common.linkage }); |
| 24 | 26 | } |
| 25 | 27 |
lib/compiler_rt/cmptf2.zig+9-26| ... | ... | @@ -7,10 +7,10 @@ pub const panic = common.panic; |
| 7 | 7 | |
| 8 | 8 | comptime { |
| 9 | 9 | if (common.want_ppc_abi) { |
| 10 | @export(__eqkf2, .{ .name = "__eqkf2", .linkage = common.linkage }); | |
| 11 | @export(__nekf2, .{ .name = "__nekf2", .linkage = common.linkage }); | |
| 12 | @export(__ltkf2, .{ .name = "__ltkf2", .linkage = common.linkage }); | |
| 13 | @export(__lekf2, .{ .name = "__lekf2", .linkage = common.linkage }); | |
| 10 | @export(__eqtf2, .{ .name = "__eqkf2", .linkage = common.linkage }); | |
| 11 | @export(__netf2, .{ .name = "__nekf2", .linkage = common.linkage }); | |
| 12 | @export(__lttf2, .{ .name = "__ltkf2", .linkage = common.linkage }); | |
| 13 | @export(__letf2, .{ .name = "__lekf2", .linkage = common.linkage }); | |
| 14 | 14 | } else if (common.want_sparc_abi) { |
| 15 | 15 | @export(_Qp_cmp, .{ .name = "_Qp_cmp", .linkage = common.linkage }); |
| 16 | 16 | @export(_Qp_feq, .{ .name = "_Qp_feq", .linkage = common.linkage }); |
| ... | ... | @@ -19,13 +19,12 @@ comptime { |
| 19 | 19 | @export(_Qp_fle, .{ .name = "_Qp_fle", .linkage = common.linkage }); |
| 20 | 20 | @export(_Qp_fgt, .{ .name = "_Qp_fgt", .linkage = common.linkage }); |
| 21 | 21 | @export(_Qp_fge, .{ .name = "_Qp_fge", .linkage = common.linkage }); |
| 22 | } else { | |
| 23 | @export(__eqtf2, .{ .name = "__eqtf2", .linkage = common.linkage }); | |
| 24 | @export(__netf2, .{ .name = "__netf2", .linkage = common.linkage }); | |
| 25 | @export(__letf2, .{ .name = "__letf2", .linkage = common.linkage }); | |
| 26 | @export(__cmptf2, .{ .name = "__cmptf2", .linkage = common.linkage }); | |
| 27 | @export(__lttf2, .{ .name = "__lttf2", .linkage = common.linkage }); | |
| 28 | 22 | } |
| 23 | @export(__eqtf2, .{ .name = "__eqtf2", .linkage = common.linkage }); | |
| 24 | @export(__netf2, .{ .name = "__netf2", .linkage = common.linkage }); | |
| 25 | @export(__letf2, .{ .name = "__letf2", .linkage = common.linkage }); | |
| 26 | @export(__cmptf2, .{ .name = "__cmptf2", .linkage = common.linkage }); | |
| 27 | @export(__lttf2, .{ .name = "__lttf2", .linkage = common.linkage }); | |
| 29 | 28 | } |
| 30 | 29 | |
| 31 | 30 | /// "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 { |
| 64 | 63 | return __cmptf2(a, b); |
| 65 | 64 | } |
| 66 | 65 | |
| 67 | fn __eqkf2(a: f128, b: f128) callconv(.C) i32 { | |
| 68 | return __cmptf2(a, b); | |
| 69 | } | |
| 70 | ||
| 71 | fn __nekf2(a: f128, b: f128) callconv(.C) i32 { | |
| 72 | return __cmptf2(a, b); | |
| 73 | } | |
| 74 | ||
| 75 | fn __ltkf2(a: f128, b: f128) callconv(.C) i32 { | |
| 76 | return __cmptf2(a, b); | |
| 77 | } | |
| 78 | ||
| 79 | fn __lekf2(a: f128, b: f128) callconv(.C) i32 { | |
| 80 | return __cmptf2(a, b); | |
| 81 | } | |
| 82 | ||
| 83 | 66 | const SparcFCMP = enum(i32) { |
| 84 | 67 | Equal = 0, |
| 85 | 68 | Less = 1, |
lib/compiler_rt/cos.zig+4-2| ... | ... | @@ -16,8 +16,10 @@ comptime { |
| 16 | 16 | @export(cosf, .{ .name = "cosf", .linkage = common.linkage }); |
| 17 | 17 | @export(cos, .{ .name = "cos", .linkage = common.linkage }); |
| 18 | 18 | @export(__cosx, .{ .name = "__cosx", .linkage = common.linkage }); |
| 19 | const cosq_sym_name = if (common.want_ppc_abi) "cosf128" else "cosq"; | |
| 20 | @export(cosq, .{ .name = cosq_sym_name, .linkage = common.linkage }); | |
| 19 | if (common.want_ppc_abi) { | |
| 20 | @export(cosq, .{ .name = "cosf128", .linkage = common.linkage }); | |
| 21 | } | |
| 22 | @export(cosq, .{ .name = "cosq", .linkage = common.linkage }); | |
| 21 | 23 | @export(cosl, .{ .name = "cosl", .linkage = common.linkage }); |
| 22 | 24 | } |
| 23 | 25 |
lib/compiler_rt/divtf3.zig+3-7| ... | ... | @@ -9,22 +9,18 @@ pub const panic = common.panic; |
| 9 | 9 | |
| 10 | 10 | comptime { |
| 11 | 11 | if (common.want_ppc_abi) { |
| 12 | @export(__divkf3, .{ .name = "__divkf3", .linkage = common.linkage }); | |
| 12 | // TODO: why did this not error? | |
| 13 | @export(__divtf3, .{ .name = "__divkf3", .linkage = common.linkage }); | |
| 13 | 14 | } else if (common.want_sparc_abi) { |
| 14 | 15 | @export(_Qp_div, .{ .name = "_Qp_div", .linkage = common.linkage }); |
| 15 | } else { | |
| 16 | @export(__divtf3, .{ .name = "__divtf3", .linkage = common.linkage }); | |
| 17 | 16 | } |
| 17 | @export(__divtf3, .{ .name = "__divtf3", .linkage = common.linkage }); | |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | pub fn __divtf3(a: f128, b: f128) callconv(.C) f128 { |
| 21 | 21 | return div(a, b); |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | fn __divkf3(a: f128, b: f128) callconv(.C) f128 { | |
| 25 | return div(a, b); | |
| 26 | } | |
| 27 | ||
| 28 | 24 | fn _Qp_div(c: *f128, a: *const f128, b: *const f128) callconv(.C) void { |
| 29 | 25 | c.* = div(a.*, b.*); |
| 30 | 26 | } |
lib/compiler_rt/exp.zig+4-2| ... | ... | @@ -18,8 +18,10 @@ comptime { |
| 18 | 18 | @export(expf, .{ .name = "expf", .linkage = common.linkage }); |
| 19 | 19 | @export(exp, .{ .name = "exp", .linkage = common.linkage }); |
| 20 | 20 | @export(__expx, .{ .name = "__expx", .linkage = common.linkage }); |
| 21 | const expq_sym_name = if (common.want_ppc_abi) "expf128" else "expq"; | |
| 22 | @export(expq, .{ .name = expq_sym_name, .linkage = common.linkage }); | |
| 21 | if (common.want_ppc_abi) { | |
| 22 | @export(expq, .{ .name = "expf128", .linkage = common.linkage }); | |
| 23 | } | |
| 24 | @export(expq, .{ .name = "expq", .linkage = common.linkage }); | |
| 23 | 25 | @export(expl, .{ .name = "expl", .linkage = common.linkage }); |
| 24 | 26 | } |
| 25 | 27 |
lib/compiler_rt/exp2.zig+4-2| ... | ... | @@ -18,8 +18,10 @@ comptime { |
| 18 | 18 | @export(exp2f, .{ .name = "exp2f", .linkage = common.linkage }); |
| 19 | 19 | @export(exp2, .{ .name = "exp2", .linkage = common.linkage }); |
| 20 | 20 | @export(__exp2x, .{ .name = "__exp2x", .linkage = common.linkage }); |
| 21 | const exp2q_sym_name = if (common.want_ppc_abi) "exp2f128" else "exp2q"; | |
| 22 | @export(exp2q, .{ .name = exp2q_sym_name, .linkage = common.linkage }); | |
| 21 | if (common.want_ppc_abi) { | |
| 22 | @export(exp2q, .{ .name = "exp2f128", .linkage = common.linkage }); | |
| 23 | } | |
| 24 | @export(exp2q, .{ .name = "exp2q", .linkage = common.linkage }); | |
| 23 | 25 | @export(exp2l, .{ .name = "exp2l", .linkage = common.linkage }); |
| 24 | 26 | } |
| 25 | 27 |
lib/compiler_rt/extenddftf2.zig+2-7| ... | ... | @@ -5,22 +5,17 @@ pub const panic = common.panic; |
| 5 | 5 | |
| 6 | 6 | comptime { |
| 7 | 7 | if (common.want_ppc_abi) { |
| 8 | @export(__extenddfkf2, .{ .name = "__extenddfkf2", .linkage = common.linkage }); | |
| 8 | @export(__extenddftf2, .{ .name = "__extenddfkf2", .linkage = common.linkage }); | |
| 9 | 9 | } else if (common.want_sparc_abi) { |
| 10 | 10 | @export(_Qp_dtoq, .{ .name = "_Qp_dtoq", .linkage = common.linkage }); |
| 11 | } else { | |
| 12 | @export(__extenddftf2, .{ .name = "__extenddftf2", .linkage = common.linkage }); | |
| 13 | 11 | } |
| 12 | @export(__extenddftf2, .{ .name = "__extenddftf2", .linkage = common.linkage }); | |
| 14 | 13 | } |
| 15 | 14 | |
| 16 | 15 | pub fn __extenddftf2(a: f64) callconv(.C) f128 { |
| 17 | 16 | return extendf(f128, f64, @bitCast(u64, a)); |
| 18 | 17 | } |
| 19 | 18 | |
| 20 | fn __extenddfkf2(a: f64) callconv(.C) f128 { | |
| 21 | return extendf(f128, f64, @bitCast(u64, a)); | |
| 22 | } | |
| 23 | ||
| 24 | 19 | fn _Qp_dtoq(c: *f128, a: f64) callconv(.C) void { |
| 25 | 20 | c.* = extendf(f128, f64, @bitCast(u64, a)); |
| 26 | 21 | } |
lib/compiler_rt/extendsftf2.zig+2-7| ... | ... | @@ -5,22 +5,17 @@ pub const panic = common.panic; |
| 5 | 5 | |
| 6 | 6 | comptime { |
| 7 | 7 | if (common.want_ppc_abi) { |
| 8 | @export(__extendsfkf2, .{ .name = "__extendsfkf2", .linkage = common.linkage }); | |
| 8 | @export(__extendsftf2, .{ .name = "__extendsfkf2", .linkage = common.linkage }); | |
| 9 | 9 | } else if (common.want_sparc_abi) { |
| 10 | 10 | @export(_Qp_stoq, .{ .name = "_Qp_stoq", .linkage = common.linkage }); |
| 11 | } else { | |
| 12 | @export(__extendsftf2, .{ .name = "__extendsftf2", .linkage = common.linkage }); | |
| 13 | 11 | } |
| 12 | @export(__extendsftf2, .{ .name = "__extendsftf2", .linkage = common.linkage }); | |
| 14 | 13 | } |
| 15 | 14 | |
| 16 | 15 | pub fn __extendsftf2(a: f32) callconv(.C) f128 { |
| 17 | 16 | return extendf(f128, f32, @bitCast(u32, a)); |
| 18 | 17 | } |
| 19 | 18 | |
| 20 | fn __extendsfkf2(a: f32) callconv(.C) f128 { | |
| 21 | return extendf(f128, f32, @bitCast(u32, a)); | |
| 22 | } | |
| 23 | ||
| 24 | 19 | fn _Qp_stoq(c: *f128, a: f32) callconv(.C) void { |
| 25 | 20 | c.* = extendf(f128, f32, @bitCast(u32, a)); |
| 26 | 21 | } |
lib/compiler_rt/fabs.zig+4-2| ... | ... | @@ -10,8 +10,10 @@ comptime { |
| 10 | 10 | @export(fabsf, .{ .name = "fabsf", .linkage = common.linkage }); |
| 11 | 11 | @export(fabs, .{ .name = "fabs", .linkage = common.linkage }); |
| 12 | 12 | @export(__fabsx, .{ .name = "__fabsx", .linkage = common.linkage }); |
| 13 | const fabsq_sym_name = if (common.want_ppc_abi) "fabsf128" else "fabsq"; | |
| 14 | @export(fabsq, .{ .name = fabsq_sym_name, .linkage = common.linkage }); | |
| 13 | if (common.want_ppc_abi) { | |
| 14 | @export(fabsq, .{ .name = "fabsf128", .linkage = common.linkage }); | |
| 15 | } | |
| 16 | @export(fabsq, .{ .name = "fabsq", .linkage = common.linkage }); | |
| 15 | 17 | @export(fabsl, .{ .name = "fabsl", .linkage = common.linkage }); |
| 16 | 18 | } |
| 17 | 19 |
lib/compiler_rt/fixtfdi.zig+2-7| ... | ... | @@ -5,22 +5,17 @@ pub const panic = common.panic; |
| 5 | 5 | |
| 6 | 6 | comptime { |
| 7 | 7 | if (common.want_ppc_abi) { |
| 8 | @export(__fixkfdi, .{ .name = "__fixkfdi", .linkage = common.linkage }); | |
| 8 | @export(__fixtfdi, .{ .name = "__fixkfdi", .linkage = common.linkage }); | |
| 9 | 9 | } else if (common.want_sparc_abi) { |
| 10 | 10 | @export(_Qp_qtox, .{ .name = "_Qp_qtox", .linkage = common.linkage }); |
| 11 | } else { | |
| 12 | @export(__fixtfdi, .{ .name = "__fixtfdi", .linkage = common.linkage }); | |
| 13 | 11 | } |
| 12 | @export(__fixtfdi, .{ .name = "__fixtfdi", .linkage = common.linkage }); | |
| 14 | 13 | } |
| 15 | 14 | |
| 16 | 15 | pub fn __fixtfdi(a: f128) callconv(.C) i64 { |
| 17 | 16 | return floatToInt(i64, a); |
| 18 | 17 | } |
| 19 | 18 | |
| 20 | fn __fixkfdi(a: f128) callconv(.C) i64 { | |
| 21 | return floatToInt(i64, a); | |
| 22 | } | |
| 23 | ||
| 24 | 19 | fn _Qp_qtox(a: *const f128) callconv(.C) i64 { |
| 25 | 20 | return floatToInt(i64, a.*); |
| 26 | 21 | } |
lib/compiler_rt/fixtfsi.zig+2-7| ... | ... | @@ -5,22 +5,17 @@ pub const panic = common.panic; |
| 5 | 5 | |
| 6 | 6 | comptime { |
| 7 | 7 | if (common.want_ppc_abi) { |
| 8 | @export(__fixkfsi, .{ .name = "__fixkfsi", .linkage = common.linkage }); | |
| 8 | @export(__fixtfsi, .{ .name = "__fixkfsi", .linkage = common.linkage }); | |
| 9 | 9 | } else if (common.want_sparc_abi) { |
| 10 | 10 | @export(_Qp_qtoi, .{ .name = "_Qp_qtoi", .linkage = common.linkage }); |
| 11 | } else { | |
| 12 | @export(__fixtfsi, .{ .name = "__fixtfsi", .linkage = common.linkage }); | |
| 13 | 11 | } |
| 12 | @export(__fixtfsi, .{ .name = "__fixtfsi", .linkage = common.linkage }); | |
| 14 | 13 | } |
| 15 | 14 | |
| 16 | 15 | pub fn __fixtfsi(a: f128) callconv(.C) i32 { |
| 17 | 16 | return floatToInt(i32, a); |
| 18 | 17 | } |
| 19 | 18 | |
| 20 | fn __fixkfsi(a: f128) callconv(.C) i32 { | |
| 21 | return floatToInt(i32, a); | |
| 22 | } | |
| 23 | ||
| 24 | 19 | fn _Qp_qtoi(a: *const f128) callconv(.C) i32 { |
| 25 | 20 | return floatToInt(i32, a.*); |
| 26 | 21 | } |
lib/compiler_rt/fixunstfdi.zig+2-7| ... | ... | @@ -5,22 +5,17 @@ pub const panic = common.panic; |
| 5 | 5 | |
| 6 | 6 | comptime { |
| 7 | 7 | if (common.want_ppc_abi) { |
| 8 | @export(__fixunskfdi, .{ .name = "__fixunskfdi", .linkage = common.linkage }); | |
| 8 | @export(__fixunstfdi, .{ .name = "__fixunskfdi", .linkage = common.linkage }); | |
| 9 | 9 | } else if (common.want_sparc_abi) { |
| 10 | 10 | @export(_Qp_qtoux, .{ .name = "_Qp_qtoux", .linkage = common.linkage }); |
| 11 | } else { | |
| 12 | @export(__fixunstfdi, .{ .name = "__fixunstfdi", .linkage = common.linkage }); | |
| 13 | 11 | } |
| 12 | @export(__fixunstfdi, .{ .name = "__fixunstfdi", .linkage = common.linkage }); | |
| 14 | 13 | } |
| 15 | 14 | |
| 16 | 15 | pub fn __fixunstfdi(a: f128) callconv(.C) u64 { |
| 17 | 16 | return floatToInt(u64, a); |
| 18 | 17 | } |
| 19 | 18 | |
| 20 | fn __fixunskfdi(a: f128) callconv(.C) u64 { | |
| 21 | return floatToInt(u64, a); | |
| 22 | } | |
| 23 | ||
| 24 | 19 | fn _Qp_qtoux(a: *const f128) callconv(.C) u64 { |
| 25 | 20 | return floatToInt(u64, a.*); |
| 26 | 21 | } |
lib/compiler_rt/fixunstfsi.zig+2-7| ... | ... | @@ -5,22 +5,17 @@ pub const panic = common.panic; |
| 5 | 5 | |
| 6 | 6 | comptime { |
| 7 | 7 | if (common.want_ppc_abi) { |
| 8 | @export(__fixunskfsi, .{ .name = "__fixunskfsi", .linkage = common.linkage }); | |
| 8 | @export(__fixunstfsi, .{ .name = "__fixunskfsi", .linkage = common.linkage }); | |
| 9 | 9 | } else if (common.want_sparc_abi) { |
| 10 | 10 | @export(_Qp_qtoui, .{ .name = "_Qp_qtoui", .linkage = common.linkage }); |
| 11 | } else { | |
| 12 | @export(__fixunstfsi, .{ .name = "__fixunstfsi", .linkage = common.linkage }); | |
| 13 | 11 | } |
| 12 | @export(__fixunstfsi, .{ .name = "__fixunstfsi", .linkage = common.linkage }); | |
| 14 | 13 | } |
| 15 | 14 | |
| 16 | 15 | pub fn __fixunstfsi(a: f128) callconv(.C) u32 { |
| 17 | 16 | return floatToInt(u32, a); |
| 18 | 17 | } |
| 19 | 18 | |
| 20 | fn __fixunskfsi(a: f128) callconv(.C) u32 { | |
| 21 | return floatToInt(u32, a); | |
| 22 | } | |
| 23 | ||
| 24 | 19 | fn _Qp_qtoui(a: *const f128) callconv(.C) u32 { |
| 25 | 20 | return floatToInt(u32, a.*); |
| 26 | 21 | } |
lib/compiler_rt/floatditf.zig+2-7| ... | ... | @@ -5,22 +5,17 @@ pub const panic = common.panic; |
| 5 | 5 | |
| 6 | 6 | comptime { |
| 7 | 7 | if (common.want_ppc_abi) { |
| 8 | @export(__floatdikf, .{ .name = "__floatdikf", .linkage = common.linkage }); | |
| 8 | @export(__floatditf, .{ .name = "__floatdikf", .linkage = common.linkage }); | |
| 9 | 9 | } else if (common.want_sparc_abi) { |
| 10 | 10 | @export(_Qp_xtoq, .{ .name = "_Qp_xtoq", .linkage = common.linkage }); |
| 11 | } else { | |
| 12 | @export(__floatditf, .{ .name = "__floatditf", .linkage = common.linkage }); | |
| 13 | 11 | } |
| 12 | @export(__floatditf, .{ .name = "__floatditf", .linkage = common.linkage }); | |
| 14 | 13 | } |
| 15 | 14 | |
| 16 | 15 | pub fn __floatditf(a: i64) callconv(.C) f128 { |
| 17 | 16 | return intToFloat(f128, a); |
| 18 | 17 | } |
| 19 | 18 | |
| 20 | fn __floatdikf(a: i64) callconv(.C) f128 { | |
| 21 | return intToFloat(f128, a); | |
| 22 | } | |
| 23 | ||
| 24 | 19 | fn _Qp_xtoq(c: *f128, a: i64) callconv(.C) void { |
| 25 | 20 | c.* = intToFloat(f128, a); |
| 26 | 21 | } |
lib/compiler_rt/floatsitf.zig+2-7| ... | ... | @@ -5,22 +5,17 @@ pub const panic = common.panic; |
| 5 | 5 | |
| 6 | 6 | comptime { |
| 7 | 7 | if (common.want_ppc_abi) { |
| 8 | @export(__floatsikf, .{ .name = "__floatsikf", .linkage = common.linkage }); | |
| 8 | @export(__floatsitf, .{ .name = "__floatsikf", .linkage = common.linkage }); | |
| 9 | 9 | } else if (common.want_sparc_abi) { |
| 10 | 10 | @export(_Qp_itoq, .{ .name = "_Qp_itoq", .linkage = common.linkage }); |
| 11 | } else { | |
| 12 | @export(__floatsitf, .{ .name = "__floatsitf", .linkage = common.linkage }); | |
| 13 | 11 | } |
| 12 | @export(__floatsitf, .{ .name = "__floatsitf", .linkage = common.linkage }); | |
| 14 | 13 | } |
| 15 | 14 | |
| 16 | 15 | pub fn __floatsitf(a: i32) callconv(.C) f128 { |
| 17 | 16 | return intToFloat(f128, a); |
| 18 | 17 | } |
| 19 | 18 | |
| 20 | fn __floatsikf(a: i32) callconv(.C) f128 { | |
| 21 | return intToFloat(f128, a); | |
| 22 | } | |
| 23 | ||
| 24 | 19 | fn _Qp_itoq(c: *f128, a: i32) callconv(.C) void { |
| 25 | 20 | c.* = intToFloat(f128, a); |
| 26 | 21 | } |
lib/compiler_rt/floatunditf.zig+2-7| ... | ... | @@ -5,22 +5,17 @@ pub const panic = common.panic; |
| 5 | 5 | |
| 6 | 6 | comptime { |
| 7 | 7 | if (common.want_ppc_abi) { |
| 8 | @export(__floatundikf, .{ .name = "__floatundikf", .linkage = common.linkage }); | |
| 8 | @export(__floatunditf, .{ .name = "__floatundikf", .linkage = common.linkage }); | |
| 9 | 9 | } else if (common.want_sparc_abi) { |
| 10 | 10 | @export(_Qp_uxtoq, .{ .name = "_Qp_uxtoq", .linkage = common.linkage }); |
| 11 | } else { | |
| 12 | @export(__floatunditf, .{ .name = "__floatunditf", .linkage = common.linkage }); | |
| 13 | 11 | } |
| 12 | @export(__floatunditf, .{ .name = "__floatunditf", .linkage = common.linkage }); | |
| 14 | 13 | } |
| 15 | 14 | |
| 16 | 15 | pub fn __floatunditf(a: u64) callconv(.C) f128 { |
| 17 | 16 | return intToFloat(f128, a); |
| 18 | 17 | } |
| 19 | 18 | |
| 20 | fn __floatundikf(a: u64) callconv(.C) f128 { | |
| 21 | return intToFloat(f128, a); | |
| 22 | } | |
| 23 | ||
| 24 | 19 | fn _Qp_uxtoq(c: *f128, a: u64) callconv(.C) void { |
| 25 | 20 | c.* = intToFloat(f128, a); |
| 26 | 21 | } |
lib/compiler_rt/floatunsitf.zig+2-7| ... | ... | @@ -5,22 +5,17 @@ pub const panic = common.panic; |
| 5 | 5 | |
| 6 | 6 | comptime { |
| 7 | 7 | if (common.want_ppc_abi) { |
| 8 | @export(__floatunsikf, .{ .name = "__floatunsikf", .linkage = common.linkage }); | |
| 8 | @export(__floatunsitf, .{ .name = "__floatunsikf", .linkage = common.linkage }); | |
| 9 | 9 | } else if (common.want_sparc_abi) { |
| 10 | 10 | @export(_Qp_uitoq, .{ .name = "_Qp_uitoq", .linkage = common.linkage }); |
| 11 | } else { | |
| 12 | @export(__floatunsitf, .{ .name = "__floatunsitf", .linkage = common.linkage }); | |
| 13 | 11 | } |
| 12 | @export(__floatunsitf, .{ .name = "__floatunsitf", .linkage = common.linkage }); | |
| 14 | 13 | } |
| 15 | 14 | |
| 16 | 15 | pub fn __floatunsitf(a: u32) callconv(.C) f128 { |
| 17 | 16 | return intToFloat(f128, a); |
| 18 | 17 | } |
| 19 | 18 | |
| 20 | fn __floatunsikf(a: u32) callconv(.C) f128 { | |
| 21 | return intToFloat(f128, a); | |
| 22 | } | |
| 23 | ||
| 24 | 19 | fn _Qp_uitoq(c: *f128, a: u32) callconv(.C) void { |
| 25 | 20 | c.* = intToFloat(f128, a); |
| 26 | 21 | } |
lib/compiler_rt/floatuntitf.zig+5-4| ... | ... | @@ -5,12 +5,13 @@ const intToFloat = @import("./int_to_float.zig").intToFloat; |
| 5 | 5 | pub const panic = common.panic; |
| 6 | 6 | |
| 7 | 7 | comptime { |
| 8 | const symbol_name = if (common.want_ppc_abi) "__floatuntikf" else "__floatuntitf"; | |
| 9 | ||
| 10 | 8 | if (common.want_windows_v2u64_abi) { |
| 11 | @export(__floatuntitf_windows_x86_64, .{ .name = symbol_name, .linkage = common.linkage }); | |
| 9 | @export(__floatuntitf_windows_x86_64, .{ .name = "__floatuntitf", .linkage = common.linkage }); | |
| 12 | 10 | } else { |
| 13 | @export(__floatuntitf, .{ .name = symbol_name, .linkage = common.linkage }); | |
| 11 | if (common.want_ppc_abi) { | |
| 12 | @export(__floatuntitf, .{ .name = "__floatuntikf", .linkage = common.linkage }); | |
| 13 | } | |
| 14 | @export(__floatuntitf, .{ .name = "__floatuntitf", .linkage = common.linkage }); | |
| 14 | 15 | } |
| 15 | 16 | } |
| 16 | 17 |
lib/compiler_rt/floor.zig+4-2| ... | ... | @@ -18,8 +18,10 @@ comptime { |
| 18 | 18 | @export(floorf, .{ .name = "floorf", .linkage = common.linkage }); |
| 19 | 19 | @export(floor, .{ .name = "floor", .linkage = common.linkage }); |
| 20 | 20 | @export(__floorx, .{ .name = "__floorx", .linkage = common.linkage }); |
| 21 | const floorq_sym_name = if (common.want_ppc_abi) "floorf128" else "floorq"; | |
| 22 | @export(floorq, .{ .name = floorq_sym_name, .linkage = common.linkage }); | |
| 21 | if (common.want_ppc_abi) { | |
| 22 | @export(floorq, .{ .name = "floorf128", .linkage = common.linkage }); | |
| 23 | } | |
| 24 | @export(floorq, .{ .name = "floorq", .linkage = common.linkage }); | |
| 23 | 25 | @export(floorl, .{ .name = "floorl", .linkage = common.linkage }); |
| 24 | 26 | } |
| 25 | 27 |
lib/compiler_rt/fma.zig+4-2| ... | ... | @@ -19,8 +19,10 @@ comptime { |
| 19 | 19 | @export(fmaf, .{ .name = "fmaf", .linkage = common.linkage }); |
| 20 | 20 | @export(fma, .{ .name = "fma", .linkage = common.linkage }); |
| 21 | 21 | @export(__fmax, .{ .name = "__fmax", .linkage = common.linkage }); |
| 22 | const fmaq_sym_name = if (common.want_ppc_abi) "fmaf128" else "fmaq"; | |
| 23 | @export(fmaq, .{ .name = fmaq_sym_name, .linkage = common.linkage }); | |
| 22 | if (common.want_ppc_abi) { | |
| 23 | @export(fmaq, .{ .name = "fmaf128", .linkage = common.linkage }); | |
| 24 | } | |
| 25 | @export(fmaq, .{ .name = "fmaq", .linkage = common.linkage }); | |
| 24 | 26 | @export(fmal, .{ .name = "fmal", .linkage = common.linkage }); |
| 25 | 27 | } |
| 26 | 28 |
lib/compiler_rt/fmax.zig+4-2| ... | ... | @@ -11,8 +11,10 @@ comptime { |
| 11 | 11 | @export(fmaxf, .{ .name = "fmaxf", .linkage = common.linkage }); |
| 12 | 12 | @export(fmax, .{ .name = "fmax", .linkage = common.linkage }); |
| 13 | 13 | @export(__fmaxx, .{ .name = "__fmaxx", .linkage = common.linkage }); |
| 14 | const fmaxq_sym_name = if (common.want_ppc_abi) "fmaxf128" else "fmaxq"; | |
| 15 | @export(fmaxq, .{ .name = fmaxq_sym_name, .linkage = common.linkage }); | |
| 14 | if (common.want_ppc_abi) { | |
| 15 | @export(fmaxq, .{ .name = "fmaxf128", .linkage = common.linkage }); | |
| 16 | } | |
| 17 | @export(fmaxq, .{ .name = "fmaxq", .linkage = common.linkage }); | |
| 16 | 18 | @export(fmaxl, .{ .name = "fmaxl", .linkage = common.linkage }); |
| 17 | 19 | } |
| 18 | 20 |
lib/compiler_rt/fmin.zig+4-2| ... | ... | @@ -11,8 +11,10 @@ comptime { |
| 11 | 11 | @export(fminf, .{ .name = "fminf", .linkage = common.linkage }); |
| 12 | 12 | @export(fmin, .{ .name = "fmin", .linkage = common.linkage }); |
| 13 | 13 | @export(__fminx, .{ .name = "__fminx", .linkage = common.linkage }); |
| 14 | const fminq_sym_name = if (common.want_ppc_abi) "fminf128" else "fminq"; | |
| 15 | @export(fminq, .{ .name = fminq_sym_name, .linkage = common.linkage }); | |
| 14 | if (common.want_ppc_abi) { | |
| 15 | @export(fminq, .{ .name = "fminf128", .linkage = common.linkage }); | |
| 16 | } | |
| 17 | @export(fminq, .{ .name = "fminq", .linkage = common.linkage }); | |
| 16 | 18 | @export(fminl, .{ .name = "fminl", .linkage = common.linkage }); |
| 17 | 19 | } |
| 18 | 20 |
lib/compiler_rt/fmod.zig+4-2| ... | ... | @@ -13,8 +13,10 @@ comptime { |
| 13 | 13 | @export(fmodf, .{ .name = "fmodf", .linkage = common.linkage }); |
| 14 | 14 | @export(fmod, .{ .name = "fmod", .linkage = common.linkage }); |
| 15 | 15 | @export(__fmodx, .{ .name = "__fmodx", .linkage = common.linkage }); |
| 16 | const fmodq_sym_name = if (common.want_ppc_abi) "fmodf128" else "fmodq"; | |
| 17 | @export(fmodq, .{ .name = fmodq_sym_name, .linkage = common.linkage }); | |
| 16 | if (common.want_ppc_abi) { | |
| 17 | @export(fmodq, .{ .name = "fmodf128", .linkage = common.linkage }); | |
| 18 | } | |
| 19 | @export(fmodq, .{ .name = "fmodq", .linkage = common.linkage }); | |
| 18 | 20 | @export(fmodl, .{ .name = "fmodl", .linkage = common.linkage }); |
| 19 | 21 | } |
| 20 | 22 |
lib/compiler_rt/getf2.zig+4-13| ... | ... | @@ -7,15 +7,14 @@ pub const panic = common.panic; |
| 7 | 7 | |
| 8 | 8 | comptime { |
| 9 | 9 | if (common.want_ppc_abi) { |
| 10 | @export(__gekf2, .{ .name = "__gekf2", .linkage = common.linkage }); | |
| 11 | @export(__gtkf2, .{ .name = "__gtkf2", .linkage = common.linkage }); | |
| 10 | @export(__getf2, .{ .name = "__gekf2", .linkage = common.linkage }); | |
| 11 | @export(__gttf2, .{ .name = "__gtkf2", .linkage = common.linkage }); | |
| 12 | 12 | } else if (common.want_sparc_abi) { |
| 13 | 13 | // These exports are handled in cmptf2.zig because gt and ge on sparc |
| 14 | 14 | // are based on calling _Qp_cmp. |
| 15 | } else { | |
| 16 | @export(__getf2, .{ .name = "__getf2", .linkage = common.linkage }); | |
| 17 | @export(__gttf2, .{ .name = "__gttf2", .linkage = common.linkage }); | |
| 18 | 15 | } |
| 16 | @export(__getf2, .{ .name = "__getf2", .linkage = common.linkage }); | |
| 17 | @export(__gttf2, .{ .name = "__gttf2", .linkage = common.linkage }); | |
| 19 | 18 | } |
| 20 | 19 | |
| 21 | 20 | /// "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 { |
| 29 | 28 | fn __gttf2(a: f128, b: f128) callconv(.C) i32 { |
| 30 | 29 | return __getf2(a, b); |
| 31 | 30 | } |
| 32 | ||
| 33 | fn __gekf2(a: f128, b: f128) callconv(.C) i32 { | |
| 34 | return __getf2(a, b); | |
| 35 | } | |
| 36 | ||
| 37 | fn __gtkf2(a: f128, b: f128) callconv(.C) i32 { | |
| 38 | return __getf2(a, b); | |
| 39 | } |
lib/compiler_rt/log.zig+4-2| ... | ... | @@ -18,8 +18,10 @@ comptime { |
| 18 | 18 | @export(logf, .{ .name = "logf", .linkage = common.linkage }); |
| 19 | 19 | @export(log, .{ .name = "log", .linkage = common.linkage }); |
| 20 | 20 | @export(__logx, .{ .name = "__logx", .linkage = common.linkage }); |
| 21 | const logq_sym_name = if (common.want_ppc_abi) "logf128" else "logq"; | |
| 22 | @export(logq, .{ .name = logq_sym_name, .linkage = common.linkage }); | |
| 21 | if (common.want_ppc_abi) { | |
| 22 | @export(logq, .{ .name = "logf128", .linkage = common.linkage }); | |
| 23 | } | |
| 24 | @export(logq, .{ .name = "logq", .linkage = common.linkage }); | |
| 23 | 25 | @export(logl, .{ .name = "logl", .linkage = common.linkage }); |
| 24 | 26 | } |
| 25 | 27 |
lib/compiler_rt/log10.zig+4-2| ... | ... | @@ -19,8 +19,10 @@ comptime { |
| 19 | 19 | @export(log10f, .{ .name = "log10f", .linkage = common.linkage }); |
| 20 | 20 | @export(log10, .{ .name = "log10", .linkage = common.linkage }); |
| 21 | 21 | @export(__log10x, .{ .name = "__log10x", .linkage = common.linkage }); |
| 22 | const log10q_sym_name = if (common.want_ppc_abi) "log10f128" else "log10q"; | |
| 23 | @export(log10q, .{ .name = log10q_sym_name, .linkage = common.linkage }); | |
| 22 | if (common.want_ppc_abi) { | |
| 23 | @export(log10q, .{ .name = "log10f128", .linkage = common.linkage }); | |
| 24 | } | |
| 25 | @export(log10q, .{ .name = "log10q", .linkage = common.linkage }); | |
| 24 | 26 | @export(log10l, .{ .name = "log10l", .linkage = common.linkage }); |
| 25 | 27 | } |
| 26 | 28 |
lib/compiler_rt/log2.zig+4-2| ... | ... | @@ -19,8 +19,10 @@ comptime { |
| 19 | 19 | @export(log2f, .{ .name = "log2f", .linkage = common.linkage }); |
| 20 | 20 | @export(log2, .{ .name = "log2", .linkage = common.linkage }); |
| 21 | 21 | @export(__log2x, .{ .name = "__log2x", .linkage = common.linkage }); |
| 22 | const log2q_sym_name = if (common.want_ppc_abi) "log2f128" else "log2q"; | |
| 23 | @export(log2q, .{ .name = log2q_sym_name, .linkage = common.linkage }); | |
| 22 | if (common.want_ppc_abi) { | |
| 23 | @export(log2q, .{ .name = "log2f128", .linkage = common.linkage }); | |
| 24 | } | |
| 25 | @export(log2q, .{ .name = "log2q", .linkage = common.linkage }); | |
| 24 | 26 | @export(log2l, .{ .name = "log2l", .linkage = common.linkage }); |
| 25 | 27 | } |
| 26 | 28 |
lib/compiler_rt/multf3.zig+2-7| ... | ... | @@ -5,22 +5,17 @@ pub const panic = common.panic; |
| 5 | 5 | |
| 6 | 6 | comptime { |
| 7 | 7 | if (common.want_ppc_abi) { |
| 8 | @export(__mulkf3, .{ .name = "__mulkf3", .linkage = common.linkage }); | |
| 8 | @export(__multf3, .{ .name = "__mulkf3", .linkage = common.linkage }); | |
| 9 | 9 | } else if (common.want_sparc_abi) { |
| 10 | 10 | @export(_Qp_mul, .{ .name = "_Qp_mul", .linkage = common.linkage }); |
| 11 | } else { | |
| 12 | @export(__multf3, .{ .name = "__multf3", .linkage = common.linkage }); | |
| 13 | 11 | } |
| 12 | @export(__multf3, .{ .name = "__multf3", .linkage = common.linkage }); | |
| 14 | 13 | } |
| 15 | 14 | |
| 16 | 15 | pub fn __multf3(a: f128, b: f128) callconv(.C) f128 { |
| 17 | 16 | return mulf3(f128, a, b); |
| 18 | 17 | } |
| 19 | 18 | |
| 20 | fn __mulkf3(a: f128, b: f128) callconv(.C) f128 { | |
| 21 | return mulf3(f128, a, b); | |
| 22 | } | |
| 23 | ||
| 24 | 19 | fn _Qp_mul(c: *f128, a: *const f128, b: *const f128) callconv(.C) void { |
| 25 | 20 | c.* = mulf3(f128, a.*, b.*); |
| 26 | 21 | } |
lib/compiler_rt/round.zig+4-2| ... | ... | @@ -18,8 +18,10 @@ comptime { |
| 18 | 18 | @export(roundf, .{ .name = "roundf", .linkage = common.linkage }); |
| 19 | 19 | @export(round, .{ .name = "round", .linkage = common.linkage }); |
| 20 | 20 | @export(__roundx, .{ .name = "__roundx", .linkage = common.linkage }); |
| 21 | const roundq_sym_name = if (common.want_ppc_abi) "roundf128" else "roundq"; | |
| 22 | @export(roundq, .{ .name = roundq_sym_name, .linkage = common.linkage }); | |
| 21 | if (common.want_ppc_abi) { | |
| 22 | @export(roundq, .{ .name = "roundf128", .linkage = common.linkage }); | |
| 23 | } | |
| 24 | @export(roundq, .{ .name = "roundq", .linkage = common.linkage }); | |
| 23 | 25 | @export(roundl, .{ .name = "roundl", .linkage = common.linkage }); |
| 24 | 26 | } |
| 25 | 27 |
lib/compiler_rt/sin.zig+4-2| ... | ... | @@ -22,8 +22,10 @@ comptime { |
| 22 | 22 | @export(sinf, .{ .name = "sinf", .linkage = common.linkage }); |
| 23 | 23 | @export(sin, .{ .name = "sin", .linkage = common.linkage }); |
| 24 | 24 | @export(__sinx, .{ .name = "__sinx", .linkage = common.linkage }); |
| 25 | const sinq_sym_name = if (common.want_ppc_abi) "sinf128" else "sinq"; | |
| 26 | @export(sinq, .{ .name = sinq_sym_name, .linkage = common.linkage }); | |
| 25 | if (common.want_ppc_abi) { | |
| 26 | @export(sinq, .{ .name = "sinf128", .linkage = common.linkage }); | |
| 27 | } | |
| 28 | @export(sinq, .{ .name = "sinq", .linkage = common.linkage }); | |
| 27 | 29 | @export(sinl, .{ .name = "sinl", .linkage = common.linkage }); |
| 28 | 30 | } |
| 29 | 31 |
lib/compiler_rt/sincos.zig+4-2| ... | ... | @@ -14,8 +14,10 @@ comptime { |
| 14 | 14 | @export(sincosf, .{ .name = "sincosf", .linkage = common.linkage }); |
| 15 | 15 | @export(sincos, .{ .name = "sincos", .linkage = common.linkage }); |
| 16 | 16 | @export(__sincosx, .{ .name = "__sincosx", .linkage = common.linkage }); |
| 17 | const sincosq_sym_name = if (common.want_ppc_abi) "sincosf128" else "sincosq"; | |
| 18 | @export(sincosq, .{ .name = sincosq_sym_name, .linkage = common.linkage }); | |
| 17 | if (common.want_ppc_abi) { | |
| 18 | @export(sincosq, .{ .name = "sincosf128", .linkage = common.linkage }); | |
| 19 | } | |
| 20 | @export(sincosq, .{ .name = "sincosq", .linkage = common.linkage }); | |
| 19 | 21 | @export(sincosl, .{ .name = "sincosl", .linkage = common.linkage }); |
| 20 | 22 | } |
| 21 | 23 |
lib/compiler_rt/sqrt.zig+4-2| ... | ... | @@ -11,8 +11,10 @@ comptime { |
| 11 | 11 | @export(sqrtf, .{ .name = "sqrtf", .linkage = common.linkage }); |
| 12 | 12 | @export(sqrt, .{ .name = "sqrt", .linkage = common.linkage }); |
| 13 | 13 | @export(__sqrtx, .{ .name = "__sqrtx", .linkage = common.linkage }); |
| 14 | const sqrtq_sym_name = if (common.want_ppc_abi) "sqrtf128" else "sqrtq"; | |
| 15 | @export(sqrtq, .{ .name = sqrtq_sym_name, .linkage = common.linkage }); | |
| 14 | if (common.want_ppc_abi) { | |
| 15 | @export(sqrtq, .{ .name = "sqrtf128", .linkage = common.linkage }); | |
| 16 | } | |
| 17 | @export(sqrtq, .{ .name = "sqrtq", .linkage = common.linkage }); | |
| 16 | 18 | @export(sqrtl, .{ .name = "sqrtl", .linkage = common.linkage }); |
| 17 | 19 | } |
| 18 | 20 |
lib/compiler_rt/subtf3.zig+2-7| ... | ... | @@ -4,22 +4,17 @@ pub const panic = common.panic; |
| 4 | 4 | |
| 5 | 5 | comptime { |
| 6 | 6 | if (common.want_ppc_abi) { |
| 7 | @export(__subkf3, .{ .name = "__subkf3", .linkage = common.linkage }); | |
| 7 | @export(__subtf3, .{ .name = "__subkf3", .linkage = common.linkage }); | |
| 8 | 8 | } else if (common.want_sparc_abi) { |
| 9 | 9 | @export(_Qp_sub, .{ .name = "_Qp_sub", .linkage = common.linkage }); |
| 10 | } else { | |
| 11 | @export(__subtf3, .{ .name = "__subtf3", .linkage = common.linkage }); | |
| 12 | 10 | } |
| 11 | @export(__subtf3, .{ .name = "__subtf3", .linkage = common.linkage }); | |
| 13 | 12 | } |
| 14 | 13 | |
| 15 | 14 | pub fn __subtf3(a: f128, b: f128) callconv(.C) f128 { |
| 16 | 15 | return sub(a, b); |
| 17 | 16 | } |
| 18 | 17 | |
| 19 | fn __subkf3(a: f128, b: f128) callconv(.C) f128 { | |
| 20 | return sub(a, b); | |
| 21 | } | |
| 22 | ||
| 23 | 18 | fn _Qp_sub(c: *f128, a: *const f128, b: *const f128) callconv(.C) void { |
| 24 | 19 | c.* = sub(a.*, b.*); |
| 25 | 20 | } |
lib/compiler_rt/trunc.zig+4-2| ... | ... | @@ -18,8 +18,10 @@ comptime { |
| 18 | 18 | @export(truncf, .{ .name = "truncf", .linkage = common.linkage }); |
| 19 | 19 | @export(trunc, .{ .name = "trunc", .linkage = common.linkage }); |
| 20 | 20 | @export(__truncx, .{ .name = "__truncx", .linkage = common.linkage }); |
| 21 | const truncq_sym_name = if (common.want_ppc_abi) "truncf128" else "truncq"; | |
| 22 | @export(truncq, .{ .name = truncq_sym_name, .linkage = common.linkage }); | |
| 21 | if (common.want_ppc_abi) { | |
| 22 | @export(truncq, .{ .name = "truncf128", .linkage = common.linkage }); | |
| 23 | } | |
| 24 | @export(truncq, .{ .name = "truncq", .linkage = common.linkage }); | |
| 23 | 25 | @export(truncl, .{ .name = "truncl", .linkage = common.linkage }); |
| 24 | 26 | } |
| 25 | 27 |
lib/compiler_rt/trunctfdf2.zig+2-7| ... | ... | @@ -5,22 +5,17 @@ pub const panic = common.panic; |
| 5 | 5 | |
| 6 | 6 | comptime { |
| 7 | 7 | if (common.want_ppc_abi) { |
| 8 | @export(__trunckfdf2, .{ .name = "__trunckfdf2", .linkage = common.linkage }); | |
| 8 | @export(__trunctfdf2, .{ .name = "__trunckfdf2", .linkage = common.linkage }); | |
| 9 | 9 | } else if (common.want_sparc_abi) { |
| 10 | 10 | @export(_Qp_qtod, .{ .name = "_Qp_qtod", .linkage = common.linkage }); |
| 11 | } else { | |
| 12 | @export(__trunctfdf2, .{ .name = "__trunctfdf2", .linkage = common.linkage }); | |
| 13 | 11 | } |
| 12 | @export(__trunctfdf2, .{ .name = "__trunctfdf2", .linkage = common.linkage }); | |
| 14 | 13 | } |
| 15 | 14 | |
| 16 | 15 | pub fn __trunctfdf2(a: f128) callconv(.C) f64 { |
| 17 | 16 | return truncf(f64, f128, a); |
| 18 | 17 | } |
| 19 | 18 | |
| 20 | fn __trunckfdf2(a: f128) callconv(.C) f64 { | |
| 21 | return truncf(f64, f128, a); | |
| 22 | } | |
| 23 | ||
| 24 | 19 | fn _Qp_qtod(a: *const f128) callconv(.C) f64 { |
| 25 | 20 | return truncf(f64, f128, a.*); |
| 26 | 21 | } |
lib/compiler_rt/trunctfsf2.zig+2-7| ... | ... | @@ -5,22 +5,17 @@ pub const panic = common.panic; |
| 5 | 5 | |
| 6 | 6 | comptime { |
| 7 | 7 | if (common.want_ppc_abi) { |
| 8 | @export(__trunckfsf2, .{ .name = "__trunckfsf2", .linkage = common.linkage }); | |
| 8 | @export(__trunctfsf2, .{ .name = "__trunckfsf2", .linkage = common.linkage }); | |
| 9 | 9 | } else if (common.want_sparc_abi) { |
| 10 | 10 | @export(_Qp_qtos, .{ .name = "_Qp_qtos", .linkage = common.linkage }); |
| 11 | } else { | |
| 12 | @export(__trunctfsf2, .{ .name = "__trunctfsf2", .linkage = common.linkage }); | |
| 13 | 11 | } |
| 12 | @export(__trunctfsf2, .{ .name = "__trunctfsf2", .linkage = common.linkage }); | |
| 14 | 13 | } |
| 15 | 14 | |
| 16 | 15 | pub fn __trunctfsf2(a: f128) callconv(.C) f32 { |
| 17 | 16 | return truncf(f32, f128, a); |
| 18 | 17 | } |
| 19 | 18 | |
| 20 | fn __trunckfsf2(a: f128) callconv(.C) f32 { | |
| 21 | return truncf(f32, f128, a); | |
| 22 | } | |
| 23 | ||
| 24 | 19 | fn _Qp_qtos(a: *const f128) callconv(.C) f32 { |
| 25 | 20 | return truncf(f32, f128, a.*); |
| 26 | 21 | } |
lib/compiler_rt/unordtf2.zig+2-7| ... | ... | @@ -5,19 +5,14 @@ pub const panic = common.panic; |
| 5 | 5 | |
| 6 | 6 | comptime { |
| 7 | 7 | if (common.want_ppc_abi) { |
| 8 | @export(__unordkf2, .{ .name = "__unordkf2", .linkage = common.linkage }); | |
| 8 | @export(__unordtf2, .{ .name = "__unordkf2", .linkage = common.linkage }); | |
| 9 | 9 | } else if (common.want_sparc_abi) { |
| 10 | 10 | // These exports are handled in cmptf2.zig because unordered comparisons |
| 11 | 11 | // are based on calling _Qp_cmp. |
| 12 | } else { | |
| 13 | @export(__unordtf2, .{ .name = "__unordtf2", .linkage = common.linkage }); | |
| 14 | 12 | } |
| 13 | @export(__unordtf2, .{ .name = "__unordtf2", .linkage = common.linkage }); | |
| 15 | 14 | } |
| 16 | 15 | |
| 17 | 16 | fn __unordtf2(a: f128, b: f128) callconv(.C) i32 { |
| 18 | 17 | return comparef.unordcmp(f128, a, b); |
| 19 | 18 | } |
| 20 | ||
| 21 | fn __unordkf2(a: f128, b: f128) callconv(.C) i32 { | |
| 22 | return comparef.unordcmp(f128, a, b); | |
| 23 | } |