Index: src/arm64/assembler-arm64.cc |
diff --git a/src/arm64/assembler-arm64.cc b/src/arm64/assembler-arm64.cc |
index 37a2f5a29d006f1c753b2a0bb07a1183c1276893..0a1ecda9aa9b7c7883ef4eced453dd3035bd18f8 100644 |
--- a/src/arm64/assembler-arm64.cc |
+++ b/src/arm64/assembler-arm64.cc |
@@ -35,6 +35,7 @@ |
#include "src/arm64/frames-arm64.h" |
#include "src/base/bits.h" |
#include "src/base/cpu.h" |
+#include "src/register-configuration.h" |
namespace v8 { |
namespace internal { |
@@ -192,8 +193,10 @@ bool RelocInfo::IsInConstantPool() { |
Register GetAllocatableRegisterThatIsNotOneOf(Register reg1, Register reg2, |
Register reg3, Register reg4) { |
CPURegList regs(reg1, reg2, reg3, reg4); |
- 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_double_registers(); ++i) { |
+ int code = config->GetAllocatableDoubleCode(i); |
+ Register candidate = Register::from_code(code); |
if (regs.IncludesAliasOf(candidate)) continue; |
return candidate; |
} |