zig/lib/compiler_rt/fixhfdi.zig
Andrew Kelley c99c085d70 compiler-rt: break up functions even more
The purpose of this branch is to switch to using an object file for each
independent function, in order to make linking simpler - instead of
relying on `-ffunction-sections` and `--gc-sections`, which involves the
linker doing the work of linking everything and then undoing work via
garbage collection, this will allow the linker to only include the
compilation units that are depended on in the first place.

This commit makes progress towards that goal.
2022-06-17 16:38:59 -07:00

13 lines
299 B
Zig

const common = @import("./common.zig");
const floatToInt = @import("./float_to_int.zig").floatToInt;
pub const panic = common.panic;
comptime {
@export(__fixhfdi, .{ .name = "__fixhfdi", .linkage = common.linkage });
}
fn __fixhfdi(a: f16) callconv(.C) i64 {
return floatToInt(i64, a);
}