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

Side by Side Diff: src/compiler/x64/instruction-selector-x64-unittest.cc

Issue 618643002: Replace OStream with std::ostream. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix Created 6 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/compiler/simplified-operator-unittest.cc ('k') | src/deoptimizer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/instruction-selector-unittest.h" 5 #include "src/compiler/instruction-selector-unittest.h"
6 #include "src/compiler/node-matchers.h" 6 #include "src/compiler/node-matchers.h"
7 7
8 namespace v8 { 8 namespace v8 {
9 namespace internal { 9 namespace internal {
10 namespace compiler { 10 namespace compiler {
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 namespace { 101 namespace {
102 102
103 struct MemoryAccess { 103 struct MemoryAccess {
104 MachineType type; 104 MachineType type;
105 ArchOpcode load_opcode; 105 ArchOpcode load_opcode;
106 ArchOpcode store_opcode; 106 ArchOpcode store_opcode;
107 }; 107 };
108 108
109 109
110 std::ostream& operator<<(std::ostream& os, const MemoryAccess& memacc) { 110 std::ostream& operator<<(std::ostream& os, const MemoryAccess& memacc) {
111 OStringStream ost; 111 return os << memacc.type;
112 ost << memacc.type;
113 return os << ost.c_str();
114 } 112 }
115 113
116 114
117 static const MemoryAccess kMemoryAccesses[] = { 115 static const MemoryAccess kMemoryAccesses[] = {
118 {kMachInt8, kX64Movsxbl, kX64Movb}, 116 {kMachInt8, kX64Movsxbl, kX64Movb},
119 {kMachUint8, kX64Movzxbl, kX64Movb}, 117 {kMachUint8, kX64Movzxbl, kX64Movb},
120 {kMachInt16, kX64Movsxwl, kX64Movw}, 118 {kMachInt16, kX64Movsxwl, kX64Movw},
121 {kMachUint16, kX64Movzxwl, kX64Movw}, 119 {kMachUint16, kX64Movzxwl, kX64Movw},
122 {kMachInt32, kX64Movl, kX64Movl}, 120 {kMachInt32, kX64Movl, kX64Movl},
123 {kMachUint32, kX64Movl, kX64Movl}, 121 {kMachUint32, kX64Movl, kX64Movl},
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 namespace { 294 namespace {
297 295
298 struct MultParam { 296 struct MultParam {
299 int value; 297 int value;
300 bool lea_expected; 298 bool lea_expected;
301 AddressingMode addressing_mode; 299 AddressingMode addressing_mode;
302 }; 300 };
303 301
304 302
305 std::ostream& operator<<(std::ostream& os, const MultParam& m) { 303 std::ostream& operator<<(std::ostream& os, const MultParam& m) {
306 OStringStream ost; 304 return os << m.value << "." << m.lea_expected << "." << m.addressing_mode;
307 ost << m.value << "." << m.lea_expected << "." << m.addressing_mode;
308 return os << ost.c_str();
309 } 305 }
310 306
311 307
312 const MultParam kMultParams[] = {{-1, false, kMode_None}, 308 const MultParam kMultParams[] = {{-1, false, kMode_None},
313 {0, false, kMode_None}, 309 {0, false, kMode_None},
314 {1, true, kMode_M1}, 310 {1, true, kMode_M1},
315 {2, true, kMode_M2}, 311 {2, true, kMode_M2},
316 {3, true, kMode_MR2}, 312 {3, true, kMode_MR2},
317 {4, true, kMode_M4}, 313 {4, true, kMode_M4},
318 {5, true, kMode_MR4}, 314 {5, true, kMode_MR4},
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 } 385 }
390 } 386 }
391 387
392 388
393 INSTANTIATE_TEST_CASE_P(InstructionSelectorTest, InstructionSelectorMultTest, 389 INSTANTIATE_TEST_CASE_P(InstructionSelectorTest, InstructionSelectorMultTest,
394 ::testing::ValuesIn(kMultParams)); 390 ::testing::ValuesIn(kMultParams));
395 391
396 } // namespace compiler 392 } // namespace compiler
397 } // namespace internal 393 } // namespace internal
398 } // namespace v8 394 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/simplified-operator-unittest.cc ('k') | src/deoptimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698