2017-08-18 14:20:03 -07:00
|
|
|
const udivmod = @import("udivmod.zig").udivmod;
|
2017-08-27 02:44:03 -07:00
|
|
|
const builtin = @import("builtin");
|
2018-04-28 19:03:07 -07:00
|
|
|
const compiler_rt = @import("index.zig");
|
2017-08-18 13:26:09 -07:00
|
|
|
|
2018-01-25 01:10:11 -08:00
|
|
|
pub extern fn __udivmodti4(a: u128, b: u128, maybe_rem: ?&u128) u128 {
|
2018-01-24 22:46:12 -08:00
|
|
|
@setRuntimeSafety(builtin.is_test);
|
2017-08-18 14:20:03 -07:00
|
|
|
return udivmod(u128, a, b, maybe_rem);
|
2017-08-18 13:26:09 -07:00
|
|
|
}
|
|
|
|
|
2018-04-28 19:03:07 -07:00
|
|
|
pub extern fn __udivmodti4_windows_x86_64(a: &const u128, b: &const u128, maybe_rem: ?&u128) void {
|
|
|
|
@setRuntimeSafety(builtin.is_test);
|
|
|
|
compiler_rt.setXmm0(u128, udivmod(u128, *a, *b, maybe_rem));
|
|
|
|
}
|
|
|
|
|
2017-08-18 13:26:09 -07:00
|
|
|
test "import udivmodti4" {
|
|
|
|
_ = @import("udivmodti4_test.zig");
|
|
|
|
}
|