trunctfdf2.zig (731B) - Raw
1 const common = @import("./common.zig"); 2 const truncf = @import("./truncf.zig").truncf; 3 4 pub const panic = common.panic; 5 6 comptime { 7 if (common.want_ppc_abi) { 8 @export(&__trunctfdf2, .{ .name = "__trunckfdf2", .linkage = common.linkage, .visibility = common.visibility }); 9 } else if (common.want_sparc_abi) { 10 @export(&_Qp_qtod, .{ .name = "_Qp_qtod", .linkage = common.linkage, .visibility = common.visibility }); 11 } 12 @export(&__trunctfdf2, .{ .name = "__trunctfdf2", .linkage = common.linkage, .visibility = common.visibility }); 13 } 14 15 pub fn __trunctfdf2(a: f128) callconv(.c) f64 { 16 return truncf(f64, f128, a); 17 } 18 19 fn _Qp_qtod(a: *const f128) callconv(.c) f64 { 20 return truncf(f64, f128, a.*); 21 }