mirror of
https://github.com/ziglang/zig.git
synced 2024-11-14 16:13:24 +00:00
26 lines
823 B
Zig
26 lines
823 B
Zig
const builtin = @import("builtin");
|
|
const common = @import("./common.zig");
|
|
const floatFromInt = @import("./float_from_int.zig").floatFromInt;
|
|
|
|
pub const panic = common.panic;
|
|
|
|
comptime {
|
|
if (common.want_aeabi) {
|
|
@export(&__aeabi_ul2f, .{ .name = "__aeabi_ul2f", .linkage = common.linkage, .visibility = common.visibility });
|
|
} else {
|
|
@export(&__floatundisf, .{ .name = "__floatundisf", .linkage = common.linkage, .visibility = common.visibility });
|
|
|
|
if (common.want_mingw_arm_abi) {
|
|
@export(&__floatundisf, .{ .name = "__u64tos", .linkage = common.linkage, .visibility = common.visibility });
|
|
}
|
|
}
|
|
}
|
|
|
|
pub fn __floatundisf(a: u64) callconv(.C) f32 {
|
|
return floatFromInt(f32, a);
|
|
}
|
|
|
|
fn __aeabi_ul2f(a: u64) callconv(.AAPCS) f32 {
|
|
return floatFromInt(f32, a);
|
|
}
|