Bug 1194139 - IonMonkey: MIPS: Redefine FloatRegisters::Code and use it in the right way. r=nbp

This commit is contained in:
Heiher 2015-08-24 09:26:00 -04:00
parent 5857e47c5c
commit f9ffe4be1b
2 changed files with 5 additions and 5 deletions

View File

@ -240,7 +240,7 @@ class BaseFloatRegisters
f31,
invalid_freg
};
typedef FPRegisterID Code;
typedef uint32_t Code;
typedef FPRegisterID Encoding;
// Content spilled during bailouts.
@ -248,7 +248,7 @@ class BaseFloatRegisters
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",
@ -257,7 +257,7 @@ class BaseFloatRegisters
return Names[code];
}
static const Code Invalid = invalid_freg;
static const Encoding Invalid = invalid_freg;
typedef uint64_t SetType;
};

View File

@ -64,7 +64,7 @@ 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);
@ -182,7 +182,7 @@ class FloatRegister : public BaseFloatRegister
}
Encoding encoding() const {
MOZ_ASSERT(!isInvalid());
return Code(code_ | (kind_ << 5));
return Encoding(code_);
}
uint32_t id() const {
return code_;