authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-04-28 12:02:15+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-04-28 12:05:19+02:00
log2c5f54c8983ed8649c1a35742bd24e696d6e34b3
tree7cb76559665e66c9b65bb5c9e66cefe355b4791e
parentfc55c1b7a1b62f0ffa4de5dfcfba03c84feb1ca5
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

compiler-rt: Add missing _Qp_sqrt export for sparc64.

https://github.com/ziglang/zig/issues/23716

1 files changed, 6 insertions(+), 0 deletions(-)

lib/compiler_rt/sqrt.zig+6
......@@ -13,6 +13,8 @@ comptime {
1313 @export(&__sqrtx, .{ .name = "__sqrtx", .linkage = common.linkage, .visibility = common.visibility });
1414 if (common.want_ppc_abi) {
1515 @export(&sqrtq, .{ .name = "sqrtf128", .linkage = common.linkage, .visibility = common.visibility });
16 } else if (common.want_sparc_abi) {
17 @export(&_Qp_sqrt, .{ .name = "_Qp_sqrt", .linkage = common.linkage, .visibility = common.visibility });
1618 }
1719 @export(&sqrtq, .{ .name = "sqrtq", .linkage = common.linkage, .visibility = common.visibility });
1820 @export(&sqrtl, .{ .name = "sqrtl", .linkage = common.linkage, .visibility = common.visibility });
......@@ -242,6 +244,10 @@ pub fn sqrtq(x: f128) callconv(.c) f128 {
242244 return sqrt(@floatCast(x));
243245}
244246
247fn _Qp_sqrt(c: *f128, a: *f128) callconv(.c) void {
248 c.* = sqrt(@floatCast(a.*));
249}
250
245251pub fn sqrtl(x: c_longdouble) callconv(.c) c_longdouble {
246252 switch (@typeInfo(c_longdouble).float.bits) {
247253 16 => return __sqrth(x),