From 70bda6dd1cd5424143f331cedea8f9bea5bd58b9 Mon Sep 17 00:00:00 2001 From: est31 Date: Sat, 4 Feb 2017 12:17:04 +0100 Subject: [PATCH] Disable quickcheck tests on mips Two reasons: * the C versions __divti3 and __modti3 are apparently broken, at least when used in quickcheck. They change their own arguments. * compiler_rt's support for mips is disabled already on clang [1]. Its desireable to support working "cargo test" on that compiler as well, and not greet the tester with linker errors. [1]: http://llvm.org/viewvc/llvm-project?view=revision&revision=224488 --- .../compiler-rt/compiler-rt-cdylib/src/lib.rs | 5 ++++- library/compiler-builtins/src/int/mul.rs | 5 ++++- library/compiler-builtins/src/int/sdiv.rs | 7 +++++-- library/compiler-builtins/src/int/shift.rs | 5 ++++- library/compiler-builtins/src/int/udiv.rs | 5 ++++- 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/library/compiler-builtins/compiler-rt/compiler-rt-cdylib/src/lib.rs b/library/compiler-builtins/compiler-rt/compiler-rt-cdylib/src/lib.rs index 268da50d6f17..a72461483218 100644 --- a/library/compiler-builtins/compiler-rt/compiler-rt-cdylib/src/lib.rs +++ b/library/compiler-builtins/compiler-rt/compiler-rt-cdylib/src/lib.rs @@ -58,7 +58,10 @@ declare!(___adddf3, __adddf3); declare!(___powisf2, __powisf2); declare!(___powidf2, __powidf2); -#[cfg(all(not(windows), target_pointer_width="64"))] +#[cfg(all(not(windows), + not(target_arch = "mips64"), + not(target_arch = "mips64el"), + target_pointer_width="64"))] pub mod int_128 { extern { fn __lshrti3(); diff --git a/library/compiler-builtins/src/int/mul.rs b/library/compiler-builtins/src/int/mul.rs index 1ccaf04d6348..27709e521465 100644 --- a/library/compiler-builtins/src/int/mul.rs +++ b/library/compiler-builtins/src/int/mul.rs @@ -122,7 +122,10 @@ mod tests { } #[cfg(test)] -#[cfg(all(not(windows), target_pointer_width="64"))] +#[cfg(all(not(windows), + not(target_arch = "mips64"), + not(target_arch = "mips64el"), + target_pointer_width="64"))] mod tests_i128 { use qc::I128; diff --git a/library/compiler-builtins/src/int/sdiv.rs b/library/compiler-builtins/src/int/sdiv.rs index 97e1939919ae..023fad44d3c9 100644 --- a/library/compiler-builtins/src/int/sdiv.rs +++ b/library/compiler-builtins/src/int/sdiv.rs @@ -164,11 +164,14 @@ mod tests { } #[cfg(test)] -#[cfg(all(not(windows), target_pointer_width="64"))] +#[cfg(all(not(windows), + not(target_arch = "mips64"), + not(target_arch = "mips64el"), + target_pointer_width="64"))] mod tests_i128 { use qc::U128; - check! { + fn __divti3(f: extern fn(i128, i128) -> i128, n: U128, d: U128) -> Option { let (n, d) = (n.0 as i128, d.0 as i128); if d == 0 { diff --git a/library/compiler-builtins/src/int/shift.rs b/library/compiler-builtins/src/int/shift.rs index 2993d9286bca..e5dc38fdac50 100644 --- a/library/compiler-builtins/src/int/shift.rs +++ b/library/compiler-builtins/src/int/shift.rs @@ -105,7 +105,10 @@ mod tests { } #[cfg(test)] -#[cfg(all(not(windows), target_pointer_width="64"))] +#[cfg(all(not(windows), + not(target_arch = "mips64"), + not(target_arch = "mips64el"), + target_pointer_width="64"))] mod tests_i128 { use qc::{I128, U128}; diff --git a/library/compiler-builtins/src/int/udiv.rs b/library/compiler-builtins/src/int/udiv.rs index 735d388c1990..57d5fe549d84 100644 --- a/library/compiler-builtins/src/int/udiv.rs +++ b/library/compiler-builtins/src/int/udiv.rs @@ -382,7 +382,10 @@ mod tests { } #[cfg(test)] -#[cfg(all(not(windows), target_pointer_width="64"))] +#[cfg(all(not(windows), + not(target_arch = "mips64"), + not(target_arch = "mips64el"), + target_pointer_width="64"))] mod tests_i128 { use qc::U128;