zig/lib/compiler_rt/extenddfxf2.zig
Cody Tapscott c9ecf7b920 compiler_rt: Fix extendf_f80 bug
Zig should probably perform this cast automatically (w/ safety).
Integer shifts are a real pain otherwise.

Adds some test coverage, too.
2022-10-09 13:42:39 -07:00

13 lines
325 B
Zig

const common = @import("./common.zig");
const extend_f80 = @import("./extendf.zig").extend_f80;
pub const panic = common.panic;
comptime {
@export(__extenddfxf2, .{ .name = "__extenddfxf2", .linkage = common.linkage });
}
pub fn __extenddfxf2(a: f64) callconv(.C) f80 {
return extend_f80(f64, @bitCast(u64, a));
}