master
 1const builtin = @import("builtin");
 2const common = @import("./common.zig");
 3const intFromFloat = @import("./int_from_float.zig").intFromFloat;
 4
 5pub const panic = common.panic;
 6
 7comptime {
 8    if (common.want_windows_v2u64_abi) {
 9        @export(&__fixhfti_windows_x86_64, .{ .name = "__fixhfti", .linkage = common.linkage, .visibility = common.visibility });
10    } else {
11        @export(&__fixhfti, .{ .name = "__fixhfti", .linkage = common.linkage, .visibility = common.visibility });
12    }
13}
14
15pub fn __fixhfti(a: f16) callconv(.c) i128 {
16    return intFromFloat(i128, a);
17}
18
19const v2u64 = @Vector(2, u64);
20
21fn __fixhfti_windows_x86_64(a: f16) callconv(.c) v2u64 {
22    return @bitCast(intFromFloat(i128, a));
23}