Index: src/arm/assembler-arm.h |
diff --git a/src/arm/assembler-arm.h b/src/arm/assembler-arm.h |
index a361c7ec1180fd8af3ebb76cd344a49d5ee9c2c8..3b9bb804fd331c144563d6522239c6967933a817 100644 |
--- a/src/arm/assembler-arm.h |
+++ b/src/arm/assembler-arm.h |
@@ -71,24 +71,21 @@ namespace internal { |
// Core register |
struct Register { |
static const int kNumRegisters = 16; |
- static const int kMaxNumAllocatableRegisters = 8; |
+ static const int kNumAllocatableRegisters = 8; |
static const int kSizeInBytes = 4; |
- static const int kGPRsPerNonVFP2Double = 2; |
- |
- inline static int NumAllocatableRegisters(); |
static int ToAllocationIndex(Register reg) { |
- ASSERT(reg.code() < kMaxNumAllocatableRegisters); |
+ ASSERT(reg.code() < kNumAllocatableRegisters); |
return reg.code(); |
} |
static Register FromAllocationIndex(int index) { |
- ASSERT(index >= 0 && index < kMaxNumAllocatableRegisters); |
+ ASSERT(index >= 0 && index < kNumAllocatableRegisters); |
return from_code(index); |
} |
static const char* AllocationIndexToString(int index) { |
- ASSERT(index >= 0 && index < kMaxNumAllocatableRegisters); |
+ ASSERT(index >= 0 && index < kNumAllocatableRegisters); |
const char* const names[] = { |
"r0", |
"r1", |
@@ -168,6 +165,7 @@ const Register sp = { kRegister_sp_Code }; |
const Register lr = { kRegister_lr_Code }; |
const Register pc = { kRegister_pc_Code }; |
+ |
// Single word VFP register. |
struct SwVfpRegister { |
bool is_valid() const { return 0 <= code_ && code_ < 32; } |
@@ -198,19 +196,37 @@ struct DwVfpRegister { |
// d14: 0.0 |
// d15: scratch register. |
static const int kNumReservedRegisters = 2; |
- static const int kMaxNumAllocatableRegisters = kNumRegisters - |
+ static const int kNumAllocatableRegisters = kNumRegisters - |
kNumReservedRegisters; |
- inline static int NumRegisters(); |
- inline static int NumAllocatableRegisters(); |
inline static int ToAllocationIndex(DwVfpRegister reg); |
- static const char* AllocationIndexToString(int index); |
static DwVfpRegister FromAllocationIndex(int index) { |
- ASSERT(index >= 0 && index < kMaxNumAllocatableRegisters); |
+ ASSERT(index >= 0 && index < kNumAllocatableRegisters); |
return from_code(index); |
} |
+ static const char* AllocationIndexToString(int index) { |
+ ASSERT(index >= 0 && index < kNumAllocatableRegisters); |
+ const char* const names[] = { |
+ "d0", |
+ "d1", |
+ "d2", |
+ "d3", |
+ "d4", |
+ "d5", |
+ "d6", |
+ "d7", |
+ "d8", |
+ "d9", |
+ "d10", |
+ "d11", |
+ "d12", |
+ "d13" |
+ }; |
+ return names[index]; |
+ } |
+ |
static DwVfpRegister from_code(int code) { |
DwVfpRegister r = { code }; |
return r; |
@@ -307,9 +323,6 @@ const DwVfpRegister d13 = { 13 }; |
const DwVfpRegister d14 = { 14 }; |
const DwVfpRegister d15 = { 15 }; |
-const Register sfpd_lo = { kRegister_r6_Code }; |
-const Register sfpd_hi = { kRegister_r7_Code }; |
- |
// Aliases for double registers. Defined using #define instead of |
// "static const DwVfpRegister&" because Clang complains otherwise when a |
// compilation unit that includes this header doesn't use the variables. |