diff options
author | Jiaxun Yang <jiaxun.yang@flygoat.com> | 2020-05-12 12:40:12 +0800 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-05-20 14:02:35 +0000 |
commit | 0c2de12ffdb44e5d35fcef752e762824fcd14ef3 (patch) | |
tree | 7b7d97ee6cbd1ec925ffc8f1e25b85235ea06fd5 | |
parent | e44709892bd3dee27ccc70564427a4e525185158 (diff) | |
download | UXP-0c2de12ffdb44e5d35fcef752e762824fcd14ef3.tar UXP-0c2de12ffdb44e5d35fcef752e762824fcd14ef3.tar.gz UXP-0c2de12ffdb44e5d35fcef752e762824fcd14ef3.tar.lz UXP-0c2de12ffdb44e5d35fcef752e762824fcd14ef3.tar.xz UXP-0c2de12ffdb44e5d35fcef752e762824fcd14ef3.zip |
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 657fce93c..e16e5d03f 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)); } |