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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 V(ConstantD) \ | 78 V(ConstantD) \ |
79 V(ConstantE) \ | 79 V(ConstantE) \ |
80 V(ConstantI) \ | 80 V(ConstantI) \ |
81 V(ConstantS) \ | 81 V(ConstantS) \ |
82 V(ConstantT) \ | 82 V(ConstantT) \ |
83 V(Context) \ | 83 V(Context) \ |
84 V(DateField) \ | 84 V(DateField) \ |
85 V(DebugBreak) \ | 85 V(DebugBreak) \ |
86 V(DeclareGlobals) \ | 86 V(DeclareGlobals) \ |
87 V(Deoptimize) \ | 87 V(Deoptimize) \ |
88 V(DivByConstI) \ | |
89 V(DivByPowerOf2I) \ | 88 V(DivByPowerOf2I) \ |
90 V(DivI) \ | 89 V(DivI) \ |
91 V(DoubleToI) \ | 90 V(DoubleToI) \ |
92 V(DoubleToSmi) \ | 91 V(DoubleToSmi) \ |
93 V(Drop) \ | 92 V(Drop) \ |
94 V(Dummy) \ | 93 V(Dummy) \ |
95 V(DummyUse) \ | 94 V(DummyUse) \ |
96 V(FlooringDivByConstI) \ | 95 V(FlooringDivByConstI) \ |
97 V(FlooringDivByPowerOf2I) \ | 96 V(FlooringDivByPowerOf2I) \ |
98 V(ForInCacheArray) \ | 97 V(ForInCacheArray) \ |
(...skipping 30 matching lines...) Expand all Loading... |
129 V(MapEnumLength) \ | 128 V(MapEnumLength) \ |
130 V(MathAbs) \ | 129 V(MathAbs) \ |
131 V(MathClz32) \ | 130 V(MathClz32) \ |
132 V(MathExp) \ | 131 V(MathExp) \ |
133 V(MathFloor) \ | 132 V(MathFloor) \ |
134 V(MathLog) \ | 133 V(MathLog) \ |
135 V(MathMinMax) \ | 134 V(MathMinMax) \ |
136 V(MathPowHalf) \ | 135 V(MathPowHalf) \ |
137 V(MathRound) \ | 136 V(MathRound) \ |
138 V(MathSqrt) \ | 137 V(MathSqrt) \ |
139 V(ModByConstI) \ | |
140 V(ModByPowerOf2I) \ | 138 V(ModByPowerOf2I) \ |
141 V(ModI) \ | 139 V(ModI) \ |
142 V(MulI) \ | 140 V(MulI) \ |
143 V(MultiplyAddD) \ | 141 V(MultiplyAddD) \ |
144 V(MultiplySubD) \ | 142 V(MultiplySubD) \ |
145 V(NumberTagD) \ | 143 V(NumberTagD) \ |
146 V(NumberTagI) \ | 144 V(NumberTagI) \ |
147 V(NumberTagU) \ | 145 V(NumberTagU) \ |
148 V(NumberUntagD) \ | 146 V(NumberUntagD) \ |
149 V(OsrEntry) \ | 147 V(OsrEntry) \ |
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 int32_t divisor() const { return divisor_; } | 629 int32_t divisor() const { return divisor_; } |
632 | 630 |
633 DECLARE_CONCRETE_INSTRUCTION(ModByPowerOf2I, "mod-by-power-of-2-i") | 631 DECLARE_CONCRETE_INSTRUCTION(ModByPowerOf2I, "mod-by-power-of-2-i") |
634 DECLARE_HYDROGEN_ACCESSOR(Mod) | 632 DECLARE_HYDROGEN_ACCESSOR(Mod) |
635 | 633 |
636 private: | 634 private: |
637 int32_t divisor_; | 635 int32_t divisor_; |
638 }; | 636 }; |
639 | 637 |
640 | 638 |
641 class LModByConstI V8_FINAL : public LTemplateInstruction<1, 1, 0> { | |
642 public: | |
643 LModByConstI(LOperand* dividend, int32_t divisor) { | |
644 inputs_[0] = dividend; | |
645 divisor_ = divisor; | |
646 } | |
647 | |
648 LOperand* dividend() { return inputs_[0]; } | |
649 int32_t divisor() const { return divisor_; } | |
650 | |
651 DECLARE_CONCRETE_INSTRUCTION(ModByConstI, "mod-by-const-i") | |
652 DECLARE_HYDROGEN_ACCESSOR(Mod) | |
653 | |
654 private: | |
655 int32_t divisor_; | |
656 }; | |
657 | |
658 | |
659 class LModI V8_FINAL : public LTemplateInstruction<1, 2, 2> { | 639 class LModI V8_FINAL : public LTemplateInstruction<1, 2, 2> { |
660 public: | 640 public: |
661 LModI(LOperand* left, LOperand* right, LOperand* temp, LOperand* temp2) { | 641 LModI(LOperand* left, LOperand* right, LOperand* temp, LOperand* temp2) { |
662 inputs_[0] = left; | 642 inputs_[0] = left; |
663 inputs_[1] = right; | 643 inputs_[1] = right; |
664 temps_[0] = temp; | 644 temps_[0] = temp; |
665 temps_[1] = temp2; | 645 temps_[1] = temp2; |
666 } | 646 } |
667 | 647 |
668 LOperand* left() { return inputs_[0]; } | 648 LOperand* left() { return inputs_[0]; } |
(...skipping 17 matching lines...) Expand all Loading... |
686 int32_t divisor() const { return divisor_; } | 666 int32_t divisor() const { return divisor_; } |
687 | 667 |
688 DECLARE_CONCRETE_INSTRUCTION(DivByPowerOf2I, "div-by-power-of-2-i") | 668 DECLARE_CONCRETE_INSTRUCTION(DivByPowerOf2I, "div-by-power-of-2-i") |
689 DECLARE_HYDROGEN_ACCESSOR(Div) | 669 DECLARE_HYDROGEN_ACCESSOR(Div) |
690 | 670 |
691 private: | 671 private: |
692 int32_t divisor_; | 672 int32_t divisor_; |
693 }; | 673 }; |
694 | 674 |
695 | 675 |
696 class LDivByConstI V8_FINAL : public LTemplateInstruction<1, 1, 0> { | |
697 public: | |
698 LDivByConstI(LOperand* dividend, int32_t divisor) { | |
699 inputs_[0] = dividend; | |
700 divisor_ = divisor; | |
701 } | |
702 | |
703 LOperand* dividend() { return inputs_[0]; } | |
704 int32_t divisor() const { return divisor_; } | |
705 | |
706 DECLARE_CONCRETE_INSTRUCTION(DivByConstI, "div-by-const-i") | |
707 DECLARE_HYDROGEN_ACCESSOR(Div) | |
708 | |
709 private: | |
710 int32_t divisor_; | |
711 }; | |
712 | |
713 | |
714 class LDivI V8_FINAL : public LTemplateInstruction<1, 2, 1> { | 676 class LDivI V8_FINAL : public LTemplateInstruction<1, 2, 1> { |
715 public: | 677 public: |
716 LDivI(LOperand* left, LOperand* right, LOperand* temp) { | 678 LDivI(LOperand* left, LOperand* right, LOperand* temp) { |
717 inputs_[0] = left; | 679 inputs_[0] = left; |
718 inputs_[1] = right; | 680 inputs_[1] = right; |
719 temps_[0] = temp; | 681 temps_[0] = temp; |
720 } | 682 } |
721 | 683 |
722 LOperand* left() { return inputs_[0]; } | 684 LOperand* left() { return inputs_[0]; } |
723 LOperand* right() { return inputs_[1]; } | 685 LOperand* right() { return inputs_[1]; } |
(...skipping 18 matching lines...) Expand all Loading... |
742 | 704 |
743 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByPowerOf2I, | 705 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByPowerOf2I, |
744 "flooring-div-by-power-of-2-i") | 706 "flooring-div-by-power-of-2-i") |
745 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) | 707 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) |
746 | 708 |
747 private: | 709 private: |
748 int32_t divisor_; | 710 int32_t divisor_; |
749 }; | 711 }; |
750 | 712 |
751 | 713 |
752 class LFlooringDivByConstI V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 714 class LFlooringDivByConstI V8_FINAL : public LTemplateInstruction<1, 2, 1> { |
753 public: | 715 public: |
754 LFlooringDivByConstI(LOperand* dividend, int32_t divisor) { | 716 LFlooringDivByConstI(LOperand* dividend, LOperand* divisor, LOperand* temp) { |
755 inputs_[0] = dividend; | 717 inputs_[0] = dividend; |
756 divisor_ = divisor; | 718 inputs_[1] = divisor; |
| 719 temps_[0] = temp; |
757 } | 720 } |
758 | 721 |
759 LOperand* dividend() { return inputs_[0]; } | 722 LOperand* dividend() { return inputs_[0]; } |
760 int32_t divisor() const { return divisor_; } | 723 LOperand* divisor() { return inputs_[1]; } |
761 LOperand* temp1() { return temps_[0]; } | 724 LOperand* temp() { return temps_[0]; } |
762 | 725 |
763 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByConstI, "flooring-div-by-const-i") | 726 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByConstI, "flooring-div-by-const-i") |
764 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) | 727 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) |
765 | |
766 private: | |
767 int32_t divisor_; | |
768 }; | 728 }; |
769 | 729 |
770 | 730 |
771 class LMulI V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 731 class LMulI V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
772 public: | 732 public: |
773 LMulI(LOperand* left, LOperand* right) { | 733 LMulI(LOperand* left, LOperand* right) { |
774 inputs_[0] = left; | 734 inputs_[0] = left; |
775 inputs_[1] = right; | 735 inputs_[1] = right; |
776 } | 736 } |
777 | 737 |
(...skipping 1937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2715 | 2675 |
2716 LInstruction* DoMathFloor(HUnaryMathOperation* instr); | 2676 LInstruction* DoMathFloor(HUnaryMathOperation* instr); |
2717 LInstruction* DoMathRound(HUnaryMathOperation* instr); | 2677 LInstruction* DoMathRound(HUnaryMathOperation* instr); |
2718 LInstruction* DoMathAbs(HUnaryMathOperation* instr); | 2678 LInstruction* DoMathAbs(HUnaryMathOperation* instr); |
2719 LInstruction* DoMathLog(HUnaryMathOperation* instr); | 2679 LInstruction* DoMathLog(HUnaryMathOperation* instr); |
2720 LInstruction* DoMathExp(HUnaryMathOperation* instr); | 2680 LInstruction* DoMathExp(HUnaryMathOperation* instr); |
2721 LInstruction* DoMathSqrt(HUnaryMathOperation* instr); | 2681 LInstruction* DoMathSqrt(HUnaryMathOperation* instr); |
2722 LInstruction* DoMathPowHalf(HUnaryMathOperation* instr); | 2682 LInstruction* DoMathPowHalf(HUnaryMathOperation* instr); |
2723 LInstruction* DoMathClz32(HUnaryMathOperation* instr); | 2683 LInstruction* DoMathClz32(HUnaryMathOperation* instr); |
2724 LInstruction* DoDivByPowerOf2I(HDiv* instr); | 2684 LInstruction* DoDivByPowerOf2I(HDiv* instr); |
2725 LInstruction* DoDivByConstI(HDiv* instr); | |
2726 LInstruction* DoDivI(HBinaryOperation* instr); | 2685 LInstruction* DoDivI(HBinaryOperation* instr); |
2727 LInstruction* DoModByPowerOf2I(HMod* instr); | 2686 LInstruction* DoModByPowerOf2I(HMod* instr); |
2728 LInstruction* DoModByConstI(HMod* instr); | |
2729 LInstruction* DoModI(HMod* instr); | 2687 LInstruction* DoModI(HMod* instr); |
2730 LInstruction* DoFlooringDivByPowerOf2I(HMathFloorOfDiv* instr); | 2688 LInstruction* DoFlooringDivByPowerOf2I(HMathFloorOfDiv* instr); |
2731 LInstruction* DoFlooringDivByConstI(HMathFloorOfDiv* instr); | 2689 LInstruction* DoFlooringDivByConstI(HMathFloorOfDiv* instr); |
2732 | 2690 |
2733 private: | 2691 private: |
2734 enum Status { | 2692 enum Status { |
2735 UNUSED, | 2693 UNUSED, |
2736 BUILDING, | 2694 BUILDING, |
2737 DONE, | 2695 DONE, |
2738 ABORTED | 2696 ABORTED |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2844 | 2802 |
2845 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2803 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2846 }; | 2804 }; |
2847 | 2805 |
2848 #undef DECLARE_HYDROGEN_ACCESSOR | 2806 #undef DECLARE_HYDROGEN_ACCESSOR |
2849 #undef DECLARE_CONCRETE_INSTRUCTION | 2807 #undef DECLARE_CONCRETE_INSTRUCTION |
2850 | 2808 |
2851 } } // namespace v8::internal | 2809 } } // namespace v8::internal |
2852 | 2810 |
2853 #endif // V8_ARM_LITHIUM_ARM_H_ | 2811 #endif // V8_ARM_LITHIUM_ARM_H_ |
OLD | NEW |