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

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

Issue 2433093002: MIPS: Fix bad RegisterConfiguration usage in InstructionSequence unit tests. (Closed)
Patch Set: Rebase to master Created 4 years, 1 month 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 e61f690b4ef29adbb8bd2d0f6306fe9582be7020..9d17c26a5642d9d0efd12d53d01bb19fd742f58a 100644
--- a/test/unittests/compiler/instruction-sequence-unittest.cc
+++ b/test/unittests/compiler/instruction-sequence-unittest.cc
@@ -19,11 +19,6 @@ static const char*
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_;
for (int i = 0; i < RegisterConfiguration::kMaxGeneralRegisters; ++i) {
@@ -85,19 +80,8 @@ int InstructionSequenceTest::GetAllocatableCode(int index,
}
}
-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();
+const RegisterConfiguration* InstructionSequenceTest::config() {
+ return sequence()->GetRegisterConfigurationForTesting();
}
« 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