diff options
Diffstat (limited to 'js/src')
-rw-r--r-- | js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp | 24 | ||||
-rw-r--r-- | js/src/jit/mips-shared/MacroAssembler-mips-shared.h | 2 | ||||
-rw-r--r-- | js/src/jit/mips32/MacroAssembler-mips32.cpp | 23 | ||||
-rw-r--r-- | js/src/jit/mips32/MacroAssembler-mips32.h | 2 | ||||
-rw-r--r-- | js/src/jit/mips64/MacroAssembler-mips64.cpp | 24 | ||||
-rw-r--r-- | js/src/jit/mips64/MacroAssembler-mips64.h | 2 |
6 files changed, 26 insertions, 51 deletions
diff --git a/js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp b/js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp index a8b53e67c4..97660299a5 100644 --- a/js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp +++ b/js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp @@ -727,6 +727,30 @@ MacroAssemblerMIPSShared::ma_b(wasm::TrapDesc target, JumpKind jumpKind) bindLater(&label, target); } +void +MacroAssemblerMIPSShared::ma_jal(Label* label) +{ + if (label->bound()) { + // Generate the mixed jump. + addMixedJump(nextOffset(), ImmPtr((void*)label->offset())); + as_jal(JOffImm26(0)); + as_nop(); + return; + } + + // Second word holds a pointer to the next branch in label's chain. + uint32_t nextInChain = label->used() ? label->offset() : LabelBase::INVALID_OFFSET; + + // Make the whole branch continous in the buffer. The '2' + // instructions are writing at below (contain delay slot). + m_buffer.ensureSpace(2 * sizeof(uint32_t)); + + BufferOffset bo = as_jal(JOffImm26(0)); + writeInst(nextInChain); + if (!oom()) + label->use(bo.getOffset()); +} + Assembler::Condition MacroAssemblerMIPSShared::ma_cmp(Register scratch, Register lhs, Register rhs, Condition c) { diff --git a/js/src/jit/mips-shared/MacroAssembler-mips-shared.h b/js/src/jit/mips-shared/MacroAssembler-mips-shared.h index 0fa73b6166..b761c3e9e1 100644 --- a/js/src/jit/mips-shared/MacroAssembler-mips-shared.h +++ b/js/src/jit/mips-shared/MacroAssembler-mips-shared.h @@ -164,6 +164,8 @@ class MacroAssemblerMIPSShared : public Assembler void ma_b(Label* l, JumpKind jumpKind = MixedJump); void ma_b(wasm::TrapDesc target, JumpKind jumpKind = MixedJump); + void ma_jal(Label* l); + // fp instructions void ma_lis(FloatRegister dest, float value); void ma_lis(FloatRegister dest, wasm::RawF32 value); diff --git a/js/src/jit/mips32/MacroAssembler-mips32.cpp b/js/src/jit/mips32/MacroAssembler-mips32.cpp index 53d1a79251..5b9b835ce5 100644 --- a/js/src/jit/mips32/MacroAssembler-mips32.cpp +++ b/js/src/jit/mips32/MacroAssembler-mips32.cpp @@ -504,29 +504,6 @@ MacroAssemblerMIPS::ma_b(Address addr, ImmGCPtr imm, Label* label, Condition c, } void -MacroAssemblerMIPS::ma_jal(Label* label) -{ - if (label->bound()) { - // Generate the mixed jump. - addMixedJump(nextOffset(), ImmPtr((void*)label->offset())); - as_jal(JOffImm26(0)); - as_nop(); - return; - } - - // Second word holds a pointer to the next branch in label's chain. - uint32_t nextInChain = label->used() ? label->offset() : LabelBase::INVALID_OFFSET; - - // Make the whole branch continous in the buffer. - m_buffer.ensureSpace(2 * sizeof(uint32_t)); - - BufferOffset bo = as_jal(JOffImm26(0)); - writeInst(nextInChain); - if (!oom()) - label->use(bo.getOffset()); -} - -void MacroAssemblerMIPS::branchWithCode(InstImm code, Label* label, JumpKind jumpKind) { MOZ_ASSERT(code.encode() != InstImm(op_regimm, zero, rt_bgezal, BOffImm16(0)).encode()); diff --git a/js/src/jit/mips32/MacroAssembler-mips32.h b/js/src/jit/mips32/MacroAssembler-mips32.h index 3b5c063999..fcb1d3c3bf 100644 --- a/js/src/jit/mips32/MacroAssembler-mips32.h +++ b/js/src/jit/mips32/MacroAssembler-mips32.h @@ -109,8 +109,6 @@ class MacroAssemblerMIPS : public MacroAssemblerMIPSShared ma_b(ScratchRegister, rhs, l, c, jumpKind); } - void ma_jal(Label* l); - // fp instructions void ma_lid(FloatRegister dest, double value); diff --git a/js/src/jit/mips64/MacroAssembler-mips64.cpp b/js/src/jit/mips64/MacroAssembler-mips64.cpp index 137a24b59d..ee6dd9d0aa 100644 --- a/js/src/jit/mips64/MacroAssembler-mips64.cpp +++ b/js/src/jit/mips64/MacroAssembler-mips64.cpp @@ -757,30 +757,6 @@ MacroAssemblerMIPS64::ma_b(Address addr, ImmGCPtr imm, Label* label, Condition c } void -MacroAssemblerMIPS64::ma_jal(Label* label) -{ - if (label->bound()) { - // Generate the mixed jump. - addMixedJump(nextOffset(), ImmPtr((void*)label->offset())); - as_jal(JOffImm26(0)); - as_nop(); - return; - } - - // Second word holds a pointer to the next branch in label's chain. - uint32_t nextInChain = label->used() ? label->offset() : LabelBase::INVALID_OFFSET; - - // Make the whole branch continous in the buffer. The '2' - // instructions are writing at below (contain delay slot). - m_buffer.ensureSpace(2 * sizeof(uint32_t)); - - BufferOffset bo = as_jal(JOffImm26(0)); - writeInst(nextInChain); - if (!oom()) - label->use(bo.getOffset()); -} - -void MacroAssemblerMIPS64::branchWithCode(InstImm code, Label* label, JumpKind jumpKind) { MOZ_ASSERT(code.encode() != InstImm(op_regimm, zero, rt_bgezal, BOffImm16(0)).encode()); diff --git a/js/src/jit/mips64/MacroAssembler-mips64.h b/js/src/jit/mips64/MacroAssembler-mips64.h index d4b8500968..900ff32abd 100644 --- a/js/src/jit/mips64/MacroAssembler-mips64.h +++ b/js/src/jit/mips64/MacroAssembler-mips64.h @@ -127,8 +127,6 @@ class MacroAssemblerMIPS64 : public MacroAssemblerMIPSShared ma_b(ScratchRegister, rhs, l, c, jumpKind); } - void ma_jal(Label* l); - // fp instructions void ma_lid(FloatRegister dest, double value); |