rust private

To start a new build commit change to repository or click New build button.
Auto merge of #41250 - kennytm:fix-41228, r=nikomatsakis
Fix invalid 128-bit division on 32-bit target (#41228) The bug of #41228 is a typo, this line: https://github.com/rust-lang/rust/blob/1dca19ae3fd195fa517e326a39bfee729da7cadb/src/libcompiler_builtins/lib.rs#L183 ```rust // 1 <= sr <= u64::bits() - 1 q = n.wrapping_shl(64u32.wrapping_sub(sr)); ``` The **64** should be **128**. (Compare with https://github.com/rust-lang-nursery/compiler-builtins/blob/280d19f1127aa80739f4179152b11a5f7d36d79f/src/int/udiv.rs#L213-L214: ```rust // 1 <= sr <= <hty!($ty)>::bits() - 1 q = n << (<$ty>::bits() - sr); ``` Or compare with the C implementation https://github.com/llvm-mirror/compiler-rt/blob/master/lib/builtins/udivmodti4.c#L113-L116 ```c /* 1 <= sr <= n_udword_bits - 1 */ /* q.all = n.all << (n_utword_bits - sr); */ q.s.low = 0; q.s.high = n.s.low << (n_udword_bits - sr); ``` ) Added a bunch of randomly generated division test cases to try to cover every described branch of `udivmodti4`.
1.0.2914
8 years ago by bors
Failed 8 years ago in 3 min 13 sec
Job name
Tests
Status