From 77b1c7a88146dfdf66199b31827b53d77c06fb8d Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 2 May 2019 13:44:20 -0700 Subject: [PATCH] Enable historically segfaulting tests on MIPS They seem to be passing locally so let's see what CI has to say. Closes #137 --- testcrate/build.rs | 104 +++++++++++++++++++++------------------------ 1 file changed, 49 insertions(+), 55 deletions(-) diff --git a/testcrate/build.rs b/testcrate/build.rs index d862e0d..17ae3ef 100644 --- a/testcrate/build.rs +++ b/testcrate/build.rs @@ -594,14 +594,12 @@ fn main() { }"); gen(|(a, b): (MyI128, MyI128)| Some(a.0.wrapping_mul(b.0)), "builtins::int::mul::__multi3(a, b)"); - if !target_arch_mips { // FIXME(#137) - gen(|(a, b): (MyI128, MyI128)| Some(a.0.overflowing_mul(b.0)), - "{ - let mut o = 2; - let c = builtins::int::mul::__muloti4(a, b, &mut o); - (c, match o { 0 => false, 1 => true, _ => panic!() }) - }"); - } + gen(|(a, b): (MyI128, MyI128)| Some(a.0.overflowing_mul(b.0)), + "{ + let mut o = 2; + let c = builtins::int::mul::__muloti4(a, b, &mut o); + (c, match o { 0 => false, 1 => true, _ => panic!() }) + }"); // int/sdiv.rs gen(|(a, b): (MyI64, MyI64)| { @@ -658,24 +656,22 @@ fn main() { } }, "builtins::int::sdiv::__moddi3(a, b)"); - if !target_arch_mips { // FIXME(#137) - gen(|(a, b): (MyI128, MyI128)| { - if b.0 == 0 { - None - } else { - Some(a.0 / b.0) - } - }, - "builtins::int::sdiv::__divti3(a, b)"); - gen(|(a, b): (MyI128, MyI128)| { - if b.0 == 0 { - None - } else { - Some(a.0 % b.0) - } - }, - "builtins::int::sdiv::__modti3(a, b)"); - } + gen(|(a, b): (MyI128, MyI128)| { + if b.0 == 0 { + None + } else { + Some(a.0 / b.0) + } + }, + "builtins::int::sdiv::__divti3(a, b)"); + gen(|(a, b): (MyI128, MyI128)| { + if b.0 == 0 { + None + } else { + Some(a.0 % b.0) + } + }, + "builtins::int::sdiv::__modti3(a, b)"); // int/shift.rs gen(|(a, b): (MyU64, MyU32)| Some(a.0 << (b.0 % 64)), @@ -746,35 +742,33 @@ fn main() { } }, "builtins::int::udiv::__umoddi3(a, b)"); - if !target_arch_mips { // FIXME(#137) - gen(|(a, b): (MyU128, MyU128)| { - if b.0 == 0 { - None - } else { - Some(a.0 / b.0) - } - }, - "builtins::int::udiv::__udivti3(a, b)"); - gen(|(a, b): (MyU128, MyU128)| { - if b.0 == 0 { - None - } else { - Some(a.0 % b.0) - } - }, - "builtins::int::udiv::__umodti3(a, b)"); - gen(|(a, b): (MyU128, MyU128)| { - if b.0 == 0 { - None - } else { - Some((a.0 / b.0, a.0 % b.0)) - } - }, - "{ - let mut r = 0; - (builtins::int::udiv::__udivmodti4(a, b, Some(&mut r)), r) - }"); - } + gen(|(a, b): (MyU128, MyU128)| { + if b.0 == 0 { + None + } else { + Some(a.0 / b.0) + } + }, + "builtins::int::udiv::__udivti3(a, b)"); + gen(|(a, b): (MyU128, MyU128)| { + if b.0 == 0 { + None + } else { + Some(a.0 % b.0) + } + }, + "builtins::int::udiv::__umodti3(a, b)"); + gen(|(a, b): (MyU128, MyU128)| { + if b.0 == 0 { + None + } else { + Some((a.0 / b.0, a.0 % b.0)) + } + }, + "{ + let mut r = 0; + (builtins::int::udiv::__udivmodti4(a, b, Some(&mut r)), r) + }"); } macro_rules! gen_float {