From 634e43219684f5b60f29f7bb47b2064a6d3bb612 Mon Sep 17 00:00:00 2001 From: Heiher Date: Wed, 26 Aug 2015 01:42:00 -0400 Subject: [PATCH] Bug 1198628 - IonMonkey: ARM: Redefine FloatRegisters::Code and use it in the right way. r=nbp --- js/src/jit/arm/Architecture-arm.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/js/src/jit/arm/Architecture-arm.h b/js/src/jit/arm/Architecture-arm.h index 6f419ed8b4e9..22761a0872a0 100644 --- a/js/src/jit/arm/Architecture-arm.h +++ b/js/src/jit/arm/Architecture-arm.h @@ -239,7 +239,7 @@ class FloatRegisters invalid_freg }; - typedef FPRegisterID Code; + typedef uint32_t Code; typedef FPRegisterID Encoding; // Content spilled during bailouts. @@ -247,14 +247,14 @@ class FloatRegisters double d; }; - static const char* GetDoubleName(Code code) { + static const char* GetDoubleName(Encoding code) { static const char * const Names[] = { "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "d10", "d11", "d12", "d13", "d14", "d15", "d16", "d17", "d18", "d19", "d20", "d21", "d22", "d23", "d24", "d25", "d26", "d27", "d28", "d29", "d30", "d31"}; return Names[code]; } - static const char* GetSingleName(Code code) { + static const char* GetSingleName(Encoding code) { static const char * const Names[] = { "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", @@ -264,12 +264,12 @@ class FloatRegisters static const char* GetName(uint32_t i) { MOZ_ASSERT(i < Total); - return GetName(Code(i)); + return GetName(Encoding(i)); } static Code FromName(const char* name); - static const Code Invalid = invalid_freg; + static const Encoding Invalid = invalid_freg; static const uint32_t Total = 48; static const uint32_t TotalDouble = 16; static const uint32_t TotalSingle = 32; @@ -432,7 +432,7 @@ class VFPRegister } Encoding encoding() const { MOZ_ASSERT(!_isInvalid && !_isMissing); - return Code(code_ | (kind << 5)); + return Encoding(code_); } uint32_t id() const { return code_; @@ -449,8 +449,8 @@ class VFPRegister } const char* name() const { if (isDouble()) - return FloatRegisters::GetDoubleName(Code(code_)); - return FloatRegisters::GetSingleName(Code(code_)); + return FloatRegisters::GetDoubleName(Encoding(code_)); + return FloatRegisters::GetSingleName(Encoding(code_)); } bool operator != (const VFPRegister& other) const { return other.kind != kind || code_ != other.code_;