summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorJiaxun Yang <jiaxun.yang@flygoat.com>2020-05-12 12:40:12 +0800
committerJiaxun Yang <jiaxun.yang@flygoat.com>2020-05-14 16:31:58 +0800
commitd032fb8df86fd6fd3f68f5a28bfd81427ed465ad (patch)
tree486e5018ac607e90ca90a761d6a0db06618ddb0a /js
parent4e8c369b22ccd02bd729f53f3f27247316c2c91a (diff)
downloadUXP-d032fb8df86fd6fd3f68f5a28bfd81427ed465ad.tar
UXP-d032fb8df86fd6fd3f68f5a28bfd81427ed465ad.tar.gz
UXP-d032fb8df86fd6fd3f68f5a28bfd81427ed465ad.tar.lz
UXP-d032fb8df86fd6fd3f68f5a28bfd81427ed465ad.tar.xz
UXP-d032fb8df86fd6fd3f68f5a28bfd81427ed465ad.zip
Bug 1424978 - IonMonkey: MIPS64: Fix tagValue function
Tag: #1542
Diffstat (limited to 'js')
-rw-r--r--js/src/jit/mips64/MacroAssembler-mips64.cpp9
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));
}