diff options
author | Jiaxun Yang <jiaxun.yang@flygoat.com> | 2020-05-12 12:40:12 +0800 |
---|---|---|
committer | Jiaxun Yang <jiaxun.yang@flygoat.com> | 2020-05-14 16:31:58 +0800 |
commit | d032fb8df86fd6fd3f68f5a28bfd81427ed465ad (patch) | |
tree | 486e5018ac607e90ca90a761d6a0db06618ddb0a | |
parent | 4e8c369b22ccd02bd729f53f3f27247316c2c91a (diff) | |
download | uxp-d032fb8df86fd6fd3f68f5a28bfd81427ed465ad.tar.gz |
Bug 1424978 - IonMonkey: MIPS64: Fix tagValue function
Tag: #1542
-rw-r--r-- | js/src/jit/mips64/MacroAssembler-mips64.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/js/src/jit/mips64/MacroAssembler-mips64.cpp b/js/src/jit/mips64/MacroAssembler-mips64.cpp index 657fce93c3..e16e5d03ff 100644 --- a/js/src/jit/mips64/MacroAssembler-mips64.cpp +++ b/js/src/jit/mips64/MacroAssembler-mips64.cpp @@ -1839,8 +1839,13 @@ void MacroAssemblerMIPS64Compat::tagValue(JSValueType type, Register payload, ValueOperand dest) { MOZ_ASSERT(dest.valueReg() != ScratchRegister); - if (payload != dest.valueReg()) - ma_move(dest.valueReg(), payload); + if (type == JSVAL_TYPE_INT32 || type == JSVAL_TYPE_BOOLEAN) { + ma_dext(dest.valueReg(), payload, Imm32(0), Imm32(32)); + } else { + if (payload != dest.valueReg()) { + ma_move(dest.valueReg(), payload); + } + } ma_li(ScratchRegister, ImmTag(JSVAL_TYPE_TO_TAG(type))); ma_dins(dest.valueReg(), ScratchRegister, Imm32(JSVAL_TAG_SHIFT), Imm32(64 - JSVAL_TAG_SHIFT)); } |