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