mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-08 23:04:24 +00:00
Zig should probably perform this cast automatically (w/ safety). Integer shifts are a real pain otherwise. Adds some test coverage, too.
12 lines
325 B
Zig
12 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));
|
|
}
|