aboutsummaryrefslogtreecommitdiff
path: root/lib/compiler_rt/truncdfsf2.zig
blob: fd42d5d34428d3cf5a53ccd7d9fb3725e598218b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
const common = @import("./common.zig");
const truncf = @import("./truncf.zig").truncf;

pub const panic = common.panic;

comptime {
    if (common.want_aeabi) {
        @export(&__aeabi_d2f, .{ .name = "__aeabi_d2f", .linkage = common.linkage, .visibility = common.visibility });
    } else {
        @export(&__truncdfsf2, .{ .name = "__truncdfsf2", .linkage = common.linkage, .visibility = common.visibility });
    }
}

pub fn __truncdfsf2(a: f64) callconv(.c) f32 {
    return truncf(f32, f64, a);
}

fn __aeabi_d2f(a: f64) callconv(.{ .arm_aapcs = .{} }) f32 {
    return truncf(f32, f64, a);
}