summaryrefslogtreecommitdiff
path: root/js/src/jit
diff options
context:
space:
mode:
authorJiaxun Yang <jiaxun.yang@flygoat.com>2020-05-12 12:40:10 +0800
committerJiaxun Yang <jiaxun.yang@flygoat.com>2020-05-14 16:31:57 +0800
commit7ac248b6e085249b5efa502b739cacfbdb4ddd31 (patch)
treed8c3dec32b4e9b87e45b2fa34ee62e17d1dacc16 /js/src/jit
parentf3e7f9f8eea6142182bbac924c790d9094c15fc8 (diff)
downloaduxp-7ac248b6e085249b5efa502b739cacfbdb4ddd31.tar.gz
Bug 1390459 - mulby3 function implement error on mips platform
Tag: #1542
Diffstat (limited to 'js/src/jit')
-rw-r--r--js/src/jit/mips32/MacroAssembler-mips32-inl.h5
-rw-r--r--js/src/jit/mips64/MacroAssembler-mips64-inl.h5
2 files changed, 6 insertions, 4 deletions
diff --git a/js/src/jit/mips32/MacroAssembler-mips32-inl.h b/js/src/jit/mips32/MacroAssembler-mips32-inl.h
index 4331e050ef..a86cead298 100644
--- a/js/src/jit/mips32/MacroAssembler-mips32-inl.h
+++ b/js/src/jit/mips32/MacroAssembler-mips32-inl.h
@@ -302,8 +302,9 @@ MacroAssembler::neg64(Register64 reg)
void
MacroAssembler::mulBy3(Register src, Register dest)
{
- as_addu(dest, src, src);
- as_addu(dest, dest, src);
+ MOZ_ASSERT(src != ScratchRegister);
+ as_addu(ScratchRegister, src, src);
+ as_addu(dest, ScratchRegister, src);
}
void
diff --git a/js/src/jit/mips64/MacroAssembler-mips64-inl.h b/js/src/jit/mips64/MacroAssembler-mips64-inl.h
index a07619b94a..7d42c249c0 100644
--- a/js/src/jit/mips64/MacroAssembler-mips64-inl.h
+++ b/js/src/jit/mips64/MacroAssembler-mips64-inl.h
@@ -279,8 +279,9 @@ MacroAssembler::mul64(const Operand& src, const Register64& dest, const Register
void
MacroAssembler::mulBy3(Register src, Register dest)
{
- as_daddu(dest, src, src);
- as_daddu(dest, dest, src);
+ MOZ_ASSERT(src != ScratchRegister);
+ as_daddu(ScratchRegister, src, src);
+ as_daddu(dest, ScratchRegister, src);
}
void