zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

blob d7592c1c (724B) - 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_windows_v2u64_abi) {
      9         @export(&__floatuntixf_windows_x86_64, .{ .name = "__floatuntixf", .linkage = common.linkage, .visibility = common.visibility });
     10     } else {
     11         @export(&__floatuntixf, .{ .name = "__floatuntixf", .linkage = common.linkage, .visibility = common.visibility });
     12     }
     13 }
     14 
     15 pub fn __floatuntixf(a: u128) callconv(.C) f80 {
     16     return floatFromInt(f80, a);
     17 }
     18 
     19 fn __floatuntixf_windows_x86_64(a: @Vector(2, u64)) callconv(.C) f80 {
     20     return floatFromInt(f80, @as(u128, @bitCast(a)));
     21 }