mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
21 lines
704 B
Zig
21 lines
704 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_l2f, .{ .name = "__aeabi_l2f", .linkage = common.linkage, .visibility = common.visibility });
|
|
} else {
|
|
@export(&__floatdisf, .{ .name = if (common.want_windows_arm_abi) "__i64tos" else "__floatdisf", .linkage = common.linkage, .visibility = common.visibility });
|
|
}
|
|
}
|
|
|
|
pub fn __floatdisf(a: i64) callconv(.c) f32 {
|
|
return floatFromInt(f32, a);
|
|
}
|
|
|
|
fn __aeabi_l2f(a: i64) callconv(.{ .arm_aapcs = .{} }) f32 {
|
|
return floatFromInt(f32, a);
|
|
}
|