Bug 1213146 - IonMonkey: MIPS: Remove AssemblerMIPSShared::asAsm. r=arai
authorHeiher <r@hev.cc>
Sat, 31 Oct 2015 21:10:03 +0000 (05:10 +0800)
committerMike Hommey <glandium@debian.org>
Sun, 14 Feb 2016 09:25:51 +0000 (09:25 +0000)
Gbp-Pq: Topic fixes
Gbp-Pq: Name Bug-1213146-IonMonkey-MIPS-Remove-AssemblerMIPSShare.patch

js/src/jit/mips-shared/Assembler-mips-shared.cpp
js/src/jit/mips-shared/Assembler-mips-shared.h

index a342cb6bc56df1f18a88a7ba04d2b307a70c1da9..75567af422e26c714dee6e16090f98ba2e2ffde9 100644 (file)
@@ -100,12 +100,6 @@ AssemblerMIPSShared::PatchableJumpAddress(JitCode* code, uint32_t pe_)
     return code->raw() + pe_;
 }
 
-Assembler&
-AssemblerMIPSShared::asAsm()
-{
-    return *static_cast<Assembler*>(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<InstImm*>(inst), b.getOffset(), dest.getOffset());
+            bind(reinterpret_cast<InstImm*>(inst), b.getOffset(), dest.getOffset());
 
             b = BufferOffset(next);
         } while (next != LabelBase::INVALID_OFFSET);
index 803247a669d680436ed875b85dce894b0816de12..a939a98257863748c6b712b2b92647648a6d7652 100644 (file)
@@ -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();
     }