Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1043)

Unified Diff: src/register-configuration.cc

Issue 1518573002: RegisterAllocator: Clean up before adding aliasing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/register-configuration.h ('k') | test/unittests/compiler/instruction-sequence-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/register-configuration.cc
diff --git a/src/register-configuration.cc b/src/register-configuration.cc
index 2df825afc0a28c3095138f2ee4c47c7bba2fcdaf..ab5c6926a7a5bcbae62d46c137f9b28922143e82 100644
--- a/src/register-configuration.cc
+++ b/src/register-configuration.cc
@@ -41,7 +41,7 @@ static const char* const kDoubleRegisterNames[] = {
STATIC_ASSERT(RegisterConfiguration::kMaxGeneralRegisters >=
Register::kNumRegisters);
-STATIC_ASSERT(RegisterConfiguration::kMaxDoubleRegisters >=
+STATIC_ASSERT(RegisterConfiguration::kMaxFPRegisters >=
DoubleRegister::kMaxNumRegisters);
class ArchDefaultRegisterConfiguration : public RegisterConfiguration {
@@ -152,6 +152,8 @@ RegisterConfiguration::RegisterConfiguration(
allocatable_double_codes_(allocatable_double_codes),
general_register_names_(general_register_names),
double_register_names_(double_register_names) {
+ DCHECK(num_general_registers_ <= RegisterConfiguration::kMaxGeneralRegisters);
+ DCHECK(num_double_registers_ <= RegisterConfiguration::kMaxFPRegisters);
for (int i = 0; i < num_allocatable_general_registers_; ++i) {
allocatable_general_codes_mask_ |= (1 << allocatable_general_codes_[i]);
}
« no previous file with comments | « src/register-configuration.h ('k') | test/unittests/compiler/instruction-sequence-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698