Bug 1194139 - IonMonkey: MIPS: Redefine FloatRegisters::Code and use it in the right way. r=nbp
☠☠ backed out by d26fdc33c95e ☠ ☠
authorHeiher <r@hev.cc>
Mon, 24 Aug 2015 09:26:00 -0400
changeset 292726 0ecba91f42b5f879d9c090a396bd575042f96142
parent 292725 64f4fe2fb89bd18f2ecc50f3ef11a9a7b1395434
child 292727 c82573f56056e5df4b786c5ecbf7becf883e52bf
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnbp
bugs1194139
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1194139 - IonMonkey: MIPS: Redefine FloatRegisters::Code and use it in the right way. r=nbp
js/src/jit/mips-shared/Architecture-mips-shared.h
js/src/jit/mips32/Architecture-mips32.h
--- a/js/src/jit/mips-shared/Architecture-mips-shared.h
+++ b/js/src/jit/mips-shared/Architecture-mips-shared.h
@@ -235,34 +235,34 @@ class BaseFloatRegisters
         f26,
         f27,
         f28,
         f29,
         f30,
         f31,
         invalid_freg
     };
-    typedef FPRegisterID Code;
+    typedef uint32_t Code;
     typedef FPRegisterID Encoding;
 
     // Content spilled during bailouts.
     union RegisterContent {
         double d;
     };
 
-    static const char* GetName(Code code) {
+    static const char* GetName(Encoding code) {
         static const char * const Names[] = { "f0", "f1", "f2", "f3",  "f4", "f5",  "f6", "f7",
                                               "f8", "f9",  "f10", "f11", "f12", "f13",
                                               "f14", "f15", "f16", "f17", "f18", "f19",
                                               "f20", "f21", "f22", "f23", "f24", "f25",
                                               "f26", "f27", "f28", "f29", "f30", "f31"};
         return Names[code];
     }
 
-    static const Code Invalid = invalid_freg;
+    static const Encoding Invalid = invalid_freg;
 
     typedef uint64_t SetType;
 };
 
 template <typename T>
 class TypedRegisterSet;
 
 class BaseFloatRegister
--- a/js/src/jit/mips32/Architecture-mips32.h
+++ b/js/src/jit/mips32/Architecture-mips32.h
@@ -59,17 +59,17 @@ static const uint32_t BAILOUT_TABLE_ENTR
 
 // When using O32 ABI, floating-point coprocessor is 32 bit.
 // When using N32 ABI, floating-point coprocessor is 64 bit.
 class FloatRegisters : public BaseFloatRegisters
 {
   public:
     static const char* GetName(uint32_t i) {
         MOZ_ASSERT(i < Total);
-        return GetName(Code(i % 32));
+        return BaseFloatRegisters::GetName(Encoding(i % 32));
     }
 
     static Code FromName(const char* name);
 
     static const uint32_t Total = 64;
     static const uint32_t TotalDouble = 16;
     static const uint32_t TotalSingle = 32;
     static const uint32_t Allocatable = 42;
@@ -177,17 +177,17 @@ class FloatRegister : public BaseFloatRe
     FloatRegister asFloat32x4() const { MOZ_CRASH("NYI"); }
 
     Code code() const {
         MOZ_ASSERT(!isInvalid());
         return Code(code_  | (kind_ << 5));
     }
     Encoding encoding() const {
         MOZ_ASSERT(!isInvalid());
-        return Code(code_  | (kind_ << 5));
+        return Encoding(code_);
     }
     uint32_t id() const {
         return code_;
     }
     static FloatRegister FromCode(uint32_t i) {
         uint32_t code = i & 31;
         uint32_t kind = i >> 5;
         return FloatRegister(code, RegType(kind));