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:01:52 +0000 |
commit | 31ad2d12db7ebd94f79ed4c81f066f64721504f4 (patch) | |
tree | c40967f40f523c287c4455dfa45f6e7b63f29d1f /js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp | |
parent | 494cfe32c9224ef5697b53288aaad0896c05b4b8 (diff) | |
download | UXP-31ad2d12db7ebd94f79ed4c81f066f64721504f4.tar UXP-31ad2d12db7ebd94f79ed4c81f066f64721504f4.tar.gz UXP-31ad2d12db7ebd94f79ed4c81f066f64721504f4.tar.lz UXP-31ad2d12db7ebd94f79ed4c81f066f64721504f4.tar.xz UXP-31ad2d12db7ebd94f79ed4c81f066f64721504f4.zip |
Bug 1271968 - IonMonkey: MIPS: Refactor addMixedJump.
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 | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp b/js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp index 866a97dc8..38897de0d 100644 --- a/js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp +++ b/js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp @@ -665,14 +665,14 @@ MacroAssemblerMIPSShared::branchWithCode(InstImm code, Label* label, JumpKind ju InstImm inst_beq = InstImm(op_beq, zero, zero, BOffImm16(0)); if (code.encode() == inst_beq.encode()) { // Handle mixed jump - addMixedJump(nextOffset(), ImmPtr((void*)label->offset())); + addMixedJump(nextOffset(), label->offset()); as_j(JOffImm26(0)); as_nop(); return; } // Handle long conditional branch - addMixedJump(nextOffset(), ImmPtr((void*)label->offset()), MixedJumpPatch::CONDITIONAL); + addMixedJump(nextOffset(), label->offset(), MixedJumpPatch::CONDITIONAL); writeInst(code.encode()); as_nop(); return; @@ -785,7 +785,7 @@ MacroAssemblerMIPSShared::ma_jal(Label* label) { if (label->bound()) { // Generate the mixed jump. - addMixedJump(nextOffset(), ImmPtr((void*)label->offset())); + addMixedJump(nextOffset(), label->offset()); as_jal(JOffImm26(0)); as_nop(); return; @@ -1041,7 +1041,7 @@ MacroAssemblerMIPSShared::GenerateMixedJumps() // Generate all mixed jumps. for (size_t i = 0; i < numMixedJumps(); i++) { MixedJumpPatch& mjp = mixedJump(i); - if (MixedJumpPatch::NONE == mjp.kind && uintptr_t(mjp.target) <= size()) + if (MixedJumpPatch::NONE == mjp.kind && mjp.target <= size()) continue; BufferOffset bo = m_buffer.nextOffset(); if (MixedJumpPatch::CONDITIONAL & mjp.kind) { |