Index: src/arm/macro-assembler-arm.cc |
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc |
index 49802ba734d64184440f509c33ec8db32375fec8..0356dd854b86cc08eb7cd069dd94ada0d14f92ad 100644 |
--- a/src/arm/macro-assembler-arm.cc |
+++ b/src/arm/macro-assembler-arm.cc |
@@ -11,6 +11,7 @@ |
#include "src/bootstrapper.h" |
#include "src/codegen.h" |
#include "src/debug/debug.h" |
+#include "src/register-configuration.h" |
#include "src/runtime/runtime.h" |
#include "src/arm/macro-assembler-arm.h" |
@@ -759,7 +760,8 @@ MemOperand MacroAssembler::SafepointRegistersAndDoublesSlot(Register reg) { |
// Number of d-regs not known at snapshot time. |
DCHECK(!serializer_enabled()); |
// General purpose registers are pushed last on the stack. |
- int doubles_size = DwVfpRegister::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); |
} |
@@ -3578,8 +3580,10 @@ Register GetRegisterThatIsNotOneOf(Register reg1, |
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; |
} |