extenddftf2.zig (781B) - Raw
1 const common = @import("./common.zig"); 2 const extendf = @import("./extendf.zig").extendf; 3 4 pub const panic = common.panic; 5 6 comptime { 7 if (common.want_ppc_abi) { 8 @export(&__extenddftf2, .{ .name = "__extenddfkf2", .linkage = common.linkage, .visibility = common.visibility }); 9 } else if (common.want_sparc_abi) { 10 @export(&_Qp_dtoq, .{ .name = "_Qp_dtoq", .linkage = common.linkage, .visibility = common.visibility }); 11 } 12 @export(&__extenddftf2, .{ .name = "__extenddftf2", .linkage = common.linkage, .visibility = common.visibility }); 13 } 14 15 pub fn __extenddftf2(a: f64) callconv(.c) f128 { 16 return extendf(f128, f64, @as(u64, @bitCast(a))); 17 } 18 19 fn _Qp_dtoq(c: *f128, a: f64) callconv(.c) void { 20 c.* = extendf(f128, f64, @as(u64, @bitCast(a))); 21 }