Bug 1625061 - [MIPS] Remove unnecessary MOZ_ASSERT in ma_cmp. r=lth
authorZhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Thu, 26 Mar 2020 10:26:07 +0000
changeset 520485 e3fe601c9f615fadf19f416f84c16f417c07ccb7
parent 520484 ee0d41c18c40e8364705ff6609442c7895a4ec17
child 520486 02c284defc4d5f8d9ed1c7c8363becdd93f4b291
push id37252
push usermalexandru@mozilla.com
push dateThu, 26 Mar 2020 15:34:27 +0000
treeherdermozilla-central@31360ced8ff8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslth
bugs1625061
milestone76.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1625061 - [MIPS] Remove unnecessary MOZ_ASSERT in ma_cmp. r=lth Differential Revision: https://phabricator.services.mozilla.com/D68310
js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp
--- a/js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp
+++ b/js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp
@@ -811,19 +811,18 @@ Assembler::Condition MacroAssemblerMIPSS
       MOZ_CRASH("Invalid condition.");
   }
   return Always;
 }
 
 Assembler::Condition MacroAssemblerMIPSShared::ma_cmp(Register dest,
                                                       Register lhs, Imm32 imm,
                                                       Condition c) {
-  MOZ_ASSERT(dest != ScratchRegister);
-  MOZ_ASSERT(lhs != ScratchRegister);
   ScratchRegisterScope scratch(asMasm());
+  MOZ_ASSERT(lhs != scratch);
 
   switch (c) {
     case Above:
     case BelowOrEqual:
       if (Imm16::IsInSignedRange(imm.value + 1) && imm.value != -1) {
         // lhs <= rhs via lhs < rhs + 1 if rhs + 1 does not overflow
         as_sltiu(dest, lhs, imm.value + 1);