Index: src/mips/deoptimizer-mips.cc |
diff --git a/src/mips/deoptimizer-mips.cc b/src/mips/deoptimizer-mips.cc |
index 10cab306a29d2ca3c24d008ba3acd2ae96f81138..974692495a24e9d31fd0c166576b80fb8a9c10c6 100644 |
--- a/src/mips/deoptimizer-mips.cc |
+++ b/src/mips/deoptimizer-mips.cc |
@@ -5,7 +5,6 @@ |
#include "src/codegen.h" |
#include "src/deoptimizer.h" |
#include "src/full-codegen/full-codegen.h" |
-#include "src/register-configuration.h" |
#include "src/safepoint-table.h" |
namespace v8 { |
@@ -89,7 +88,7 @@ |
} |
input_->SetRegister(sp.code(), reinterpret_cast<intptr_t>(frame->sp())); |
input_->SetRegister(fp.code(), reinterpret_cast<intptr_t>(frame->fp())); |
- for (int i = 0; i < DoubleRegister::kMaxNumRegisters; i++) { |
+ for (int i = 0; i < DoubleRegister::NumAllocatableRegisters(); i++) { |
input_->SetDoubleRegister(i, 0.0); |
} |
@@ -140,15 +139,14 @@ |
RegList restored_regs = kJSCallerSaved | kCalleeSaved; |
RegList saved_regs = restored_regs | sp.bit() | ra.bit(); |
- const int kDoubleRegsSize = kDoubleSize * DoubleRegister::kMaxNumRegisters; |
+ const int kDoubleRegsSize = |
+ kDoubleSize * FPURegister::kMaxNumAllocatableRegisters; |
// Save all FPU registers before messing with them. |
__ Subu(sp, sp, Operand(kDoubleRegsSize)); |
- const RegisterConfiguration* config = RegisterConfiguration::ArchDefault(); |
- for (int i = 0; i < config->num_allocatable_double_registers(); ++i) { |
- int code = config->GetAllocatableDoubleCode(i); |
- const DoubleRegister fpu_reg = DoubleRegister::from_code(code); |
- int offset = code * kDoubleSize; |
+ for (int i = 0; i < FPURegister::kMaxNumAllocatableRegisters; ++i) { |
+ FPURegister fpu_reg = FPURegister::FromAllocationIndex(i); |
+ int offset = i * kDoubleSize; |
__ sdc1(fpu_reg, MemOperand(sp, offset)); |
} |
@@ -217,10 +215,9 @@ |
int double_regs_offset = FrameDescription::double_registers_offset(); |
// Copy FPU registers to |
// double_registers_[DoubleRegister::kNumAllocatableRegisters] |
- for (int i = 0; i < config->num_allocatable_double_registers(); ++i) { |
- int code = config->GetAllocatableDoubleCode(i); |
- int dst_offset = code * kDoubleSize + double_regs_offset; |
- int src_offset = code * kDoubleSize + kNumberOfRegisters * kPointerSize; |
+ for (int i = 0; i < FPURegister::NumAllocatableRegisters(); ++i) { |
+ int dst_offset = i * kDoubleSize + double_regs_offset; |
+ int src_offset = i * kDoubleSize + kNumberOfRegisters * kPointerSize; |
__ ldc1(f0, MemOperand(sp, src_offset)); |
__ sdc1(f0, MemOperand(a1, dst_offset)); |
} |
@@ -287,10 +284,9 @@ |
__ BranchShort(&outer_push_loop, lt, t0, Operand(a1)); |
__ lw(a1, MemOperand(a0, Deoptimizer::input_offset())); |
- for (int i = 0; i < config->num_allocatable_double_registers(); ++i) { |
- int code = config->GetAllocatableDoubleCode(i); |
- const DoubleRegister fpu_reg = DoubleRegister::from_code(code); |
- int src_offset = code * kDoubleSize + double_regs_offset; |
+ for (int i = 0; i < FPURegister::kMaxNumAllocatableRegisters; ++i) { |
+ const FPURegister fpu_reg = FPURegister::FromAllocationIndex(i); |
+ int src_offset = i * kDoubleSize + double_regs_offset; |
__ ldc1(fpu_reg, MemOperand(a1, src_offset)); |
} |