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-impl.h" | 5 #include "src/compiler/instruction-selector-impl.h" |
6 #include "src/compiler/node-matchers.h" | 6 #include "src/compiler/node-matchers.h" |
7 #include "src/compiler/node-properties.h" | 7 #include "src/compiler/node-properties.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
584 immediate_mode = kLoadStoreImm8; | 584 immediate_mode = kLoadStoreImm8; |
585 break; | 585 break; |
586 case MachineRepresentation::kWord16: | 586 case MachineRepresentation::kWord16: |
587 opcode = load_rep.IsSigned() ? kArm64Ldrsh : kArm64Ldrh; | 587 opcode = load_rep.IsSigned() ? kArm64Ldrsh : kArm64Ldrh; |
588 immediate_mode = kLoadStoreImm16; | 588 immediate_mode = kLoadStoreImm16; |
589 break; | 589 break; |
590 case MachineRepresentation::kWord32: | 590 case MachineRepresentation::kWord32: |
591 opcode = kArm64LdrW; | 591 opcode = kArm64LdrW; |
592 immediate_mode = kLoadStoreImm32; | 592 immediate_mode = kLoadStoreImm32; |
593 break; | 593 break; |
| 594 case MachineRepresentation::kTaggedSigned: // Fall through. |
| 595 case MachineRepresentation::kTaggedPointer: // Fall through. |
594 case MachineRepresentation::kTagged: // Fall through. | 596 case MachineRepresentation::kTagged: // Fall through. |
595 case MachineRepresentation::kWord64: | 597 case MachineRepresentation::kWord64: |
596 opcode = kArm64Ldr; | 598 opcode = kArm64Ldr; |
597 immediate_mode = kLoadStoreImm64; | 599 immediate_mode = kLoadStoreImm64; |
598 break; | 600 break; |
599 case MachineRepresentation::kSimd128: // Fall through. | 601 case MachineRepresentation::kSimd128: // Fall through. |
600 case MachineRepresentation::kNone: | 602 case MachineRepresentation::kNone: |
601 UNREACHABLE(); | 603 UNREACHABLE(); |
602 return; | 604 return; |
603 } | 605 } |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
674 immediate_mode = kLoadStoreImm8; | 676 immediate_mode = kLoadStoreImm8; |
675 break; | 677 break; |
676 case MachineRepresentation::kWord16: | 678 case MachineRepresentation::kWord16: |
677 opcode = kArm64Strh; | 679 opcode = kArm64Strh; |
678 immediate_mode = kLoadStoreImm16; | 680 immediate_mode = kLoadStoreImm16; |
679 break; | 681 break; |
680 case MachineRepresentation::kWord32: | 682 case MachineRepresentation::kWord32: |
681 opcode = kArm64StrW; | 683 opcode = kArm64StrW; |
682 immediate_mode = kLoadStoreImm32; | 684 immediate_mode = kLoadStoreImm32; |
683 break; | 685 break; |
| 686 case MachineRepresentation::kTaggedSigned: // Fall through. |
| 687 case MachineRepresentation::kTaggedPointer: // Fall through. |
684 case MachineRepresentation::kTagged: // Fall through. | 688 case MachineRepresentation::kTagged: // Fall through. |
685 case MachineRepresentation::kWord64: | 689 case MachineRepresentation::kWord64: |
686 opcode = kArm64Str; | 690 opcode = kArm64Str; |
687 immediate_mode = kLoadStoreImm64; | 691 immediate_mode = kLoadStoreImm64; |
688 break; | 692 break; |
689 case MachineRepresentation::kSimd128: // Fall through. | 693 case MachineRepresentation::kSimd128: // Fall through. |
690 case MachineRepresentation::kNone: | 694 case MachineRepresentation::kNone: |
691 UNREACHABLE(); | 695 UNREACHABLE(); |
692 return; | 696 return; |
693 } | 697 } |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 case MachineRepresentation::kWord64: | 743 case MachineRepresentation::kWord64: |
740 opcode = kCheckedLoadWord64; | 744 opcode = kCheckedLoadWord64; |
741 break; | 745 break; |
742 case MachineRepresentation::kFloat32: | 746 case MachineRepresentation::kFloat32: |
743 opcode = kCheckedLoadFloat32; | 747 opcode = kCheckedLoadFloat32; |
744 break; | 748 break; |
745 case MachineRepresentation::kFloat64: | 749 case MachineRepresentation::kFloat64: |
746 opcode = kCheckedLoadFloat64; | 750 opcode = kCheckedLoadFloat64; |
747 break; | 751 break; |
748 case MachineRepresentation::kBit: // Fall through. | 752 case MachineRepresentation::kBit: // Fall through. |
| 753 case MachineRepresentation::kTaggedSigned: // Fall through. |
| 754 case MachineRepresentation::kTaggedPointer: // Fall through. |
749 case MachineRepresentation::kTagged: // Fall through. | 755 case MachineRepresentation::kTagged: // Fall through. |
750 case MachineRepresentation::kSimd128: // Fall through. | 756 case MachineRepresentation::kSimd128: // Fall through. |
751 case MachineRepresentation::kNone: | 757 case MachineRepresentation::kNone: |
752 UNREACHABLE(); | 758 UNREACHABLE(); |
753 return; | 759 return; |
754 } | 760 } |
755 // If the length is a constant power of two, allow the code generator to | 761 // If the length is a constant power of two, allow the code generator to |
756 // pick a more efficient bounds check sequence by passing the length as an | 762 // pick a more efficient bounds check sequence by passing the length as an |
757 // immediate. | 763 // immediate. |
758 if (length->opcode() == IrOpcode::kInt32Constant) { | 764 if (length->opcode() == IrOpcode::kInt32Constant) { |
(...skipping 30 matching lines...) Expand all Loading... |
789 case MachineRepresentation::kWord64: | 795 case MachineRepresentation::kWord64: |
790 opcode = kCheckedStoreWord64; | 796 opcode = kCheckedStoreWord64; |
791 break; | 797 break; |
792 case MachineRepresentation::kFloat32: | 798 case MachineRepresentation::kFloat32: |
793 opcode = kCheckedStoreFloat32; | 799 opcode = kCheckedStoreFloat32; |
794 break; | 800 break; |
795 case MachineRepresentation::kFloat64: | 801 case MachineRepresentation::kFloat64: |
796 opcode = kCheckedStoreFloat64; | 802 opcode = kCheckedStoreFloat64; |
797 break; | 803 break; |
798 case MachineRepresentation::kBit: // Fall through. | 804 case MachineRepresentation::kBit: // Fall through. |
| 805 case MachineRepresentation::kTaggedSigned: // Fall through. |
| 806 case MachineRepresentation::kTaggedPointer: // Fall through. |
799 case MachineRepresentation::kTagged: // Fall through. | 807 case MachineRepresentation::kTagged: // Fall through. |
800 case MachineRepresentation::kSimd128: // Fall through. | 808 case MachineRepresentation::kSimd128: // Fall through. |
801 case MachineRepresentation::kNone: | 809 case MachineRepresentation::kNone: |
802 UNREACHABLE(); | 810 UNREACHABLE(); |
803 return; | 811 return; |
804 } | 812 } |
805 // If the length is a constant power of two, allow the code generator to | 813 // If the length is a constant power of two, allow the code generator to |
806 // pick a more efficient bounds check sequence by passing the length as an | 814 // pick a more efficient bounds check sequence by passing the length as an |
807 // immediate. | 815 // immediate. |
808 if (length->opcode() == IrOpcode::kInt32Constant) { | 816 if (length->opcode() == IrOpcode::kInt32Constant) { |
(...skipping 1980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2789 // static | 2797 // static |
2790 MachineOperatorBuilder::AlignmentRequirements | 2798 MachineOperatorBuilder::AlignmentRequirements |
2791 InstructionSelector::AlignmentRequirements() { | 2799 InstructionSelector::AlignmentRequirements() { |
2792 return MachineOperatorBuilder::AlignmentRequirements:: | 2800 return MachineOperatorBuilder::AlignmentRequirements:: |
2793 FullUnalignedAccessSupport(); | 2801 FullUnalignedAccessSupport(); |
2794 } | 2802 } |
2795 | 2803 |
2796 } // namespace compiler | 2804 } // namespace compiler |
2797 } // namespace internal | 2805 } // namespace internal |
2798 } // namespace v8 | 2806 } // namespace v8 |
OLD | NEW |