Index: src/mips/assembler-mips-inl.h |
diff --git a/src/mips/assembler-mips-inl.h b/src/mips/assembler-mips-inl.h |
index 9936e9e5a0aeed0b972c72a6020d3c4653cc937a..38a7cf02a2a94070505b3bd3de05b4644a377565 100644 |
--- a/src/mips/assembler-mips-inl.h |
+++ b/src/mips/assembler-mips-inl.h |
@@ -80,9 +80,36 @@ bool Operand::is_reg() const { |
} |
+int Register::NumAllocatableRegisters() { |
+ if (CpuFeatures::IsSupported(FPU)) { |
+ return kMaxNumAllocatableRegisters; |
+ } else { |
+ return kMaxNumAllocatableRegisters - kGPRsPerNonFPUDouble; |
+ } |
+} |
+ |
+ |
+int DoubleRegister::NumRegisters() { |
+ if (CpuFeatures::IsSupported(FPU)) { |
+ return FPURegister::kNumRegisters; |
+ } else { |
+ return 1; |
+ } |
+} |
+ |
+ |
+int DoubleRegister::NumAllocatableRegisters() { |
+ if (CpuFeatures::IsSupported(FPU)) { |
+ return FPURegister::kMaxNumAllocatableRegisters; |
+ } else { |
+ return 1; |
+ } |
+} |
+ |
+ |
int FPURegister::ToAllocationIndex(FPURegister reg) { |
ASSERT(reg.code() % 2 == 0); |
- ASSERT(reg.code() / 2 < kNumAllocatableRegisters); |
+ ASSERT(reg.code() / 2 < kMaxNumAllocatableRegisters); |
ASSERT(reg.is_valid()); |
ASSERT(!reg.is(kDoubleRegZero)); |
ASSERT(!reg.is(kLithiumScratchDouble)); |