diff --git a/src/compiler/register-configuration.cc b/src/compiler/register-configuration.cc index a3d3be1790..ebe6cfe23c 100644 --- a/src/compiler/register-configuration.cc +++ b/src/compiler/register-configuration.cc @@ -25,7 +25,7 @@ class ArchDefaultRegisterConfiguration : public RegisterConfiguration { 1, 1, #else - DoubleRegister::kMaxNumAllocatableRegisters, + DoubleRegister::NumAllocatableRegisters(), DoubleRegister::NumAllocatableAliasedRegisters(), #endif general_register_name_table_, @@ -35,7 +35,9 @@ class ArchDefaultRegisterConfiguration : public RegisterConfiguration { for (int i = 0; i < Register::kMaxNumAllocatableRegisters; ++i) { general_register_name_table_[i] = Register::AllocationIndexToString(i); } - for (int i = 0; i < DoubleRegister::kMaxNumAllocatableRegisters; ++i) { + DCHECK_GE(DoubleRegister::kMaxNumAllocatableRegisters, + DoubleRegister::NumAllocatableRegisters()); + for (int i = 0; i < DoubleRegister::NumAllocatableRegisters(); ++i) { double_register_name_table_[i] = DoubleRegister::AllocationIndexToString(i); }