zig/lib/compiler_rt/fixunssfti.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
310 B
Zig

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