Index: src/ppc/macro-assembler-ppc.cc |
diff --git a/src/ppc/macro-assembler-ppc.cc b/src/ppc/macro-assembler-ppc.cc |
index e973471572e95425c6e095b5399acd476860a572..f597574d9ebfbc81a2d4e72b765c025cd0302722 100644 |
--- a/src/ppc/macro-assembler-ppc.cc |
+++ b/src/ppc/macro-assembler-ppc.cc |
@@ -12,9 +12,11 @@ |
#include "src/bootstrapper.h" |
#include "src/codegen.h" |
#include "src/debug/debug.h" |
-#include "src/ppc/macro-assembler-ppc.h" |
+#include "src/register-configuration.h" |
#include "src/runtime/runtime.h" |
+#include "src/ppc/macro-assembler-ppc.h" |
+ |
namespace v8 { |
namespace internal { |
@@ -564,7 +566,7 @@ void MacroAssembler::PopFixedFrame(Register marker_reg) { |
const RegList MacroAssembler::kSafepointSavedRegisters = Register::kAllocatable; |
const int MacroAssembler::kNumSafepointSavedRegisters = |
- Register::kMaxNumAllocatableRegisters; |
+ Register::kNumAllocatable; |
// Push and pop all registers that can hold pointers. |
void MacroAssembler::PushSafepointRegisters() { |
@@ -623,7 +625,8 @@ MemOperand MacroAssembler::SafepointRegisterSlot(Register reg) { |
MemOperand MacroAssembler::SafepointRegistersAndDoublesSlot(Register reg) { |
// General purpose registers are pushed last on the stack. |
- int doubles_size = DoubleRegister::NumAllocatableRegisters() * kDoubleSize; |
+ const RegisterConfiguration* config = RegisterConfiguration::ArchDefault(); |
+ int doubles_size = config->num_allocatable_double_registers() * kDoubleSize; |
int register_offset = SafepointRegisterStackIndex(reg.code()) * kPointerSize; |
return MemOperand(sp, doubles_size + register_offset); |
} |
@@ -863,7 +866,7 @@ void MacroAssembler::EnterExitFrame(bool save_doubles, int stack_space) { |
MultiPushDoubles(kCallerSavedDoubles); |
// Note that d0 will be accessible at |
// fp - ExitFrameConstants::kFrameSize - |
- // kNumVolatileRegisters * kDoubleSize, |
+ // kNumCallerSavedDoubles * kDoubleSize, |
// since the sp slot and code slot were pushed after the fp. |
} |
@@ -922,7 +925,7 @@ void MacroAssembler::LeaveExitFrame(bool save_doubles, Register argument_count, |
// Optionally restore all double registers. |
if (save_doubles) { |
// Calculate the stack location of the saved doubles and restore them. |
- const int kNumRegs = DoubleRegister::kNumVolatileRegisters; |
+ const int kNumRegs = kNumCallerSavedDoubles; |
const int offset = |
(ExitFrameConstants::kFrameSize + kNumRegs * kDoubleSize); |
addi(r6, fp, Operand(-offset)); |
@@ -4250,8 +4253,10 @@ Register GetRegisterThatIsNotOneOf(Register reg1, Register reg2, Register reg3, |
if (reg5.is_valid()) regs |= reg5.bit(); |
if (reg6.is_valid()) regs |= reg6.bit(); |
- for (int i = 0; i < Register::NumAllocatableRegisters(); i++) { |
- Register candidate = Register::FromAllocationIndex(i); |
+ const RegisterConfiguration* config = RegisterConfiguration::ArchDefault(); |
+ for (int i = 0; i < config->num_allocatable_general_registers(); ++i) { |
+ int code = config->GetAllocatableGeneralCode(i); |
+ Register candidate = Register::from_code(code); |
if (regs & candidate.bit()) continue; |
return candidate; |
} |