mirror of
https://github.com/ziglang/zig.git
synced 2026-01-21 06:45:24 +00:00
compiler_rt: add missing PPC routines
Adds conditional exports - __fixkfti - __fixunskfti - __floattikf - __negkf2 - __mulkc3 - __divkc3 - __powikf2 and adjusts tools/gen_stubs.zig. From https://gcc.gnu.org/onlinedocs/gcc/Floating-Types.html: "When long double transitions to __float128 on PowerPC in the future, __ibm128 will remain for use in conversions between the two types." Hence `__extendkftf2` and `__trunctfkf2` for conversion are superfluous and only using f128 for `kf` routines is justified. Closes #16057.
This commit is contained in:
parent
e95fc2023f
commit
f043071cdf
@ -4,7 +4,11 @@ const Complex = @import("./mulc3.zig").Complex;
|
||||
|
||||
comptime {
|
||||
if (@import("builtin").zig_backend != .stage2_c) {
|
||||
@export(__divtc3, .{ .name = "__divtc3", .linkage = common.linkage, .visibility = common.visibility });
|
||||
if (common.want_ppc_abi) {
|
||||
@export(__divtc3, .{ .name = "__divkc3", .linkage = common.linkage, .visibility = common.visibility });
|
||||
} else {
|
||||
@export(__divtc3, .{ .name = "__divtc3", .linkage = common.linkage, .visibility = common.visibility });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -7,6 +7,8 @@ pub const panic = common.panic;
|
||||
comptime {
|
||||
if (common.want_windows_v2u64_abi) {
|
||||
@export(__fixtfti_windows_x86_64, .{ .name = "__fixtfti", .linkage = common.linkage, .visibility = common.visibility });
|
||||
} else if (common.want_ppc_abi) {
|
||||
@export(__fixtfti, .{ .name = "__fixkfti", .linkage = common.linkage, .visibility = common.visibility });
|
||||
} else {
|
||||
@export(__fixtfti, .{ .name = "__fixtfti", .linkage = common.linkage, .visibility = common.visibility });
|
||||
}
|
||||
|
||||
@ -7,6 +7,8 @@ pub const panic = common.panic;
|
||||
comptime {
|
||||
if (common.want_windows_v2u64_abi) {
|
||||
@export(__fixunstfti_windows_x86_64, .{ .name = "__fixunstfti", .linkage = common.linkage, .visibility = common.visibility });
|
||||
} else if (common.want_ppc_abi) {
|
||||
@export(__fixunstfti, .{ .name = "__fixunskfti", .linkage = common.linkage, .visibility = common.visibility });
|
||||
} else {
|
||||
@export(__fixunstfti, .{ .name = "__fixunstfti", .linkage = common.linkage, .visibility = common.visibility });
|
||||
}
|
||||
|
||||
@ -7,6 +7,8 @@ pub const panic = common.panic;
|
||||
comptime {
|
||||
if (common.want_windows_v2u64_abi) {
|
||||
@export(__floattitf_windows_x86_64, .{ .name = "__floattitf", .linkage = common.linkage, .visibility = common.visibility });
|
||||
} else if (common.want_ppc_abi) {
|
||||
@export(__floattitf, .{ .name = "__floattikf", .linkage = common.linkage, .visibility = common.visibility });
|
||||
} else {
|
||||
@export(__floattitf, .{ .name = "__floattitf", .linkage = common.linkage, .visibility = common.visibility });
|
||||
}
|
||||
|
||||
@ -5,7 +5,11 @@ pub const panic = common.panic;
|
||||
|
||||
comptime {
|
||||
if (@import("builtin").zig_backend != .stage2_c) {
|
||||
@export(__multc3, .{ .name = "__multc3", .linkage = common.linkage, .visibility = common.visibility });
|
||||
if (common.want_ppc_abi) {
|
||||
@export(__multc3, .{ .name = "__mulkc3", .linkage = common.linkage, .visibility = common.visibility });
|
||||
} else {
|
||||
@export(__multc3, .{ .name = "__multc3", .linkage = common.linkage, .visibility = common.visibility });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -3,7 +3,11 @@ const common = @import("./common.zig");
|
||||
pub const panic = common.panic;
|
||||
|
||||
comptime {
|
||||
@export(__negtf2, .{ .name = "__negtf2", .linkage = common.linkage, .visibility = common.visibility });
|
||||
if (common.want_ppc_abi) {
|
||||
@export(__negtf2, .{ .name = "__negkf2", .linkage = common.linkage, .visibility = common.visibility });
|
||||
} else {
|
||||
@export(__negtf2, .{ .name = "__negtf2", .linkage = common.linkage, .visibility = common.visibility });
|
||||
}
|
||||
}
|
||||
|
||||
fn __negtf2(a: f128) callconv(.C) f128 {
|
||||
|
||||
@ -13,7 +13,11 @@ comptime {
|
||||
@export(__powihf2, .{ .name = "__powihf2", .linkage = common.linkage, .visibility = common.visibility });
|
||||
@export(__powisf2, .{ .name = "__powisf2", .linkage = common.linkage, .visibility = common.visibility });
|
||||
@export(__powidf2, .{ .name = "__powidf2", .linkage = common.linkage, .visibility = common.visibility });
|
||||
@export(__powitf2, .{ .name = "__powitf2", .linkage = common.linkage, .visibility = common.visibility });
|
||||
if (common.want_ppc_abi) {
|
||||
@export(__powitf2, .{ .name = "__powikf2", .linkage = common.linkage, .visibility = common.visibility });
|
||||
} else {
|
||||
@export(__powitf2, .{ .name = "__powitf2", .linkage = common.linkage, .visibility = common.visibility });
|
||||
}
|
||||
@export(__powixf2, .{ .name = "__powixf2", .linkage = common.linkage, .visibility = common.visibility });
|
||||
}
|
||||
|
||||
|
||||
@ -703,6 +703,7 @@ const blacklisted_symbols = [_][]const u8{
|
||||
"__fixdfti",
|
||||
"__fixkfdi",
|
||||
"__fixkfsi",
|
||||
"__fixkfti",
|
||||
"__fixsfdi",
|
||||
"__fixsfsi",
|
||||
"__fixsfti",
|
||||
@ -714,6 +715,7 @@ const blacklisted_symbols = [_][]const u8{
|
||||
"__fixunsdfti",
|
||||
"__fixunskfdi",
|
||||
"__fixunskfsi",
|
||||
"__fixunskfti",
|
||||
"__fixunssfdi",
|
||||
"__fixunssfsi",
|
||||
"__fixunssfti",
|
||||
@ -737,6 +739,7 @@ const blacklisted_symbols = [_][]const u8{
|
||||
"__floatsitf",
|
||||
"__floatsixf",
|
||||
"__floattidf",
|
||||
"__floattikf",
|
||||
"__floattisf",
|
||||
"__floattitf",
|
||||
"__floattixf",
|
||||
@ -802,6 +805,7 @@ const blacklisted_symbols = [_][]const u8{
|
||||
"__muldc3",
|
||||
"__muldf3",
|
||||
"__muldi3",
|
||||
"__mulkc3",
|
||||
"__mulkf3",
|
||||
"__mulodi4",
|
||||
"__mulosi4",
|
||||
@ -835,6 +839,7 @@ const blacklisted_symbols = [_][]const u8{
|
||||
"__popcountti2",
|
||||
"__powidf2",
|
||||
"__powihf2",
|
||||
"__powikf2",
|
||||
"__powisf2",
|
||||
"__powitf2",
|
||||
"__powixf2",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user