zig/std/special/compiler_rt/umodti3.zig
Andrew Kelley 1828f8eb8e fix missing compiler_rt in release modes
the optimizer was deleting compiler_rt symbols, so I changed
the linkage type from LinkOnce to Weak

also changed LinkOnce to mean linkonce_odr in llvm and
Weak to mean weak_odr in llvm.

See #563
2017-10-24 21:31:47 -04:00

12 lines
356 B
Zig

const __udivmodti4 = @import("udivmodti4.zig").__udivmodti4;
const builtin = @import("builtin");
const linkage = @import("index.zig").linkage;
export fn __umodti3(a: u128, b: u128) -> u128 {
@setDebugSafety(this, builtin.is_test);
@setGlobalLinkage(__umodti3, linkage);
var r: u128 = undefined;
_ = __udivmodti4(a, b, &r);
return r;
}