2022-06-16 07:09:56 +01:00
|
|
|
const common = @import("./common.zig");
|
|
|
|
const extendf = @import("./extendf.zig").extendf;
|
|
|
|
|
|
|
|
pub const panic = common.panic;
|
|
|
|
|
|
|
|
comptime {
|
|
|
|
if (common.want_ppc_abi) {
|
2022-12-28 13:57:17 +00:00
|
|
|
@export(__extenddftf2, .{ .name = "__extenddfkf2", .linkage = common.linkage, .visibility = common.visibility });
|
2022-06-16 22:18:08 +01:00
|
|
|
} else if (common.want_sparc_abi) {
|
2022-12-28 13:57:17 +00:00
|
|
|
@export(_Qp_dtoq, .{ .name = "_Qp_dtoq", .linkage = common.linkage, .visibility = common.visibility });
|
2022-06-16 07:09:56 +01:00
|
|
|
}
|
2022-12-28 13:57:17 +00:00
|
|
|
@export(__extenddftf2, .{ .name = "__extenddftf2", .linkage = common.linkage, .visibility = common.visibility });
|
2022-06-16 07:09:56 +01:00
|
|
|
}
|
|
|
|
|
2022-06-16 23:14:12 +01:00
|
|
|
pub fn __extenddftf2(a: f64) callconv(.C) f128 {
|
2023-06-22 18:46:56 +01:00
|
|
|
return extendf(f128, f64, @as(u64, @bitCast(a)));
|
2022-06-16 07:09:56 +01:00
|
|
|
}
|
|
|
|
|
2022-06-16 22:18:08 +01:00
|
|
|
fn _Qp_dtoq(c: *f128, a: f64) callconv(.C) void {
|
2023-06-22 18:46:56 +01:00
|
|
|
c.* = extendf(f128, f64, @as(u64, @bitCast(a)));
|
2022-06-16 22:18:08 +01:00
|
|
|
}
|