master
1const common = @import("./common.zig");
2const intFromFloat = @import("./int_from_float.zig").intFromFloat;
3
4pub const panic = common.panic;
5
6comptime {
7 if (common.want_ppc_abi) {
8 @export(&__fixunstfdi, .{ .name = "__fixunskfdi", .linkage = common.linkage, .visibility = common.visibility });
9 } else if (common.want_sparc_abi) {
10 @export(&_Qp_qtoux, .{ .name = "_Qp_qtoux", .linkage = common.linkage, .visibility = common.visibility });
11 }
12 @export(&__fixunstfdi, .{ .name = "__fixunstfdi", .linkage = common.linkage, .visibility = common.visibility });
13}
14
15pub fn __fixunstfdi(a: f128) callconv(.c) u64 {
16 return intFromFloat(u64, a);
17}
18
19fn _Qp_qtoux(a: *const f128) callconv(.c) u64 {
20 return intFromFloat(u64, a.*);
21}