mirror of
https://github.com/ziglang/zig.git
synced 2024-11-26 14:20:25 +00:00
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.
This commit is contained in:
parent
94945864b9
commit
c50f33b111
@ -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.*);
|
||||
}
|
||||
|
@ -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 });
|
||||
}
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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 });
|
||||
}
|
||||
|
||||
|
@ -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.*);
|
||||
}
|
||||
|
@ -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 });
|
||||
}
|
||||
|
||||
|
@ -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 });
|
||||
}
|
||||
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -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 });
|
||||
}
|
||||
|
||||
|
@ -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.*);
|
||||
}
|
||||
|
@ -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.*);
|
||||
}
|
||||
|
@ -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.*);
|
||||
}
|
||||
|
@ -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.*);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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 });
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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 });
|
||||
}
|
||||
|
||||
|
@ -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 });
|
||||
}
|
||||
|
||||
|
@ -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 });
|
||||
}
|
||||
|
||||
|
@ -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 });
|
||||
}
|
||||
|
||||
|
@ -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 });
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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 });
|
||||
}
|
||||
|
||||
|
@ -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 });
|
||||
}
|
||||
|
||||
|
@ -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 });
|
||||
}
|
||||
|
||||
|
@ -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.*);
|
||||
}
|
||||
|
@ -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 });
|
||||
}
|
||||
|
||||
|
@ -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 });
|
||||
}
|
||||
|
||||
|
@ -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 });
|
||||
}
|
||||
|
||||
|
@ -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 });
|
||||
}
|
||||
|
||||
|
@ -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.*);
|
||||
}
|
||||
|
@ -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 });
|
||||
}
|
||||
|
||||
|
@ -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.*);
|
||||
}
|
||||
|
@ -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.*);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user