mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 22:35:24 +00:00
compiler-rt: Add missing _Qp_sqrt export for sparc64.
https://github.com/ziglang/zig/issues/23716
This commit is contained in:
parent
aea1272a3f
commit
0209c68fcc
@ -13,6 +13,8 @@ comptime {
|
||||
@export(&__sqrtx, .{ .name = "__sqrtx", .linkage = common.linkage, .visibility = common.visibility });
|
||||
if (common.want_ppc_abi) {
|
||||
@export(&sqrtq, .{ .name = "sqrtf128", .linkage = common.linkage, .visibility = common.visibility });
|
||||
} else if (common.want_sparc_abi) {
|
||||
@export(&_Qp_sqrt, .{ .name = "_Qp_sqrt", .linkage = common.linkage, .visibility = common.visibility });
|
||||
}
|
||||
@export(&sqrtq, .{ .name = "sqrtq", .linkage = common.linkage, .visibility = common.visibility });
|
||||
@export(&sqrtl, .{ .name = "sqrtl", .linkage = common.linkage, .visibility = common.visibility });
|
||||
@ -242,6 +244,10 @@ pub fn sqrtq(x: f128) callconv(.C) f128 {
|
||||
return sqrt(@floatCast(x));
|
||||
}
|
||||
|
||||
fn _Qp_sqrt(c: *f128, a: *f128) callconv(.c) void {
|
||||
c.* = sqrt(@floatCast(a.*));
|
||||
}
|
||||
|
||||
pub fn sqrtl(x: c_longdouble) callconv(.C) c_longdouble {
|
||||
switch (@typeInfo(c_longdouble).float.bits) {
|
||||
16 => return __sqrth(x),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user