summaryrefslogtreecommitdiff
path: root/js/src
diff options
context:
space:
mode:
authorJiaxun Yang <jiaxun.yang@flygoat.com>2020-05-12 12:40:11 +0800
committerJiaxun Yang <jiaxun.yang@flygoat.com>2020-05-14 16:31:58 +0800
commit55897f06c0b216123c80fd53f1a827cb44d63654 (patch)
tree72c6d2531a6d79e483d264a2ef801be626c556bc /js/src
parentef3af7ce70a53417309133b6989c5e9423412956 (diff)
downloaduxp-55897f06c0b216123c80fd53f1a827cb44d63654.tar.gz
Bug 1390802 - IonMonkey: MIPS64: Fix storeValue function
Tag: #1542
Diffstat (limited to 'js/src')
-rw-r--r--js/src/jit/mips64/MacroAssembler-mips64.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/js/src/jit/mips64/MacroAssembler-mips64.cpp b/js/src/jit/mips64/MacroAssembler-mips64.cpp
index f1ccc0b38c..657fce93c3 100644
--- a/js/src/jit/mips64/MacroAssembler-mips64.cpp
+++ b/js/src/jit/mips64/MacroAssembler-mips64.cpp
@@ -1788,7 +1788,11 @@ MacroAssemblerMIPS64Compat::storeValue(JSValueType type, Register reg, Address d
ma_li(SecondScratchReg, ImmTag(JSVAL_TYPE_TO_TAG(type)));
ma_dsll(SecondScratchReg, SecondScratchReg, Imm32(JSVAL_TAG_SHIFT));
- ma_dins(SecondScratchReg, reg, Imm32(0), Imm32(JSVAL_TAG_SHIFT));
+ if (type == JSVAL_TYPE_INT32 || type == JSVAL_TYPE_BOOLEAN) {
+ ma_dins(SecondScratchReg, reg, Imm32(0), Imm32(32));
+ } else {
+ ma_dins(SecondScratchReg, reg, Imm32(0), Imm32(JSVAL_TAG_SHIFT));
+ }
storePtr(SecondScratchReg, Address(dest.base, dest.offset));
}