| OLD | NEW |
| 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 | 6 |
| 7 namespace v8 { | 7 namespace v8 { |
| 8 namespace internal { | 8 namespace internal { |
| 9 namespace compiler { | 9 namespace compiler { |
| 10 | 10 |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 namespace { | 139 namespace { |
| 140 | 140 |
| 141 struct MemoryAccess { | 141 struct MemoryAccess { |
| 142 MachineType type; | 142 MachineType type; |
| 143 ArchOpcode load_opcode; | 143 ArchOpcode load_opcode; |
| 144 ArchOpcode store_opcode; | 144 ArchOpcode store_opcode; |
| 145 }; | 145 }; |
| 146 | 146 |
| 147 | 147 |
| 148 std::ostream& operator<<(std::ostream& os, const MemoryAccess& memacc) { | 148 std::ostream& operator<<(std::ostream& os, const MemoryAccess& memacc) { |
| 149 OStringStream ost; | 149 return os << memacc.type; |
| 150 ost << memacc.type; | |
| 151 return os << ost.c_str(); | |
| 152 } | 150 } |
| 153 | 151 |
| 154 | 152 |
| 155 static const MemoryAccess kMemoryAccesses[] = { | 153 static const MemoryAccess kMemoryAccesses[] = { |
| 156 {kMachInt8, kIA32Movsxbl, kIA32Movb}, | 154 {kMachInt8, kIA32Movsxbl, kIA32Movb}, |
| 157 {kMachUint8, kIA32Movzxbl, kIA32Movb}, | 155 {kMachUint8, kIA32Movzxbl, kIA32Movb}, |
| 158 {kMachInt16, kIA32Movsxwl, kIA32Movw}, | 156 {kMachInt16, kIA32Movsxwl, kIA32Movw}, |
| 159 {kMachUint16, kIA32Movzxwl, kIA32Movw}, | 157 {kMachUint16, kIA32Movzxwl, kIA32Movw}, |
| 160 {kMachInt32, kIA32Movl, kIA32Movl}, | 158 {kMachInt32, kIA32Movl, kIA32Movl}, |
| 161 {kMachUint32, kIA32Movl, kIA32Movl}, | 159 {kMachUint32, kIA32Movl, kIA32Movl}, |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 Node* base = bases[i]; | 418 Node* base = bases[i]; |
| 421 Node* index = indices[j]; | 419 Node* index = indices[j]; |
| 422 Run(base, index, kMode_MI); | 420 Run(base, index, kMode_MI); |
| 423 } | 421 } |
| 424 } | 422 } |
| 425 } | 423 } |
| 426 | 424 |
| 427 } // namespace compiler | 425 } // namespace compiler |
| 428 } // namespace internal | 426 } // namespace internal |
| 429 } // namespace v8 | 427 } // namespace v8 |
| OLD | NEW |