Index: src/mips/assembler-mips.h |
diff --git a/src/mips/assembler-mips.h b/src/mips/assembler-mips.h |
index 09aa371667883a90bc4c5e02e3b1461e73bf5dbc..dd3a065dcac61d53e5aee70a924d476410ca6b3b 100644 |
--- a/src/mips/assembler-mips.h |
+++ b/src/mips/assembler-mips.h |
@@ -72,20 +72,23 @@ namespace internal { |
// Core register. |
struct Register { |
static const int kNumRegisters = v8::internal::kNumRegisters; |
- static const int kNumAllocatableRegisters = 14; // v0 through t7. |
+ static const int kMaxNumAllocatableRegisters = 14; // v0 through t7. |
static const int kSizeInBytes = 4; |
+ static const int kGPRsPerNonFPUDouble = 2; |
+ |
+ inline static int NumAllocatableRegisters(); |
static int ToAllocationIndex(Register reg) { |
return reg.code() - 2; // zero_reg and 'at' are skipped. |
} |
static Register FromAllocationIndex(int index) { |
- ASSERT(index >= 0 && index < kNumAllocatableRegisters); |
+ ASSERT(index >= 0 && index < kMaxNumAllocatableRegisters); |
return from_code(index + 2); // zero_reg and 'at' are skipped. |
} |
static const char* AllocationIndexToString(int index) { |
- ASSERT(index >= 0 && index < kNumAllocatableRegisters); |
+ ASSERT(index >= 0 && index < kMaxNumAllocatableRegisters); |
const char* const names[] = { |
"v0", |
"v1", |
@@ -197,38 +200,19 @@ struct FPURegister { |
// f28: 0.0 |
// f30: scratch register. |
static const int kNumReservedRegisters = 2; |
- static const int kNumAllocatableRegisters = kNumRegisters / 2 - |
+ static const int kMaxNumAllocatableRegisters = kNumRegisters / 2 - |
kNumReservedRegisters; |
- |
+ inline static int NumRegisters(); |
+ inline static int NumAllocatableRegisters(); |
inline static int ToAllocationIndex(FPURegister reg); |
+ static const char* AllocationIndexToString(int index); |
static FPURegister FromAllocationIndex(int index) { |
- ASSERT(index >= 0 && index < kNumAllocatableRegisters); |
+ ASSERT(index >= 0 && index < kMaxNumAllocatableRegisters); |
return from_code(index * 2); |
} |
- static const char* AllocationIndexToString(int index) { |
- ASSERT(index >= 0 && index < kNumAllocatableRegisters); |
- const char* const names[] = { |
- "f0", |
- "f2", |
- "f4", |
- "f6", |
- "f8", |
- "f10", |
- "f12", |
- "f14", |
- "f16", |
- "f18", |
- "f20", |
- "f22", |
- "f24", |
- "f26" |
- }; |
- return names[index]; |
- } |
- |
static FPURegister from_code(int code) { |
FPURegister r = { code }; |
return r; |
@@ -316,6 +300,9 @@ const FPURegister f29 = { 29 }; |
const FPURegister f30 = { 30 }; |
const FPURegister f31 = { 31 }; |
+const Register sfpd_lo = { kRegister_t6_Code }; |
+const Register sfpd_hi = { kRegister_t7_Code }; |
+ |
// Register aliases. |
// cp is assumed to be a callee saved register. |
// Defined using #define instead of "static const Register&" because Clang |