1From 56de799c656f2a8341293219b4923edc96fdc653 Mon Sep 17 00:00:00 2001
2From: qiaopengcheng <qiaopengcheng-hf@loongson.cn>
3Date: Sun, 2 Jun 2019 07:28:24 +0900
4Subject: [PATCH] Bug 1556197 - amend Bug-1544631 for fixing mips32.
5
6---
7 js/src/jit/mips32/MacroAssembler-mips32-inl.h | 10 +++++++---
8 1 file changed, 7 insertions(+), 3 deletions(-)
9
10diff --git a/js/src/jit/mips32/MacroAssembler-mips32-inl.h b/js/src/jit/mips32/MacroAssembler-mips32-inl.h
11index 1f7f4d1cf3..06d8773e92 100644
12--- a/js/src/jit/mips32/MacroAssembler-mips32-inl.h
13+++ b/js/src/jit/mips32/MacroAssembler-mips32-inl.h
14@@ -820,19 +820,23 @@ void MacroAssembler::branchTestSymbol(Condition cond, const ValueOperand& value,
15
16 void MacroAssembler::branchTestBigInt(Condition cond, Register tag,
17                                       Label* label) {
18-  branchTestBigIntImpl(cond, tag, label);
19+  MOZ_ASSERT(cond == Equal || cond == NotEqual);
20+  ma_b(tag, ImmTag(JSVAL_TAG_BIGINT), label, cond);
21 }
22
23 void MacroAssembler::branchTestBigInt(Condition cond, const BaseIndex& address,
24                                       Label* label) {
25   SecondScratchRegisterScope scratch2(*this);
26-  splitTag(value, scratch2);
27+  computeEffectiveAddress(address, scratch2);
28+  splitTag(scratch2, scratch2);
29   branchTestBigInt(cond, scratch2, label);
30 }
31
32 void MacroAssembler::branchTestBigInt(Condition cond, const ValueOperand& value,
33                                       Label* label) {
34-  branchTestBigInt(cond, value.typeReg(), label);
35+  SecondScratchRegisterScope scratch2(*this);
36+  splitTag(value, scratch2);
37+  branchTestBigInt(cond, scratch2, label);
38 }
39
40 void MacroAssembler::branchTestBigIntTruthy(bool b, const ValueOperand& value,
41