aboutsummaryrefslogtreecommitdiff
path: root/lib/compiler_rt/trunctfsf2.zig
blob: 0fcd5e1e086819c1768476876ef3cb4c17505526 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
const common = @import("./common.zig");
const truncf = @import("./truncf.zig").truncf;

pub const panic = common.panic;

comptime {
    if (common.want_ppc_abi) {
        @export(__trunckfsf2, .{ .name = "__trunckfsf2", .linkage = common.linkage });
    } else if (common.want_sparc_abi) {
        @export(_Qp_qtos, .{ .name = "_Qp_qtos", .linkage = common.linkage });
    } else {
        @export(__trunctfsf2, .{ .name = "__trunctfsf2", .linkage = common.linkage });
    }
}

pub fn __trunctfsf2(a: f128) callconv(.C) f32 {
    return truncf(f32, f128, a);
}

fn __trunckfsf2(a: f128) callconv(.C) f32 {
    return truncf(f32, f128, a);
}

fn _Qp_qtos(a: *const f128) callconv(.C) f32 {
    return truncf(f32, f128, a.*);
}