From 4e8c369b22ccd02bd729f53f3f27247316c2c91a Mon Sep 17 00:00:00 2001 From: Jiaxun Yang Date: Tue, 12 May 2020 12:40:12 +0800 Subject: Bug 1424978 - IonMonkey: MIPS64: Fix boxValue function Tag: #1542 --- js/src/jit/mips64/MacroAssembler-mips64.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/src/jit/mips64/MacroAssembler-mips64.h b/js/src/jit/mips64/MacroAssembler-mips64.h index 027ef4063e..4991c264fd 100644 --- a/js/src/jit/mips64/MacroAssembler-mips64.h +++ b/js/src/jit/mips64/MacroAssembler-mips64.h @@ -470,7 +470,12 @@ class MacroAssemblerMIPS64Compat : public MacroAssemblerMIPS64 JSValueTag tag = (JSValueTag)JSVAL_TYPE_TO_TAG(type); ma_li(dest, Imm32(tag)); ma_dsll(dest, dest, Imm32(JSVAL_TAG_SHIFT)); - ma_dins(dest, src, Imm32(0), Imm32(JSVAL_TAG_SHIFT)); + + if (type == JSVAL_TYPE_INT32 || type == JSVAL_TYPE_BOOLEAN) { + ma_dins(dest, src, Imm32(0), Imm32(32)); + } else { + ma_dins(dest, src, Imm32(0), Imm32(JSVAL_TAG_SHIFT)); + } } void storeValue(ValueOperand val, Operand dst); -- cgit v1.2.3