truncdfhf2.zig (616B) - Raw
1 const common = @import("./common.zig"); 2 const truncf = @import("./truncf.zig").truncf; 3 4 pub const panic = common.panic; 5 6 comptime { 7 if (common.want_aeabi) { 8 @export(&__aeabi_d2h, .{ .name = "__aeabi_d2h", .linkage = common.linkage, .visibility = common.visibility }); 9 } 10 @export(&__truncdfhf2, .{ .name = "__truncdfhf2", .linkage = common.linkage, .visibility = common.visibility }); 11 } 12 13 pub fn __truncdfhf2(a: f64) callconv(.c) common.F16T(f64) { 14 return @bitCast(truncf(f16, f64, a)); 15 } 16 17 fn __aeabi_d2h(a: f64) callconv(.{ .arm_aapcs = .{} }) u16 { 18 return @bitCast(truncf(f16, f64, a)); 19 }