Index: src/x64/macro-assembler-x64.cc |
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc |
index 3eb3b2ff0b4a4c301c7050ec4eb01433ae005e4f..0361828eb5f901823404ca4ad571cfcc189b5f30 100644 |
--- a/src/x64/macro-assembler-x64.cc |
+++ b/src/x64/macro-assembler-x64.cc |
@@ -11,7 +11,6 @@ |
#include "src/cpu-profiler.h" |
#include "src/debug/debug.h" |
#include "src/heap/heap.h" |
-#include "src/register-configuration.h" |
#include "src/x64/assembler-x64.h" |
#include "src/x64/macro-assembler-x64.h" |
@@ -731,8 +730,7 @@ |
} |
-#define REG(Name) \ |
- { Register::kCode_##Name } |
+#define REG(Name) { kRegister_ ## Name ## _Code } |
static const Register saved_regs[] = { |
REG(rax), REG(rcx), REG(rdx), REG(rbx), REG(rbp), REG(rsi), REG(rdi), REG(r8), |
@@ -3706,14 +3704,12 @@ |
#endif |
// Optionally save all XMM registers. |
if (save_doubles) { |
- int space = XMMRegister::kMaxNumRegisters * kDoubleSize + |
- arg_stack_space * kRegisterSize; |
+ int space = XMMRegister::kMaxNumAllocatableRegisters * kDoubleSize + |
+ arg_stack_space * kRegisterSize; |
subp(rsp, Immediate(space)); |
int offset = -2 * kPointerSize; |
- const RegisterConfiguration* config = RegisterConfiguration::ArchDefault(); |
- for (int i = 0; i < config->num_allocatable_double_registers(); ++i) { |
- DoubleRegister reg = |
- DoubleRegister::from_code(config->GetAllocatableDoubleCode(i)); |
+ for (int i = 0; i < XMMRegister::NumAllocatableRegisters(); i++) { |
+ XMMRegister reg = XMMRegister::FromAllocationIndex(i); |
movsd(Operand(rbp, offset - ((i + 1) * kDoubleSize)), reg); |
} |
} else if (arg_stack_space > 0) { |
@@ -3756,10 +3752,8 @@ |
// r15 : argv |
if (save_doubles) { |
int offset = -2 * kPointerSize; |
- const RegisterConfiguration* config = RegisterConfiguration::ArchDefault(); |
- for (int i = 0; i < config->num_allocatable_double_registers(); ++i) { |
- DoubleRegister reg = |
- DoubleRegister::from_code(config->GetAllocatableDoubleCode(i)); |
+ for (int i = 0; i < XMMRegister::NumAllocatableRegisters(); i++) { |
+ XMMRegister reg = XMMRegister::FromAllocationIndex(i); |
movsd(reg, Operand(rbp, offset - ((i + 1) * kDoubleSize))); |
} |
} |