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>
Sun, 20 Jun 2021 05:20:41 +0000 (06:20 +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 a42091161dc79cae6c63adab7b2f29c2a840b0ce..408b60b96bf8cbb731c25c24d635b195c674c80e 100644 (file)
@@ -842,16 +842,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,