mirror of
https://github.com/ziglang/zig.git
synced 2024-11-27 23:52:31 +00:00
c9ecf7b920
Zig should probably perform this cast automatically (w/ safety). Integer shifts are a real pain otherwise. Adds some test coverage, too.
13 lines
325 B
Zig
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));
|
|
}
|