zig

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

floatuntitf.zig (888B) - 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(&__floatuntitf_windows_x86_64, .{ .name = "__floatuntitf", .linkage = common.linkage, .visibility = common.visibility });
     10     } else {
     11         if (common.want_ppc_abi)
     12             @export(&__floatuntitf, .{ .name = "__floatuntikf", .linkage = common.linkage, .visibility = common.visibility });
     13         @export(&__floatuntitf, .{ .name = "__floatuntitf", .linkage = common.linkage, .visibility = common.visibility });
     14     }
     15 }
     16 
     17 pub fn __floatuntitf(a: u128) callconv(.c) f128 {
     18     return floatFromInt(f128, a);
     19 }
     20 
     21 fn __floatuntitf_windows_x86_64(a: @Vector(2, u64)) callconv(.c) f128 {
     22     return floatFromInt(f128, @as(u128, @bitCast(a)));
     23 }