zig

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

blob 29e57f66 (616B) - Raw


      1 const common = @import("./common.zig");
      2 const truncf = @import("./truncf.zig").truncf;
      3 
      4 pub const panic = common.panic;
      5 
      6 comptime {
      7     if (common.want_aeabi) {
      8         @export(__aeabi_d2h, .{ .name = "__aeabi_d2h", .linkage = common.linkage, .visibility = common.visibility });
      9     } else {
     10         @export(__truncdfhf2, .{ .name = "__truncdfhf2", .linkage = common.linkage, .visibility = common.visibility });
     11     }
     12 }
     13 
     14 pub fn __truncdfhf2(a: f64) callconv(.C) common.F16T(f64) {
     15     return @bitCast(truncf(f16, f64, a));
     16 }
     17 
     18 fn __aeabi_d2h(a: f64) callconv(.AAPCS) u16 {
     19     return @bitCast(truncf(f16, f64, a));
     20 }