Bug 1556197 - amend Bug-1544631 for fixing mips32.
authorqiaopengcheng <qiaopengcheng-hf@loongson.cn>
Sat, 1 Jun 2019 22:28:24 +0000 (07:28 +0900)
committerCarsten Schoenert <c.schoenert@t-online.de>
Tue, 8 Mar 2022 07:40:12 +0000 (07:40 +0000)
Gbp-Pq: Topic fixes
Gbp-Pq: Name Bug-1556197-amend-Bug-1544631-for-fixing-mips32.patch

js/src/jit/mips32/MacroAssembler-mips32-inl.h

index 78edb4a4ffaa98f0a511971caa162bc138ff54b4..1f547067b74b2fec2aaa439760097f0eb416d80c 100644 (file)
@@ -862,16 +862,25 @@ void MacroAssembler::branchTestSymbol(Condition cond, const ValueOperand& value,
   branchTestSymbol(cond, value.typeReg(), label);
 }
 
+void MacroAssembler::branchTestBigInt(Condition cond, Register tag,
+                                      Label* label) {
+  MOZ_ASSERT(cond == Equal || cond == NotEqual);
+  ma_b(tag, ImmTag(JSVAL_TAG_BIGINT), label, cond);
+}
+
 void MacroAssembler::branchTestBigInt(Condition cond, const BaseIndex& address,
                                       Label* label) {
   SecondScratchRegisterScope scratch2(*this);
-  Register tag = extractTag(address, scratch2);
-  branchTestBigInt(cond, tag, label);
+  computeEffectiveAddress(address, scratch2);
+  splitTag(scratch2, scratch2);
+  branchTestBigInt(cond, scratch2, label);
 }
 
 void MacroAssembler::branchTestBigInt(Condition cond, const ValueOperand& value,
                                       Label* label) {
-  branchTestBigInt(cond, value.typeReg(), label);
+  SecondScratchRegisterScope scratch2(*this);
+  splitTag(value, scratch2);
+  branchTestBigInt(cond, scratch2, label);
 }
 
 void MacroAssembler::branchTestBigIntTruthy(bool b, const ValueOperand& value,