zig/lib/std/special/compiler_rt/umodti3.zig

16 lines
497 B
Zig
Raw Normal View History

2018-04-29 03:03:07 +01:00
const udivmodti4 = @import("udivmodti4.zig");
const builtin = @import("builtin");
2019-03-02 21:46:04 +00:00
const compiler_rt = @import("../compiler_rt.zig");
pub extern fn __umodti3(a: u128, b: u128) u128 {
@setRuntimeSafety(builtin.is_test);
var r: u128 = undefined;
2018-04-29 03:03:07 +01:00
_ = udivmodti4.__udivmodti4(a, b, &r);
return r;
}
2018-04-29 03:03:07 +01:00
const v128 = @Vector(2, u64);
pub extern fn __umodti3_windows_x86_64(a: v128, b: v128) v128 {
return @bitCast(v128, @inlineCall(__umodti3, @bitCast(u128, a), @bitCast(u128, b)));
2018-04-29 03:03:07 +01:00
}