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(&__fixtfsi, .{ .name = "__fixkfsi", .linkage = common.linkage, .visibility = common.visibility });
9 } else if (common.want_sparc_abi) {
10 @export(&_Qp_qtoi, .{ .name = "_Qp_qtoi", .linkage = common.linkage, .visibility = common.visibility });
11 }
12 @export(&__fixtfsi, .{ .name = "__fixtfsi", .linkage = common.linkage, .visibility = common.visibility });
13}
14
15pub fn __fixtfsi(a: f128) callconv(.c) i32 {
16 return intFromFloat(i32, a);
17}
18
19fn _Qp_qtoi(a: *const f128) callconv(.c) i32 {
20 return intFromFloat(i32, a.*);
21}