zig/lib/std/special/compiler_rt/fixunsdfdi.zig
Andrew Kelley a2ff3a13fe std, compiler-rt: remove test names where applicable
Tests with no names are executed when using `zig test` regardless of the
`--test-filter` used. Non-named tests should be used when simply
importing unit tests from another file. This allows `zig test` to find
all the appropriate tests, even when using `--test-filter`.
2021-09-01 17:54:06 -07:00

17 lines
413 B
Zig

const fixuint = @import("fixuint.zig").fixuint;
const builtin = @import("builtin");
pub fn __fixunsdfdi(a: f64) callconv(.C) u64 {
@setRuntimeSafety(builtin.is_test);
return fixuint(f64, u64, a);
}
pub fn __aeabi_d2ulz(a: f64) callconv(.AAPCS) u64 {
@setRuntimeSafety(false);
return @call(.{ .modifier = .always_inline }, __fixunsdfdi, .{a});
}
test {
_ = @import("fixunsdfdi_test.zig");
}