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 <algorithm> | 5 #include <algorithm> |
6 | 6 |
7 #include "src/base/adapters.h" | 7 #include "src/base/adapters.h" |
8 #include "src/compiler/instruction-selector-impl.h" | 8 #include "src/compiler/instruction-selector-impl.h" |
9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
10 #include "src/compiler/node-properties.h" | 10 #include "src/compiler/node-properties.h" |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 case MachineRepresentation::kWord32: | 213 case MachineRepresentation::kWord32: |
214 opcode = kX64Movl; | 214 opcode = kX64Movl; |
215 break; | 215 break; |
216 case MachineRepresentation::kTaggedSigned: // Fall through. | 216 case MachineRepresentation::kTaggedSigned: // Fall through. |
217 case MachineRepresentation::kTaggedPointer: // Fall through. | 217 case MachineRepresentation::kTaggedPointer: // Fall through. |
218 case MachineRepresentation::kTagged: // Fall through. | 218 case MachineRepresentation::kTagged: // Fall through. |
219 case MachineRepresentation::kWord64: | 219 case MachineRepresentation::kWord64: |
220 opcode = kX64Movq; | 220 opcode = kX64Movq; |
221 break; | 221 break; |
222 case MachineRepresentation::kSimd128: // Fall through. | 222 case MachineRepresentation::kSimd128: // Fall through. |
| 223 case MachineRepresentation::kSimd1x4: // Fall through. |
| 224 case MachineRepresentation::kSimd1x8: // Fall through. |
| 225 case MachineRepresentation::kSimd1x16: // Fall through. |
223 case MachineRepresentation::kNone: | 226 case MachineRepresentation::kNone: |
224 UNREACHABLE(); | 227 UNREACHABLE(); |
225 break; | 228 break; |
226 } | 229 } |
227 return opcode; | 230 return opcode; |
228 } | 231 } |
229 | 232 |
230 ArchOpcode GetStoreOpcode(StoreRepresentation store_rep) { | 233 ArchOpcode GetStoreOpcode(StoreRepresentation store_rep) { |
231 switch (store_rep.representation()) { | 234 switch (store_rep.representation()) { |
232 case MachineRepresentation::kFloat32: | 235 case MachineRepresentation::kFloat32: |
(...skipping 12 matching lines...) Expand all Loading... |
245 case MachineRepresentation::kWord32: | 248 case MachineRepresentation::kWord32: |
246 return kX64Movl; | 249 return kX64Movl; |
247 break; | 250 break; |
248 case MachineRepresentation::kTaggedSigned: // Fall through. | 251 case MachineRepresentation::kTaggedSigned: // Fall through. |
249 case MachineRepresentation::kTaggedPointer: // Fall through. | 252 case MachineRepresentation::kTaggedPointer: // Fall through. |
250 case MachineRepresentation::kTagged: // Fall through. | 253 case MachineRepresentation::kTagged: // Fall through. |
251 case MachineRepresentation::kWord64: | 254 case MachineRepresentation::kWord64: |
252 return kX64Movq; | 255 return kX64Movq; |
253 break; | 256 break; |
254 case MachineRepresentation::kSimd128: // Fall through. | 257 case MachineRepresentation::kSimd128: // Fall through. |
| 258 case MachineRepresentation::kSimd1x4: // Fall through. |
| 259 case MachineRepresentation::kSimd1x8: // Fall through. |
| 260 case MachineRepresentation::kSimd1x16: // Fall through. |
255 case MachineRepresentation::kNone: | 261 case MachineRepresentation::kNone: |
256 UNREACHABLE(); | 262 UNREACHABLE(); |
257 return kArchNop; | 263 return kArchNop; |
258 } | 264 } |
259 UNREACHABLE(); | 265 UNREACHABLE(); |
260 return kArchNop; | 266 return kArchNop; |
261 } | 267 } |
262 | 268 |
263 } // namespace | 269 } // namespace |
264 | 270 |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 opcode = kCheckedLoadWord64; | 403 opcode = kCheckedLoadWord64; |
398 break; | 404 break; |
399 case MachineRepresentation::kFloat32: | 405 case MachineRepresentation::kFloat32: |
400 opcode = kCheckedLoadFloat32; | 406 opcode = kCheckedLoadFloat32; |
401 break; | 407 break; |
402 case MachineRepresentation::kFloat64: | 408 case MachineRepresentation::kFloat64: |
403 opcode = kCheckedLoadFloat64; | 409 opcode = kCheckedLoadFloat64; |
404 break; | 410 break; |
405 case MachineRepresentation::kBit: // Fall through. | 411 case MachineRepresentation::kBit: // Fall through. |
406 case MachineRepresentation::kSimd128: // Fall through. | 412 case MachineRepresentation::kSimd128: // Fall through. |
| 413 case MachineRepresentation::kSimd1x4: // Fall through. |
| 414 case MachineRepresentation::kSimd1x8: // Fall through. |
| 415 case MachineRepresentation::kSimd1x16: // Fall through. |
407 case MachineRepresentation::kTaggedSigned: // Fall through. | 416 case MachineRepresentation::kTaggedSigned: // Fall through. |
408 case MachineRepresentation::kTaggedPointer: // Fall through. | 417 case MachineRepresentation::kTaggedPointer: // Fall through. |
409 case MachineRepresentation::kTagged: // Fall through. | 418 case MachineRepresentation::kTagged: // Fall through. |
410 case MachineRepresentation::kNone: | 419 case MachineRepresentation::kNone: |
411 UNREACHABLE(); | 420 UNREACHABLE(); |
412 return; | 421 return; |
413 } | 422 } |
414 if (offset->opcode() == IrOpcode::kInt32Add && CanCover(node, offset)) { | 423 if (offset->opcode() == IrOpcode::kInt32Add && CanCover(node, offset)) { |
415 Int32Matcher mlength(length); | 424 Int32Matcher mlength(length); |
416 Int32BinopMatcher moffset(offset); | 425 Int32BinopMatcher moffset(offset); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 opcode = kCheckedStoreWord64; | 461 opcode = kCheckedStoreWord64; |
453 break; | 462 break; |
454 case MachineRepresentation::kFloat32: | 463 case MachineRepresentation::kFloat32: |
455 opcode = kCheckedStoreFloat32; | 464 opcode = kCheckedStoreFloat32; |
456 break; | 465 break; |
457 case MachineRepresentation::kFloat64: | 466 case MachineRepresentation::kFloat64: |
458 opcode = kCheckedStoreFloat64; | 467 opcode = kCheckedStoreFloat64; |
459 break; | 468 break; |
460 case MachineRepresentation::kBit: // Fall through. | 469 case MachineRepresentation::kBit: // Fall through. |
461 case MachineRepresentation::kSimd128: // Fall through. | 470 case MachineRepresentation::kSimd128: // Fall through. |
| 471 case MachineRepresentation::kSimd1x4: // Fall through. |
| 472 case MachineRepresentation::kSimd1x8: // Fall through. |
| 473 case MachineRepresentation::kSimd1x16: // Fall through. |
462 case MachineRepresentation::kTaggedSigned: // Fall through. | 474 case MachineRepresentation::kTaggedSigned: // Fall through. |
463 case MachineRepresentation::kTaggedPointer: // Fall through. | 475 case MachineRepresentation::kTaggedPointer: // Fall through. |
464 case MachineRepresentation::kTagged: // Fall through. | 476 case MachineRepresentation::kTagged: // Fall through. |
465 case MachineRepresentation::kNone: | 477 case MachineRepresentation::kNone: |
466 UNREACHABLE(); | 478 UNREACHABLE(); |
467 return; | 479 return; |
468 } | 480 } |
469 InstructionOperand value_operand = | 481 InstructionOperand value_operand = |
470 g.CanBeImmediate(value) ? g.UseImmediate(value) : g.UseRegister(value); | 482 g.CanBeImmediate(value) ? g.UseImmediate(value) : g.UseRegister(value); |
471 if (offset->opcode() == IrOpcode::kInt32Add && CanCover(node, offset)) { | 483 if (offset->opcode() == IrOpcode::kInt32Add && CanCover(node, offset)) { |
(...skipping 1848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2320 // static | 2332 // static |
2321 MachineOperatorBuilder::AlignmentRequirements | 2333 MachineOperatorBuilder::AlignmentRequirements |
2322 InstructionSelector::AlignmentRequirements() { | 2334 InstructionSelector::AlignmentRequirements() { |
2323 return MachineOperatorBuilder::AlignmentRequirements:: | 2335 return MachineOperatorBuilder::AlignmentRequirements:: |
2324 FullUnalignedAccessSupport(); | 2336 FullUnalignedAccessSupport(); |
2325 } | 2337 } |
2326 | 2338 |
2327 } // namespace compiler | 2339 } // namespace compiler |
2328 } // namespace internal | 2340 } // namespace internal |
2329 } // namespace v8 | 2341 } // namespace v8 |
OLD | NEW |