Bug 1201793 - return correct result even after bailout.r=nbp a=2.2+
authorLars T Hansen <lhansen@mozilla.com>
Tue, 08 Sep 2015 20:26:27 +0200
changeset 238830 c54b4959b4d9767e0eddf3db49fdbcc413acd0f1
parent 238829 f9afa7166832c5b47149112d9da1f10ab2bce892
child 238831 d2c2577599d44b7bb433e22a48b766f0007b07af
push id815
push usercbook@mozilla.com
push dateThu, 15 Oct 2015 14:38:40 +0000
treeherdermozilla-b2g37_v2_2@d2c2577599d4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnbp, 2.2
bugs1201793
milestone37.0
Bug 1201793 - return correct result even after bailout.r=nbp a=2.2+
js/src/jit/arm/CodeGenerator-arm.cpp
--- a/js/src/jit/arm/CodeGenerator-arm.cpp
+++ b/js/src/jit/arm/CodeGenerator-arm.cpp
@@ -577,21 +577,21 @@ CodeGeneratorARM::visitDivI(LDivI* ins)
     MDiv* mir = ins->mir();
 
     Label done;
     divICommon(mir, lhs, rhs, output, ins->snapshot(), done);
 
     if (mir->canTruncateRemainder()) {
         masm.ma_sdiv(lhs, rhs, output);
     } else {
-        masm.ma_sdiv(lhs, rhs, ScratchRegister);
-        masm.ma_mul(ScratchRegister, rhs, temp);
-        masm.ma_cmp(lhs, temp);
+        masm.ma_sdiv(lhs, rhs, temp);
+        masm.ma_mul(temp, rhs, ScratchRegister);
+        masm.ma_cmp(lhs, ScratchRegister);
         bailoutIf(Assembler::NotEqual, ins->snapshot());
-        masm.ma_mov(ScratchRegister, output);
+        masm.ma_mov(temp, output);
     }
 
     masm.bind(&done);
 }
 
 extern "C" {
     extern MOZ_EXPORT int64_t __aeabi_idivmod(int,int);
     extern MOZ_EXPORT int64_t __aeabi_uidivmod(int,int);