From 82e6d98832dea4af932a0a023a68ca928fd721fb Mon Sep 17 00:00:00 2001 From: Mu Tao Date: Tue, 26 Nov 2019 10:25:55 +0000 Subject: [PATCH] Bug 1598289 - MacroAssembler::cmp32LoadPtr not defined on mips{32|64}. r=jandem Differential Revision: https://phabricator.services.mozilla.com/D54127 --HG-- extra : moz-landing-system : lando --- js/src/jit/MacroAssembler.h | 2 +- js/src/jit/mips-shared/MacroAssembler-mips-shared-inl.h | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/js/src/jit/MacroAssembler.h b/js/src/jit/MacroAssembler.h index 7216b57b0955..20291a45af4a 100644 --- a/js/src/jit/MacroAssembler.h +++ b/js/src/jit/MacroAssembler.h @@ -1668,7 +1668,7 @@ class MacroAssembler : public MacroAssemblerSpecific { inline void cmp32LoadPtr(Condition cond, const Address& lhs, Imm32 rhs, const Address& src, Register dest) - DEFINED_ON(arm, arm64, x86, x64); + DEFINED_ON(arm, arm64, mips_shared, x86, x64); inline void cmp32MovePtr(Condition cond, Register lhs, Imm32 rhs, Register src, Register dest) diff --git a/js/src/jit/mips-shared/MacroAssembler-mips-shared-inl.h b/js/src/jit/mips-shared/MacroAssembler-mips-shared-inl.h index 62e4b4a6dea2..c1e46615effe 100644 --- a/js/src/jit/mips-shared/MacroAssembler-mips-shared-inl.h +++ b/js/src/jit/mips-shared/MacroAssembler-mips-shared-inl.h @@ -859,6 +859,14 @@ void MacroAssembler::cmp32Load32(Condition cond, Register lhs, Register rhs, bind(&skip); } +void MacroAssembler::cmp32LoadPtr(Condition cond, const Address& lhs, Imm32 rhs, + const Address& src, Register dest) { + Label skip; + branch32(Assembler::InvertCondition(cond), lhs, rhs, &skip); + loadPtr(src, dest); + bind(&skip); +} + void MacroAssembler::test32LoadPtr(Condition cond, const Address& addr, Imm32 mask, const Address& src, Register dest) {