| ... | ... | @@ -8,6 +8,7 @@ const abi = builtin.abi; |
| 8 | 8 | const is_gnu = abi.isGnu(); |
| 9 | 9 | const is_mingw = os_tag == .windows and is_gnu; |
| 10 | 10 | const is_darwin = std.Target.Os.Tag.isDarwin(os_tag); |
| 11 | const is_ppc = arch.isPPC() or arch.isPPC64(); |
| 11 | 12 | |
| 12 | 13 | const linkage = if (is_test) |
| 13 | 14 | std.builtin.GlobalLinkage.Internal |
| ... | ... | @@ -795,7 +796,7 @@ comptime { |
| 795 | 796 | @export(_Qp_qtod, .{ .name = "_Qp_qtod", .linkage = linkage }); |
| 796 | 797 | } |
| 797 | 798 | |
| 798 | | if ((arch.isPPC() or arch.isPPC64()) and !is_test) { |
| 799 | if (is_ppc and !is_test) { |
| 799 | 800 | @export(__addtf3, .{ .name = "__addkf3", .linkage = linkage }); |
| 800 | 801 | @export(__subtf3, .{ .name = "__subkf3", .linkage = linkage }); |
| 801 | 802 | @export(__multf3, .{ .name = "__mulkf3", .linkage = linkage }); |
| ... | ... | @@ -820,10 +821,6 @@ comptime { |
| 820 | 821 | @export(__letf2, .{ .name = "__lekf2", .linkage = linkage }); |
| 821 | 822 | @export(__getf2, .{ .name = "__gtkf2", .linkage = linkage }); |
| 822 | 823 | @export(__unordtf2, .{ .name = "__unordkf2", .linkage = linkage }); |
| 823 | | |
| 824 | | // LLVM PPC backend lowers f128 fma to `fmaf128`. |
| 825 | | const fmaq = @import("./compiler_rt/fma.zig").fmaq; |
| 826 | | @export(fmaq, .{ .name = "fmaf128", .linkage = linkage }); |
| 827 | 824 | } |
| 828 | 825 | } |
| 829 | 826 | |
| ... | ... | @@ -845,6 +842,8 @@ inline fn mathExport(double_name: []const u8, comptime import: type, is_standard |
| 845 | 842 | @export(xf80_fn, .{ .name = xf80_name, .linkage = linkage }); |
| 846 | 843 | @export(quad_fn, .{ .name = quad_name, .linkage = linkage }); |
| 847 | 844 | |
| 845 | if (is_test) return; |
| 846 | |
| 848 | 847 | const pairs = .{ |
| 849 | 848 | .{ f16, half_fn }, |
| 850 | 849 | .{ f32, float_fn }, |
| ... | ... | @@ -864,6 +863,11 @@ inline fn mathExport(double_name: []const u8, comptime import: type, is_standard |
| 864 | 863 | } |
| 865 | 864 | } |
| 866 | 865 | } |
| 866 | |
| 867 | if (is_ppc and is_standard) { |
| 868 | // LLVM PPC backend lowers f128 ops with the suffix `f128` instead of `l`. |
| 869 | @export(quad_fn, .{ .name = double_name ++ "f128", .linkage = linkage }); |
| 870 | } |
| 867 | 871 | } |
| 868 | 872 | |
| 869 | 873 | // Avoid dragging in the runtime safety mechanisms into this .o file, |