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>
Fri, 16 Sep 2022 14:56:20 +0000 (15:56 +0100)
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 5cbcdd80cedf055bd002de1194e21e26e6a0ab5d..1a2688a545643ccbbe01ce4d7af90a68fa233baf 100644 (file)
@@ -901,16 +901,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,