diff options
author | Jiaxun Yang <jiaxun.yang@flygoat.com> | 2020-05-12 12:40:10 +0800 |
---|---|---|
committer | Jiaxun Yang <jiaxun.yang@flygoat.com> | 2020-05-14 16:31:58 +0800 |
commit | 24d8c2502685dc433da896b1882d4a65c902cc03 (patch) | |
tree | 3d76e3bb6afff87576d29413fdf0d9e0b7344ae4 /js/src | |
parent | ebc0e55033a4b1fef889d33526ddd485230f2b7d (diff) | |
download | UXP-24d8c2502685dc433da896b1882d4a65c902cc03.tar UXP-24d8c2502685dc433da896b1882d4a65c902cc03.tar.gz UXP-24d8c2502685dc433da896b1882d4a65c902cc03.tar.lz UXP-24d8c2502685dc433da896b1882d4a65c902cc03.tar.xz UXP-24d8c2502685dc433da896b1882d4a65c902cc03.zip |
Bug 1424978 - IonMonkey: MIPS: Fix ma_addTestCarry
Tag: #1542
Diffstat (limited to 'js/src')
-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); } |