floatdidf.zig (704B) - Raw
1 const builtin = @import("builtin"); 2 const common = @import("./common.zig"); 3 const floatFromInt = @import("./float_from_int.zig").floatFromInt; 4 5 pub const panic = common.panic; 6 7 comptime { 8 if (common.want_aeabi) { 9 @export(&__aeabi_l2d, .{ .name = "__aeabi_l2d", .linkage = common.linkage, .visibility = common.visibility }); 10 } else { 11 @export(&__floatdidf, .{ .name = if (common.want_windows_arm_abi) "__i64tod" else "__floatdidf", .linkage = common.linkage, .visibility = common.visibility }); 12 } 13 } 14 15 pub fn __floatdidf(a: i64) callconv(.c) f64 { 16 return floatFromInt(f64, a); 17 } 18 19 fn __aeabi_l2d(a: i64) callconv(.{ .arm_aapcs = .{} }) f64 { 20 return floatFromInt(f64, a); 21 }