blob: 997a100afacc188790560cc5f9aeb4e8ce6ab565 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
const std = @import("std");
const builtin = @import("builtin");
const common = @import("common.zig");
const bigIntFromFloat = @import("int_from_float.zig").bigIntFromFloat;
pub const panic = common.panic;
comptime {
@export(&__fixunstfei, .{ .name = "__fixunstfei", .linkage = common.linkage, .visibility = common.visibility });
}
pub fn __fixunstfei(r: [*]u8, bits: usize, a: f128) callconv(.c) void {
const byte_size = std.zig.target.intByteSize(&builtin.target, @intCast(bits));
return bigIntFromFloat(.unsigned, @ptrCast(@alignCast(r[0..byte_size])), a);
}
|