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

Unified Diff: test/unittests/compiler/instruction-sequence-unittest.cc

Issue 2587593002: Revert of MIPS: Fix bad RegisterConfiguration usage in InstructionSequence unit tests. (Closed)
Patch Set: Created 4 years 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
Index: test/unittests/compiler/instruction-sequence-unittest.cc
diff --git a/test/unittests/compiler/instruction-sequence-unittest.cc b/test/unittests/compiler/instruction-sequence-unittest.cc
index 9d17c26a5642d9d0efd12d53d01bb19fd742f58a..e61f690b4ef29adbb8bd2d0f6306fe9582be7020 100644
--- a/test/unittests/compiler/instruction-sequence-unittest.cc
+++ b/test/unittests/compiler/instruction-sequence-unittest.cc
@@ -18,6 +18,11 @@
double_register_names_[RegisterConfiguration::kMaxFPRegisters];
static char register_names_[10 * (RegisterConfiguration::kMaxGeneralRegisters +
RegisterConfiguration::kMaxFPRegisters)];
+
+namespace {
+static int allocatable_codes[InstructionSequenceTest::kDefaultNRegs] = {
+ 0, 1, 2, 3, 4, 5, 6, 7};
+}
static void InitializeRegisterNames() {
char* loc = register_names_;
@@ -80,8 +85,19 @@
}
}
-const RegisterConfiguration* InstructionSequenceTest::config() {
- return sequence()->GetRegisterConfigurationForTesting();
+RegisterConfiguration* InstructionSequenceTest::config() {
+ if (!config_) {
+ config_.reset(new RegisterConfiguration(
+ num_general_registers_, num_double_registers_, num_general_registers_,
+ num_double_registers_, allocatable_codes, allocatable_codes,
+ kSimpleFPAliasing ? RegisterConfiguration::OVERLAP
+ : RegisterConfiguration::COMBINE,
+ general_register_names_,
+ double_register_names_, // float register names
+ double_register_names_,
+ double_register_names_)); // SIMD 128 register names
+ }
+ return config_.get();
}
« no previous file with comments | « test/unittests/compiler/instruction-sequence-unittest.h ('k') | test/unittests/compiler/register-allocator-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698