diff options
author | Jiaxun Yang <jiaxun.yang@flygoat.com> | 2020-05-12 12:40:10 +0800 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-05-20 14:02:06 +0000 |
commit | f83a88907a2014c6b1a157882b419debb054eb77 (patch) | |
tree | fa2a57c514303df68ab3741a49304cedbc3ab3c7 /js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp | |
parent | ff8603d7a2e51d2fd497493dfad7d4c8c7ee8d74 (diff) | |
download | UXP-f83a88907a2014c6b1a157882b419debb054eb77.tar UXP-f83a88907a2014c6b1a157882b419debb054eb77.tar.gz UXP-f83a88907a2014c6b1a157882b419debb054eb77.tar.lz UXP-f83a88907a2014c6b1a157882b419debb054eb77.tar.xz UXP-f83a88907a2014c6b1a157882b419debb054eb77.zip |
Bug 1424978 - IonMonkey: MIPS: Fix ma_addTestCarry
Tag: #1542
Diffstat (limited to 'js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp')
-rw-r--r-- | js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp b/js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp index 38897de0d..839664b8c 100644 --- a/js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp +++ b/js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp @@ -236,8 +236,14 @@ template <typename L> void MacroAssemblerMIPSShared::ma_addTestCarry(Register rd, Register rs, Register rt, L overflow) { - as_addu(rd, rs, rt); - as_sltu(SecondScratchReg, rd, rs); + if (rd != rs) { + as_addu(rd, rs, rt); + as_sltu(SecondScratchReg, rd, rs); + } else { + ma_move(SecondScratchReg, rs); + as_addu(rd, rs, rt); + as_sltu(SecondScratchReg, rd, SecondScratchReg); + } ma_b(SecondScratchReg, SecondScratchReg, overflow, Assembler::NonZero); } |