zig

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

trunctfsf2.zig (731B) - 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_ppc_abi) {
      8         @export(&__trunctfsf2, .{ .name = "__trunckfsf2", .linkage = common.linkage, .visibility = common.visibility });
      9     } else if (common.want_sparc_abi) {
     10         @export(&_Qp_qtos, .{ .name = "_Qp_qtos", .linkage = common.linkage, .visibility = common.visibility });
     11     }
     12     @export(&__trunctfsf2, .{ .name = "__trunctfsf2", .linkage = common.linkage, .visibility = common.visibility });
     13 }
     14 
     15 pub fn __trunctfsf2(a: f128) callconv(.c) f32 {
     16     return truncf(f32, f128, a);
     17 }
     18 
     19 fn _Qp_qtos(a: *const f128) callconv(.c) f32 {
     20     return truncf(f32, f128, a.*);
     21 }