]> git.lizzy.rs Git - rust.git/blobdiff - src/libcompiler_builtins/lib.rs
Rollup merge of #41249 - GuillaumeGomez:rustdoc-render, r=steveklabnik,frewsxcv
[rust.git] / src / libcompiler_builtins / lib.rs
index 58aba11e4394f6e619c60775d353cb0df68b35c8..09b3d63950705001ed439d06d5c7a85d73d2ff75 100644 (file)
@@ -180,7 +180,7 @@ pub extern "C" fn u128_div_mod(n: u128, d: u128, rem: *mut u128) -> u128 {
             sr = sr.wrapping_add(1);
 
             // 1 <= sr <= u64::bits() - 1
-            q = n.wrapping_shl(64u32.wrapping_sub(sr));
+            q = n.wrapping_shl(128u32.wrapping_sub(sr));
             r = n.wrapping_shr(sr);
         } else {
             if d.high() == 0 {