OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 V(ConstantE) \ | 81 V(ConstantE) \ |
82 V(ConstantI) \ | 82 V(ConstantI) \ |
83 V(ConstantS) \ | 83 V(ConstantS) \ |
84 V(ConstantT) \ | 84 V(ConstantT) \ |
85 V(ConstructDouble) \ | 85 V(ConstructDouble) \ |
86 V(Context) \ | 86 V(Context) \ |
87 V(DateField) \ | 87 V(DateField) \ |
88 V(DebugBreak) \ | 88 V(DebugBreak) \ |
89 V(DeclareGlobals) \ | 89 V(DeclareGlobals) \ |
90 V(Deoptimize) \ | 90 V(Deoptimize) \ |
| 91 V(DivByConstI) \ |
91 V(DivByPowerOf2I) \ | 92 V(DivByPowerOf2I) \ |
92 V(DivI) \ | 93 V(DivI) \ |
93 V(DoubleBits) \ | 94 V(DoubleBits) \ |
94 V(DoubleToI) \ | 95 V(DoubleToI) \ |
95 V(DoubleToSmi) \ | 96 V(DoubleToSmi) \ |
96 V(Drop) \ | 97 V(Drop) \ |
97 V(Dummy) \ | 98 V(Dummy) \ |
98 V(DummyUse) \ | 99 V(DummyUse) \ |
99 V(FlooringDivByConstI) \ | 100 V(FlooringDivByConstI) \ |
100 V(FlooringDivByPowerOf2I) \ | 101 V(FlooringDivByPowerOf2I) \ |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 V(MapEnumLength) \ | 133 V(MapEnumLength) \ |
133 V(MathAbs) \ | 134 V(MathAbs) \ |
134 V(MathClz32) \ | 135 V(MathClz32) \ |
135 V(MathExp) \ | 136 V(MathExp) \ |
136 V(MathFloor) \ | 137 V(MathFloor) \ |
137 V(MathLog) \ | 138 V(MathLog) \ |
138 V(MathMinMax) \ | 139 V(MathMinMax) \ |
139 V(MathPowHalf) \ | 140 V(MathPowHalf) \ |
140 V(MathRound) \ | 141 V(MathRound) \ |
141 V(MathSqrt) \ | 142 V(MathSqrt) \ |
| 143 V(ModByConstI) \ |
142 V(ModByPowerOf2I) \ | 144 V(ModByPowerOf2I) \ |
143 V(ModI) \ | 145 V(ModI) \ |
144 V(MulI) \ | 146 V(MulI) \ |
145 V(NumberTagD) \ | 147 V(NumberTagD) \ |
146 V(NumberTagI) \ | 148 V(NumberTagI) \ |
147 V(NumberTagU) \ | 149 V(NumberTagU) \ |
148 V(NumberUntagD) \ | 150 V(NumberUntagD) \ |
149 V(OsrEntry) \ | 151 V(OsrEntry) \ |
150 V(Parameter) \ | 152 V(Parameter) \ |
151 V(Power) \ | 153 V(Power) \ |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
650 int32_t divisor() const { return divisor_; } | 652 int32_t divisor() const { return divisor_; } |
651 | 653 |
652 DECLARE_CONCRETE_INSTRUCTION(ModByPowerOf2I, "mod-by-power-of-2-i") | 654 DECLARE_CONCRETE_INSTRUCTION(ModByPowerOf2I, "mod-by-power-of-2-i") |
653 DECLARE_HYDROGEN_ACCESSOR(Mod) | 655 DECLARE_HYDROGEN_ACCESSOR(Mod) |
654 | 656 |
655 private: | 657 private: |
656 int32_t divisor_; | 658 int32_t divisor_; |
657 }; | 659 }; |
658 | 660 |
659 | 661 |
| 662 class LModByConstI V8_FINAL : public LTemplateInstruction<1, 1, 2> { |
| 663 public: |
| 664 LModByConstI(LOperand* dividend, |
| 665 int32_t divisor, |
| 666 LOperand* temp1, |
| 667 LOperand* temp2) { |
| 668 inputs_[0] = dividend; |
| 669 divisor_ = divisor; |
| 670 temps_[0] = temp1; |
| 671 temps_[1] = temp2; |
| 672 } |
| 673 |
| 674 LOperand* dividend() { return inputs_[0]; } |
| 675 int32_t divisor() const { return divisor_; } |
| 676 LOperand* temp1() { return temps_[0]; } |
| 677 LOperand* temp2() { return temps_[1]; } |
| 678 |
| 679 DECLARE_CONCRETE_INSTRUCTION(ModByConstI, "mod-by-const-i") |
| 680 DECLARE_HYDROGEN_ACCESSOR(Mod) |
| 681 |
| 682 private: |
| 683 int32_t divisor_; |
| 684 }; |
| 685 |
| 686 |
660 class LModI V8_FINAL : public LTemplateInstruction<1, 2, 1> { | 687 class LModI V8_FINAL : public LTemplateInstruction<1, 2, 1> { |
661 public: | 688 public: |
662 LModI(LOperand* left, LOperand* right, LOperand* temp) { | 689 LModI(LOperand* left, LOperand* right, LOperand* temp) { |
663 inputs_[0] = left; | 690 inputs_[0] = left; |
664 inputs_[1] = right; | 691 inputs_[1] = right; |
665 temps_[0] = temp; | 692 temps_[0] = temp; |
666 } | 693 } |
667 | 694 |
668 LOperand* left() { return inputs_[0]; } | 695 LOperand* left() { return inputs_[0]; } |
669 LOperand* right() { return inputs_[1]; } | 696 LOperand* right() { return inputs_[1]; } |
(...skipping 15 matching lines...) Expand all Loading... |
685 int32_t divisor() const { return divisor_; } | 712 int32_t divisor() const { return divisor_; } |
686 | 713 |
687 DECLARE_CONCRETE_INSTRUCTION(DivByPowerOf2I, "div-by-power-of-2-i") | 714 DECLARE_CONCRETE_INSTRUCTION(DivByPowerOf2I, "div-by-power-of-2-i") |
688 DECLARE_HYDROGEN_ACCESSOR(Div) | 715 DECLARE_HYDROGEN_ACCESSOR(Div) |
689 | 716 |
690 private: | 717 private: |
691 int32_t divisor_; | 718 int32_t divisor_; |
692 }; | 719 }; |
693 | 720 |
694 | 721 |
| 722 class LDivByConstI V8_FINAL : public LTemplateInstruction<1, 1, 2> { |
| 723 public: |
| 724 LDivByConstI(LOperand* dividend, |
| 725 int32_t divisor, |
| 726 LOperand* temp1, |
| 727 LOperand* temp2) { |
| 728 inputs_[0] = dividend; |
| 729 divisor_ = divisor; |
| 730 temps_[0] = temp1; |
| 731 temps_[1] = temp2; |
| 732 } |
| 733 |
| 734 LOperand* dividend() { return inputs_[0]; } |
| 735 int32_t divisor() const { return divisor_; } |
| 736 LOperand* temp1() { return temps_[0]; } |
| 737 LOperand* temp2() { return temps_[1]; } |
| 738 |
| 739 DECLARE_CONCRETE_INSTRUCTION(DivByConstI, "div-by-const-i") |
| 740 DECLARE_HYDROGEN_ACCESSOR(Div) |
| 741 |
| 742 private: |
| 743 int32_t divisor_; |
| 744 }; |
| 745 |
| 746 |
695 class LDivI V8_FINAL : public LTemplateInstruction<1, 2, 1> { | 747 class LDivI V8_FINAL : public LTemplateInstruction<1, 2, 1> { |
696 public: | 748 public: |
697 LDivI(LOperand* left, LOperand* right, LOperand* temp) { | 749 LDivI(LOperand* left, LOperand* right, LOperand* temp) { |
698 inputs_[0] = left; | 750 inputs_[0] = left; |
699 inputs_[1] = right; | 751 inputs_[1] = right; |
700 temps_[0] = temp; | 752 temps_[0] = temp; |
701 } | 753 } |
702 | 754 |
703 LOperand* left() { return inputs_[0]; } | 755 LOperand* left() { return inputs_[0]; } |
704 LOperand* right() { return inputs_[1]; } | 756 LOperand* right() { return inputs_[1]; } |
(...skipping 18 matching lines...) Expand all Loading... |
723 | 775 |
724 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByPowerOf2I, | 776 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByPowerOf2I, |
725 "flooring-div-by-power-of-2-i") | 777 "flooring-div-by-power-of-2-i") |
726 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) | 778 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) |
727 | 779 |
728 private: | 780 private: |
729 int32_t divisor_; | 781 int32_t divisor_; |
730 }; | 782 }; |
731 | 783 |
732 | 784 |
733 class LFlooringDivByConstI V8_FINAL : public LTemplateInstruction<1, 1, 1> { | 785 class LFlooringDivByConstI V8_FINAL : public LTemplateInstruction<1, 1, 2> { |
734 public: | 786 public: |
735 LFlooringDivByConstI(LOperand* dividend, int32_t divisor, LOperand* temp) { | 787 LFlooringDivByConstI(LOperand* dividend, |
| 788 int32_t divisor, |
| 789 LOperand* temp1, |
| 790 LOperand* temp2) { |
736 inputs_[0] = dividend; | 791 inputs_[0] = dividend; |
737 divisor_ = divisor; | 792 divisor_ = divisor; |
738 temps_[0] = temp; | 793 temps_[0] = temp1; |
| 794 temps_[1] = temp2; |
739 } | 795 } |
740 | 796 |
741 LOperand* dividend() { return inputs_[0]; } | 797 LOperand* dividend() { return inputs_[0]; } |
742 int32_t divisor() const { return divisor_; } | 798 int32_t divisor() const { return divisor_; } |
743 LOperand* temp() { return temps_[0]; } | 799 LOperand* temp1() { return temps_[0]; } |
| 800 LOperand* temp2() { return temps_[1]; } |
744 | 801 |
745 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByConstI, "flooring-div-by-const-i") | 802 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByConstI, "flooring-div-by-const-i") |
746 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) | 803 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) |
747 | 804 |
748 private: | 805 private: |
749 int32_t divisor_; | 806 int32_t divisor_; |
750 }; | 807 }; |
751 | 808 |
752 | 809 |
753 class LMulI V8_FINAL : public LTemplateInstruction<1, 2, 1> { | 810 class LMulI V8_FINAL : public LTemplateInstruction<1, 2, 1> { |
(...skipping 1959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2713 | 2770 |
2714 LInstruction* DoMathFloor(HUnaryMathOperation* instr); | 2771 LInstruction* DoMathFloor(HUnaryMathOperation* instr); |
2715 LInstruction* DoMathRound(HUnaryMathOperation* instr); | 2772 LInstruction* DoMathRound(HUnaryMathOperation* instr); |
2716 LInstruction* DoMathAbs(HUnaryMathOperation* instr); | 2773 LInstruction* DoMathAbs(HUnaryMathOperation* instr); |
2717 LInstruction* DoMathLog(HUnaryMathOperation* instr); | 2774 LInstruction* DoMathLog(HUnaryMathOperation* instr); |
2718 LInstruction* DoMathExp(HUnaryMathOperation* instr); | 2775 LInstruction* DoMathExp(HUnaryMathOperation* instr); |
2719 LInstruction* DoMathSqrt(HUnaryMathOperation* instr); | 2776 LInstruction* DoMathSqrt(HUnaryMathOperation* instr); |
2720 LInstruction* DoMathPowHalf(HUnaryMathOperation* instr); | 2777 LInstruction* DoMathPowHalf(HUnaryMathOperation* instr); |
2721 LInstruction* DoMathClz32(HUnaryMathOperation* instr); | 2778 LInstruction* DoMathClz32(HUnaryMathOperation* instr); |
2722 LInstruction* DoDivByPowerOf2I(HDiv* instr); | 2779 LInstruction* DoDivByPowerOf2I(HDiv* instr); |
| 2780 LInstruction* DoDivByConstI(HDiv* instr); |
2723 LInstruction* DoDivI(HBinaryOperation* instr); | 2781 LInstruction* DoDivI(HBinaryOperation* instr); |
2724 LInstruction* DoModByPowerOf2I(HMod* instr); | 2782 LInstruction* DoModByPowerOf2I(HMod* instr); |
| 2783 LInstruction* DoModByConstI(HMod* instr); |
2725 LInstruction* DoModI(HMod* instr); | 2784 LInstruction* DoModI(HMod* instr); |
2726 LInstruction* DoFlooringDivByPowerOf2I(HMathFloorOfDiv* instr); | 2785 LInstruction* DoFlooringDivByPowerOf2I(HMathFloorOfDiv* instr); |
2727 LInstruction* DoFlooringDivByConstI(HMathFloorOfDiv* instr); | 2786 LInstruction* DoFlooringDivByConstI(HMathFloorOfDiv* instr); |
2728 | 2787 |
2729 private: | 2788 private: |
2730 enum Status { | 2789 enum Status { |
2731 UNUSED, | 2790 UNUSED, |
2732 BUILDING, | 2791 BUILDING, |
2733 DONE, | 2792 DONE, |
2734 ABORTED | 2793 ABORTED |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2854 | 2913 |
2855 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2914 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2856 }; | 2915 }; |
2857 | 2916 |
2858 #undef DECLARE_HYDROGEN_ACCESSOR | 2917 #undef DECLARE_HYDROGEN_ACCESSOR |
2859 #undef DECLARE_CONCRETE_INSTRUCTION | 2918 #undef DECLARE_CONCRETE_INSTRUCTION |
2860 | 2919 |
2861 } } // namespace v8::internal | 2920 } } // namespace v8::internal |
2862 | 2921 |
2863 #endif // V8_IA32_LITHIUM_IA32_H_ | 2922 #endif // V8_IA32_LITHIUM_IA32_H_ |
OLD | NEW |