summaryrefslogtreecommitdiffstats
path: root/js/src/jit/mips64
diff options
context:
space:
mode:
authorJiaxun Yang <jiaxun.yang@flygoat.com>2020-05-12 12:40:08 +0800
committerMoonchild <moonchild@palemoon.org>2020-05-20 14:01:22 +0000
commit0fa41e2adc3e6b247ccb3051672723547f3c918f (patch)
tree3d7c050eb4e4350841b82a7f7cc9658961f24f4b /js/src/jit/mips64
parent61af6cc299cb40497a5a9f5b0c1221026e365cd5 (diff)
downloadUXP-0fa41e2adc3e6b247ccb3051672723547f3c918f.tar
UXP-0fa41e2adc3e6b247ccb3051672723547f3c918f.tar.gz
UXP-0fa41e2adc3e6b247ccb3051672723547f3c918f.tar.lz
UXP-0fa41e2adc3e6b247ccb3051672723547f3c918f.tar.xz
UXP-0fa41e2adc3e6b247ccb3051672723547f3c918f.zip
Bug 1271968 - IonMonkey: MIPS: Merge MacroAssembler::branchWithCode.
Tag: #1542
Diffstat (limited to 'js/src/jit/mips64')
-rw-r--r--js/src/jit/mips64/MacroAssembler-mips64.cpp60
-rw-r--r--js/src/jit/mips64/MacroAssembler-mips64.h1
2 files changed, 0 insertions, 61 deletions
diff --git a/js/src/jit/mips64/MacroAssembler-mips64.cpp b/js/src/jit/mips64/MacroAssembler-mips64.cpp
index ee6dd9d0a..79ad8ce4a 100644
--- a/js/src/jit/mips64/MacroAssembler-mips64.cpp
+++ b/js/src/jit/mips64/MacroAssembler-mips64.cpp
@@ -757,66 +757,6 @@ MacroAssemblerMIPS64::ma_b(Address addr, ImmGCPtr imm, Label* label, Condition c
}
void
-MacroAssemblerMIPS64::branchWithCode(InstImm code, Label* label, JumpKind jumpKind)
-{
- MOZ_ASSERT(code.encode() != InstImm(op_regimm, zero, rt_bgezal, BOffImm16(0)).encode());
- InstImm inst_beq = InstImm(op_beq, zero, zero, BOffImm16(0));
-
- if (label->bound()) {
- int32_t offset = label->offset() - m_buffer.nextOffset().getOffset();
-
- if (BOffImm16::IsInRange(offset))
- jumpKind = ShortJump;
-
- if (jumpKind == ShortJump) {
- MOZ_ASSERT(BOffImm16::IsInRange(offset));
- code.setBOffImm16(BOffImm16(offset));
- writeInst(code.encode());
- as_nop();
- return;
- }
-
- if (code.encode() == inst_beq.encode()) {
- // Handle mixed jump
- addMixedJump(nextOffset(), ImmPtr((void*)label->offset()));
- as_j(JOffImm26(0));
- as_nop();
- return;
- }
-
- // Handle long conditional branch, the target offset is based on self,
- // point to next instruction of nop at below.
- writeInst(invertBranch(code, BOffImm16(4 * sizeof(uint32_t))).encode());
- as_nop();
- addMixedJump(nextOffset(), ImmPtr((void*)label->offset()));
- as_j(JOffImm26(0));
- as_nop();
- return;
- }
-
- // Generate open jump and link it to a label.
-
- // 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(4 * sizeof(uint32_t));
-
- if (jumpKind == ShortJump) {
- // Indicate that this is short jump with offset 4.
- code.setBOffImm16(BOffImm16(4));
- }
- BufferOffset bo = writeInst(code.encode());
- writeInst(nextInChain);
- if (!oom())
- label->use(bo.getOffset());
- if (jumpKind != ShortJump && code.encode() != inst_beq.encode()) {
- as_nop();
- as_nop();
- }
-}
-
-void
MacroAssemblerMIPS64::ma_cmp_set(Register rd, Register rs, ImmWord imm, Condition c)
{
if (imm.value == 0) {
diff --git a/js/src/jit/mips64/MacroAssembler-mips64.h b/js/src/jit/mips64/MacroAssembler-mips64.h
index 900ff32ab..027ef4063 100644
--- a/js/src/jit/mips64/MacroAssembler-mips64.h
+++ b/js/src/jit/mips64/MacroAssembler-mips64.h
@@ -115,7 +115,6 @@ class MacroAssemblerMIPS64 : public MacroAssemblerMIPSShared
void ma_pop(Register r);
void ma_push(Register r);
- void branchWithCode(InstImm code, Label* label, JumpKind jumpKind);
// branches when done from within mips-specific code
void ma_b(Register lhs, ImmWord imm, Label* l, Condition c, JumpKind jumpKind = MixedJump);
void ma_b(Register lhs, Address addr, Label* l, Condition c, JumpKind jumpKind = MixedJump);