From: Heiher Date: Sat, 31 Oct 2015 21:10:03 +0000 (+0800) Subject: Bug 1213146 - IonMonkey: MIPS: Remove AssemblerMIPSShared::asAsm. r=arai X-Git-Tag: archive/raspbian/60.4.0esr-1+rpi1~1^2^2~24 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=9b80dd72ba2c60454ae87db7b86a2f40ed8a61a3;p=firefox-esr.git Bug 1213146 - IonMonkey: MIPS: Remove AssemblerMIPSShared::asAsm. r=arai Gbp-Pq: Topic fixes Gbp-Pq: Name Bug-1213146-IonMonkey-MIPS-Remove-AssemblerMIPSShare.patch --- diff --git a/js/src/jit/mips-shared/Assembler-mips-shared.cpp b/js/src/jit/mips-shared/Assembler-mips-shared.cpp index a342cb6bc56..75567af422e 100644 --- a/js/src/jit/mips-shared/Assembler-mips-shared.cpp +++ b/js/src/jit/mips-shared/Assembler-mips-shared.cpp @@ -100,12 +100,6 @@ AssemblerMIPSShared::PatchableJumpAddress(JitCode* code, uint32_t pe_) return code->raw() + pe_; } -Assembler& -AssemblerMIPSShared::asAsm() -{ - return *static_cast(this); -} - void AssemblerMIPSShared::copyJumpRelocationTable(uint8_t* dest) { @@ -132,7 +126,7 @@ AssemblerMIPSShared::processCodeLabels(uint8_t* rawCode) { for (size_t i = 0; i < codeLabels_.length(); i++) { CodeLabel label = codeLabels_[i]; - asAsm().Bind(rawCode, label.dest(), rawCode + label.src()->offset()); + Bind(rawCode, label.dest(), rawCode + label.src()->offset()); } } @@ -1308,7 +1302,7 @@ AssemblerMIPSShared::bind(Label* label, BufferOffset boff) // Second word holds a pointer to the next branch in label's chain. next = inst[1].encode(); - asAsm().bind(reinterpret_cast(inst), b.getOffset(), dest.getOffset()); + bind(reinterpret_cast(inst), b.getOffset(), dest.getOffset()); b = BufferOffset(next); } while (next != LabelBase::INVALID_OFFSET); diff --git a/js/src/jit/mips-shared/Assembler-mips-shared.h b/js/src/jit/mips-shared/Assembler-mips-shared.h index 803247a669d..a939a982578 100644 --- a/js/src/jit/mips-shared/Assembler-mips-shared.h +++ b/js/src/jit/mips-shared/Assembler-mips-shared.h @@ -648,8 +648,6 @@ class MIPSBufferWithExecutableCopy : public MIPSBuffer } }; -class Assembler; - class AssemblerMIPSShared : public AssemblerShared { public: @@ -733,8 +731,6 @@ class AssemblerMIPSShared : public AssemblerShared uint32_t actualIndex(uint32_t) const; static uint8_t* PatchableJumpAddress(JitCode* code, uint32_t index); protected: - Assembler& asAsm(); - // structure for fixing up pc-relative loads/jumps when a the machine code // gets moved (executable copy, gc, etc.) struct RelativePatch @@ -1034,6 +1030,8 @@ class AssemblerMIPSShared : public AssemblerShared // label operations void bind(Label* label, BufferOffset boff = BufferOffset()); + virtual void bind(InstImm* inst, uint32_t branch, uint32_t target) = 0; + virtual void Bind(uint8_t* rawCode, AbsoluteLabel* label, const void* address) = 0; uint32_t currentOffset() { return nextOffset().getOffset(); }