void-packages/srcpkgs/mozjs68/patches/008-fix-mips32-inl.patch

54 lines
2.0 KiB
Diff

From: qiaopengcheng <qiaopengcheng-hf@loongson.cn>
Date: Sun, 2 Jun 2019 07:28:24 +0900
Subject: Bug 1556197 - amend Bug-1544631 for fixing mips32.
---
js/src/jit/mips32/MacroAssembler-mips32-inl.h | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/js/src/jit/mips32/MacroAssembler-mips32-inl.h b/js/src/jit/mips32/MacroAssembler-mips32-inl.h
index 1f7f4d1cf31..06d8773e92a 100644
--- a/js/src/jit/mips32/MacroAssembler-mips32-inl.h
+++ b/js/src/jit/mips32/MacroAssembler-mips32-inl.h
@@ -69,6 +69,15 @@
}
// ===============================================================
+// Load instructions
+
+void MacroAssembler::load32SignExtendToPtr(const Address& src, Register dest) {
+ loadPtr(src, dest);
+}
+
+// ===============================================================
+
+// ===============================================================
// Logical instructions
void MacroAssembler::andPtr(Register src, Register dest) { ma_and(dest, src); }
@@ -820,19 +820,21 @@ void MacroAssembler::branchTestSymbol(Condition cond, const ValueOperand& value,
void MacroAssembler::branchTestBigInt(Condition cond, Register tag,
Label* label) {
- branchTestBigIntImpl(cond, tag, 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);
- splitTag(value, scratch2);
+ computeEffectiveAddress(address, scratch2);
branchTestBigInt(cond, scratch2, label);
}
void MacroAssembler::branchTestBigInt(Condition cond, const ValueOperand& value,
Label* label) {
- branchTestBigInt(cond, value.typeReg(), label);
+ SecondScratchRegisterScope scratch2(*this);
+ branchTestBigInt(cond, scratch2, label);
}
void MacroAssembler::branchTestBigIntTruthy(bool b, const ValueOperand& value,