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/base/adapters.h" | 5 #include "src/base/adapters.h" |
6 #include "src/base/bits.h" | 6 #include "src/base/bits.h" |
7 #include "src/compiler/instruction-selector-impl.h" | 7 #include "src/compiler/instruction-selector-impl.h" |
8 #include "src/compiler/node-matchers.h" | 8 #include "src/compiler/node-matchers.h" |
9 #include "src/compiler/node-properties.h" | 9 #include "src/compiler/node-properties.h" |
10 | 10 |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 opcode = load_rep.IsUnsigned() ? kArmLdrh : kArmLdrsh; | 420 opcode = load_rep.IsUnsigned() ? kArmLdrh : kArmLdrsh; |
421 break; | 421 break; |
422 case MachineRepresentation::kTaggedSigned: // Fall through. | 422 case MachineRepresentation::kTaggedSigned: // Fall through. |
423 case MachineRepresentation::kTaggedPointer: // Fall through. | 423 case MachineRepresentation::kTaggedPointer: // Fall through. |
424 case MachineRepresentation::kTagged: // Fall through. | 424 case MachineRepresentation::kTagged: // Fall through. |
425 case MachineRepresentation::kWord32: | 425 case MachineRepresentation::kWord32: |
426 opcode = kArmLdr; | 426 opcode = kArmLdr; |
427 break; | 427 break; |
428 case MachineRepresentation::kWord64: // Fall through. | 428 case MachineRepresentation::kWord64: // Fall through. |
429 case MachineRepresentation::kSimd128: // Fall through. | 429 case MachineRepresentation::kSimd128: // Fall through. |
| 430 case MachineRepresentation::kSimdBool4: // Fall through. |
| 431 case MachineRepresentation::kSimdBool8: // Fall through. |
| 432 case MachineRepresentation::kSimdBool16: // Fall through. |
430 case MachineRepresentation::kNone: | 433 case MachineRepresentation::kNone: |
431 UNREACHABLE(); | 434 UNREACHABLE(); |
432 return; | 435 return; |
433 } | 436 } |
434 | 437 |
435 InstructionOperand output = g.DefineAsRegister(node); | 438 InstructionOperand output = g.DefineAsRegister(node); |
436 EmitLoad(this, opcode, &output, base, index); | 439 EmitLoad(this, opcode, &output, base, index); |
437 } | 440 } |
438 | 441 |
439 void InstructionSelector::VisitProtectedLoad(Node* node) { | 442 void InstructionSelector::VisitProtectedLoad(Node* node) { |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 opcode = kArmStrh; | 508 opcode = kArmStrh; |
506 break; | 509 break; |
507 case MachineRepresentation::kTaggedSigned: // Fall through. | 510 case MachineRepresentation::kTaggedSigned: // Fall through. |
508 case MachineRepresentation::kTaggedPointer: // Fall through. | 511 case MachineRepresentation::kTaggedPointer: // Fall through. |
509 case MachineRepresentation::kTagged: // Fall through. | 512 case MachineRepresentation::kTagged: // Fall through. |
510 case MachineRepresentation::kWord32: | 513 case MachineRepresentation::kWord32: |
511 opcode = kArmStr; | 514 opcode = kArmStr; |
512 break; | 515 break; |
513 case MachineRepresentation::kWord64: // Fall through. | 516 case MachineRepresentation::kWord64: // Fall through. |
514 case MachineRepresentation::kSimd128: // Fall through. | 517 case MachineRepresentation::kSimd128: // Fall through. |
| 518 case MachineRepresentation::kSimdBool4: // Fall through. |
| 519 case MachineRepresentation::kSimdBool8: // Fall through. |
| 520 case MachineRepresentation::kSimdBool16: // Fall through. |
515 case MachineRepresentation::kNone: | 521 case MachineRepresentation::kNone: |
516 UNREACHABLE(); | 522 UNREACHABLE(); |
517 return; | 523 return; |
518 } | 524 } |
519 | 525 |
520 InstructionOperand inputs[4]; | 526 InstructionOperand inputs[4]; |
521 size_t input_count = 0; | 527 size_t input_count = 0; |
522 inputs[input_count++] = g.UseRegister(value); | 528 inputs[input_count++] = g.UseRegister(value); |
523 inputs[input_count++] = g.UseRegister(base); | 529 inputs[input_count++] = g.UseRegister(base); |
524 EmitStore(this, opcode, input_count, inputs, index); | 530 EmitStore(this, opcode, input_count, inputs, index); |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
668 break; | 674 break; |
669 case MachineRepresentation::kFloat64: | 675 case MachineRepresentation::kFloat64: |
670 opcode = kCheckedLoadFloat64; | 676 opcode = kCheckedLoadFloat64; |
671 break; | 677 break; |
672 case MachineRepresentation::kBit: // Fall through. | 678 case MachineRepresentation::kBit: // Fall through. |
673 case MachineRepresentation::kTaggedSigned: // Fall through. | 679 case MachineRepresentation::kTaggedSigned: // Fall through. |
674 case MachineRepresentation::kTaggedPointer: // Fall through. | 680 case MachineRepresentation::kTaggedPointer: // Fall through. |
675 case MachineRepresentation::kTagged: // Fall through. | 681 case MachineRepresentation::kTagged: // Fall through. |
676 case MachineRepresentation::kWord64: // Fall through. | 682 case MachineRepresentation::kWord64: // Fall through. |
677 case MachineRepresentation::kSimd128: // Fall through. | 683 case MachineRepresentation::kSimd128: // Fall through. |
| 684 case MachineRepresentation::kSimdBool4: // Fall through. |
| 685 case MachineRepresentation::kSimdBool8: // Fall through. |
| 686 case MachineRepresentation::kSimdBool16: // Fall through. |
678 case MachineRepresentation::kNone: | 687 case MachineRepresentation::kNone: |
679 UNREACHABLE(); | 688 UNREACHABLE(); |
680 return; | 689 return; |
681 } | 690 } |
682 InstructionOperand offset_operand = g.UseRegister(offset); | 691 InstructionOperand offset_operand = g.UseRegister(offset); |
683 InstructionOperand length_operand = g.CanBeImmediate(length, kArmCmp) | 692 InstructionOperand length_operand = g.CanBeImmediate(length, kArmCmp) |
684 ? g.UseImmediate(length) | 693 ? g.UseImmediate(length) |
685 : g.UseRegister(length); | 694 : g.UseRegister(length); |
686 Emit(opcode | AddressingModeField::encode(kMode_Offset_RR), | 695 Emit(opcode | AddressingModeField::encode(kMode_Offset_RR), |
687 g.DefineAsRegister(node), offset_operand, length_operand, | 696 g.DefineAsRegister(node), offset_operand, length_operand, |
(...skipping 24 matching lines...) Expand all Loading... |
712 break; | 721 break; |
713 case MachineRepresentation::kFloat64: | 722 case MachineRepresentation::kFloat64: |
714 opcode = kCheckedStoreFloat64; | 723 opcode = kCheckedStoreFloat64; |
715 break; | 724 break; |
716 case MachineRepresentation::kBit: // Fall through. | 725 case MachineRepresentation::kBit: // Fall through. |
717 case MachineRepresentation::kTaggedSigned: // Fall through. | 726 case MachineRepresentation::kTaggedSigned: // Fall through. |
718 case MachineRepresentation::kTaggedPointer: // Fall through. | 727 case MachineRepresentation::kTaggedPointer: // Fall through. |
719 case MachineRepresentation::kTagged: // Fall through. | 728 case MachineRepresentation::kTagged: // Fall through. |
720 case MachineRepresentation::kWord64: // Fall through. | 729 case MachineRepresentation::kWord64: // Fall through. |
721 case MachineRepresentation::kSimd128: // Fall through. | 730 case MachineRepresentation::kSimd128: // Fall through. |
| 731 case MachineRepresentation::kSimdBool4: // Fall through. |
| 732 case MachineRepresentation::kSimdBool8: // Fall through. |
| 733 case MachineRepresentation::kSimdBool16: // Fall through. |
722 case MachineRepresentation::kNone: | 734 case MachineRepresentation::kNone: |
723 UNREACHABLE(); | 735 UNREACHABLE(); |
724 return; | 736 return; |
725 } | 737 } |
726 InstructionOperand offset_operand = g.UseRegister(offset); | 738 InstructionOperand offset_operand = g.UseRegister(offset); |
727 InstructionOperand length_operand = g.CanBeImmediate(length, kArmCmp) | 739 InstructionOperand length_operand = g.CanBeImmediate(length, kArmCmp) |
728 ? g.UseImmediate(length) | 740 ? g.UseImmediate(length) |
729 : g.UseRegister(length); | 741 : g.UseRegister(length); |
730 Emit(opcode | AddressingModeField::encode(kMode_Offset_RR), g.NoOutput(), | 742 Emit(opcode | AddressingModeField::encode(kMode_Offset_RR), g.NoOutput(), |
731 offset_operand, length_operand, g.UseRegister(value), | 743 offset_operand, length_operand, g.UseRegister(value), |
(...skipping 1608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2340 Vector<MachineType> req_aligned = Vector<MachineType>::New(2); | 2352 Vector<MachineType> req_aligned = Vector<MachineType>::New(2); |
2341 req_aligned[0] = MachineType::Float32(); | 2353 req_aligned[0] = MachineType::Float32(); |
2342 req_aligned[1] = MachineType::Float64(); | 2354 req_aligned[1] = MachineType::Float64(); |
2343 return MachineOperatorBuilder::AlignmentRequirements:: | 2355 return MachineOperatorBuilder::AlignmentRequirements:: |
2344 SomeUnalignedAccessUnsupported(req_aligned, req_aligned); | 2356 SomeUnalignedAccessUnsupported(req_aligned, req_aligned); |
2345 } | 2357 } |
2346 | 2358 |
2347 } // namespace compiler | 2359 } // namespace compiler |
2348 } // namespace internal | 2360 } // namespace internal |
2349 } // namespace v8 | 2361 } // namespace v8 |
OLD | NEW |