@@ -17,28 +17,11 @@ macro_rules! shift {
1717 } ;
1818}
1919
20- macro_rules! overflowing_shift {
21- ( $( $i: ty, $fn_std: ident, $fn_builtins: ident) ;* ; ) => {
22- $(
23- fuzz_shift( |x: $i, s: u32 | {
24- let tmp0: $i = x. $fn_std( s) ;
25- let ( tmp1, o1) : ( $i, bool ) = $fn_builtins( x, s. into( ) ) ;
26- if tmp0 != tmp1 || o1 {
27- panic!(
28- "{}({}, {}): std: {}, builtins: {}" ,
29- stringify!( $fn_builtins) , x, s, tmp0, tmp1
30- ) ;
31- }
32- } ) ;
33- ) *
34- } ;
35- }
36-
3720#[ test]
3821fn shift ( ) {
3922 use compiler_builtins:: int:: shift:: {
4023 __ashldi3, __ashlsi3, __ashlti3, __ashrdi3, __ashrsi3, __ashrti3, __lshrdi3, __lshrsi3,
41- __lshrti3, __rust_i128_shlo , __rust_i128_shro , __rust_u128_shlo , __rust_u128_shro ,
24+ __lshrti3,
4225 } ;
4326 shift ! (
4427 u32 , wrapping_shl, __ashlsi3;
@@ -51,10 +34,4 @@ fn shift() {
5134 u64 , wrapping_shr, __lshrdi3;
5235 u128 , wrapping_shr, __lshrti3;
5336 ) ;
54- overflowing_shift ! (
55- u128 , wrapping_shl, __rust_u128_shlo;
56- i128 , wrapping_shl, __rust_i128_shlo;
57- u128 , wrapping_shr, __rust_u128_shro;
58- i128 , wrapping_shr, __rust_i128_shro;
59- ) ;
6037}
0 commit comments