forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-02-13 e440ec23c5a540cdd3f7464e8779219be6fd3d95
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From 56de799c656f2a8341293219b4923edc96fdc653 Mon Sep 17 00:00:00 2001
From: qiaopengcheng <qiaopengcheng-hf@loongson.cn>
Date: Sun, 2 Jun 2019 07:28:24 +0900
Subject: [PATCH] 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 1f7f4d1cf3..06d8773e92 100644
--- a/js/src/jit/mips32/MacroAssembler-mips32-inl.h
+++ b/js/src/jit/mips32/MacroAssembler-mips32-inl.h
@@ -820,19 +820,23 @@ 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);
+  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,