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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(ConstructDouble) \ | 83 V(ConstructDouble) \ |
84 V(Context) \ | 84 V(Context) \ |
85 V(DateField) \ | 85 V(DateField) \ |
86 V(DebugBreak) \ | 86 V(DebugBreak) \ |
87 V(DeclareGlobals) \ | 87 V(DeclareGlobals) \ |
88 V(Deoptimize) \ | 88 V(Deoptimize) \ |
| 89 V(DivByConstI) \ |
89 V(DivByPowerOf2I) \ | 90 V(DivByPowerOf2I) \ |
90 V(DivI) \ | 91 V(DivI) \ |
91 V(DoubleBits) \ | 92 V(DoubleBits) \ |
92 V(DoubleToI) \ | 93 V(DoubleToI) \ |
93 V(DoubleToSmi) \ | 94 V(DoubleToSmi) \ |
94 V(Drop) \ | 95 V(Drop) \ |
95 V(DummyUse) \ | 96 V(DummyUse) \ |
96 V(Dummy) \ | 97 V(Dummy) \ |
97 V(FlooringDivByConstI) \ | 98 V(FlooringDivByConstI) \ |
98 V(FlooringDivByPowerOf2I) \ | 99 V(FlooringDivByPowerOf2I) \ |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 V(MapEnumLength) \ | 131 V(MapEnumLength) \ |
131 V(MathAbs) \ | 132 V(MathAbs) \ |
132 V(MathClz32) \ | 133 V(MathClz32) \ |
133 V(MathExp) \ | 134 V(MathExp) \ |
134 V(MathFloor) \ | 135 V(MathFloor) \ |
135 V(MathLog) \ | 136 V(MathLog) \ |
136 V(MathMinMax) \ | 137 V(MathMinMax) \ |
137 V(MathPowHalf) \ | 138 V(MathPowHalf) \ |
138 V(MathRound) \ | 139 V(MathRound) \ |
139 V(MathSqrt) \ | 140 V(MathSqrt) \ |
| 141 V(ModByConstI) \ |
140 V(ModByPowerOf2I) \ | 142 V(ModByPowerOf2I) \ |
141 V(ModI) \ | 143 V(ModI) \ |
142 V(MulI) \ | 144 V(MulI) \ |
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) \ |
148 V(Parameter) \ | 150 V(Parameter) \ |
149 V(Power) \ | 151 V(Power) \ |
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 int32_t divisor() const { return divisor_; } | 633 int32_t divisor() const { return divisor_; } |
632 | 634 |
633 DECLARE_CONCRETE_INSTRUCTION(ModByPowerOf2I, "mod-by-power-of-2-i") | 635 DECLARE_CONCRETE_INSTRUCTION(ModByPowerOf2I, "mod-by-power-of-2-i") |
634 DECLARE_HYDROGEN_ACCESSOR(Mod) | 636 DECLARE_HYDROGEN_ACCESSOR(Mod) |
635 | 637 |
636 private: | 638 private: |
637 int32_t divisor_; | 639 int32_t divisor_; |
638 }; | 640 }; |
639 | 641 |
640 | 642 |
| 643 class LModByConstI V8_FINAL : public LTemplateInstruction<1, 1, 2> { |
| 644 public: |
| 645 LModByConstI(LOperand* dividend, |
| 646 int32_t divisor, |
| 647 LOperand* temp1, |
| 648 LOperand* temp2) { |
| 649 inputs_[0] = dividend; |
| 650 divisor_ = divisor; |
| 651 temps_[0] = temp1; |
| 652 temps_[1] = temp2; |
| 653 } |
| 654 |
| 655 LOperand* dividend() { return inputs_[0]; } |
| 656 int32_t divisor() const { return divisor_; } |
| 657 LOperand* temp1() { return temps_[0]; } |
| 658 LOperand* temp2() { return temps_[1]; } |
| 659 |
| 660 DECLARE_CONCRETE_INSTRUCTION(ModByConstI, "mod-by-const-i") |
| 661 DECLARE_HYDROGEN_ACCESSOR(Mod) |
| 662 |
| 663 private: |
| 664 int32_t divisor_; |
| 665 }; |
| 666 |
| 667 |
641 class LModI V8_FINAL : public LTemplateInstruction<1, 2, 1> { | 668 class LModI V8_FINAL : public LTemplateInstruction<1, 2, 1> { |
642 public: | 669 public: |
643 LModI(LOperand* left, LOperand* right, LOperand* temp) { | 670 LModI(LOperand* left, LOperand* right, LOperand* temp) { |
644 inputs_[0] = left; | 671 inputs_[0] = left; |
645 inputs_[1] = right; | 672 inputs_[1] = right; |
646 temps_[0] = temp; | 673 temps_[0] = temp; |
647 } | 674 } |
648 | 675 |
649 LOperand* left() { return inputs_[0]; } | 676 LOperand* left() { return inputs_[0]; } |
650 LOperand* right() { return inputs_[1]; } | 677 LOperand* right() { return inputs_[1]; } |
(...skipping 15 matching lines...) Expand all Loading... |
666 int32_t divisor() const { return divisor_; } | 693 int32_t divisor() const { return divisor_; } |
667 | 694 |
668 DECLARE_CONCRETE_INSTRUCTION(DivByPowerOf2I, "div-by-power-of-2-i") | 695 DECLARE_CONCRETE_INSTRUCTION(DivByPowerOf2I, "div-by-power-of-2-i") |
669 DECLARE_HYDROGEN_ACCESSOR(Div) | 696 DECLARE_HYDROGEN_ACCESSOR(Div) |
670 | 697 |
671 private: | 698 private: |
672 int32_t divisor_; | 699 int32_t divisor_; |
673 }; | 700 }; |
674 | 701 |
675 | 702 |
| 703 class LDivByConstI V8_FINAL : public LTemplateInstruction<1, 1, 2> { |
| 704 public: |
| 705 LDivByConstI(LOperand* dividend, |
| 706 int32_t divisor, |
| 707 LOperand* temp1, |
| 708 LOperand* temp2) { |
| 709 inputs_[0] = dividend; |
| 710 divisor_ = divisor; |
| 711 temps_[0] = temp1; |
| 712 temps_[1] = temp2; |
| 713 } |
| 714 |
| 715 LOperand* dividend() { return inputs_[0]; } |
| 716 int32_t divisor() const { return divisor_; } |
| 717 LOperand* temp1() { return temps_[0]; } |
| 718 LOperand* temp2() { return temps_[1]; } |
| 719 |
| 720 DECLARE_CONCRETE_INSTRUCTION(DivByConstI, "div-by-const-i") |
| 721 DECLARE_HYDROGEN_ACCESSOR(Div) |
| 722 |
| 723 private: |
| 724 int32_t divisor_; |
| 725 }; |
| 726 |
| 727 |
676 class LDivI V8_FINAL : public LTemplateInstruction<1, 2, 1> { | 728 class LDivI V8_FINAL : public LTemplateInstruction<1, 2, 1> { |
677 public: | 729 public: |
678 LDivI(LOperand* left, LOperand* right, LOperand* temp) { | 730 LDivI(LOperand* left, LOperand* right, LOperand* temp) { |
679 inputs_[0] = left; | 731 inputs_[0] = left; |
680 inputs_[1] = right; | 732 inputs_[1] = right; |
681 temps_[0] = temp; | 733 temps_[0] = temp; |
682 } | 734 } |
683 | 735 |
684 LOperand* left() { return inputs_[0]; } | 736 LOperand* left() { return inputs_[0]; } |
685 LOperand* right() { return inputs_[1]; } | 737 LOperand* right() { return inputs_[1]; } |
(...skipping 18 matching lines...) Expand all Loading... |
704 | 756 |
705 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByPowerOf2I, | 757 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByPowerOf2I, |
706 "flooring-div-by-power-of-2-i") | 758 "flooring-div-by-power-of-2-i") |
707 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) | 759 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) |
708 | 760 |
709 private: | 761 private: |
710 int32_t divisor_; | 762 int32_t divisor_; |
711 }; | 763 }; |
712 | 764 |
713 | 765 |
714 class LFlooringDivByConstI V8_FINAL : public LTemplateInstruction<1, 1, 1> { | 766 class LFlooringDivByConstI V8_FINAL : public LTemplateInstruction<1, 1, 2> { |
715 public: | 767 public: |
716 LFlooringDivByConstI(LOperand* dividend, int32_t divisor, LOperand* temp) { | 768 LFlooringDivByConstI(LOperand* dividend, |
| 769 int32_t divisor, |
| 770 LOperand* temp1, |
| 771 LOperand* temp2) { |
717 inputs_[0] = dividend; | 772 inputs_[0] = dividend; |
718 divisor_ = divisor; | 773 divisor_ = divisor; |
719 temps_[0] = temp; | 774 temps_[0] = temp1; |
| 775 temps_[1] = temp2; |
720 } | 776 } |
721 | 777 |
722 LOperand* dividend() { return inputs_[0]; } | 778 LOperand* dividend() { return inputs_[0]; } |
723 int32_t divisor() const { return divisor_; } | 779 int32_t divisor() const { return divisor_; } |
724 LOperand* temp() { return temps_[0]; } | 780 LOperand* temp1() { return temps_[0]; } |
| 781 LOperand* temp2() { return temps_[0]; } |
725 | 782 |
726 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByConstI, "flooring-div-by-const-i") | 783 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByConstI, "flooring-div-by-const-i") |
727 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) | 784 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) |
728 | 785 |
729 private: | 786 private: |
730 int32_t divisor_; | 787 int32_t divisor_; |
731 }; | 788 }; |
732 | 789 |
733 | 790 |
734 class LMulI V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 791 class LMulI V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
(...skipping 1892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2627 | 2684 |
2628 LInstruction* DoMathFloor(HUnaryMathOperation* instr); | 2685 LInstruction* DoMathFloor(HUnaryMathOperation* instr); |
2629 LInstruction* DoMathRound(HUnaryMathOperation* instr); | 2686 LInstruction* DoMathRound(HUnaryMathOperation* instr); |
2630 LInstruction* DoMathAbs(HUnaryMathOperation* instr); | 2687 LInstruction* DoMathAbs(HUnaryMathOperation* instr); |
2631 LInstruction* DoMathLog(HUnaryMathOperation* instr); | 2688 LInstruction* DoMathLog(HUnaryMathOperation* instr); |
2632 LInstruction* DoMathExp(HUnaryMathOperation* instr); | 2689 LInstruction* DoMathExp(HUnaryMathOperation* instr); |
2633 LInstruction* DoMathSqrt(HUnaryMathOperation* instr); | 2690 LInstruction* DoMathSqrt(HUnaryMathOperation* instr); |
2634 LInstruction* DoMathPowHalf(HUnaryMathOperation* instr); | 2691 LInstruction* DoMathPowHalf(HUnaryMathOperation* instr); |
2635 LInstruction* DoMathClz32(HUnaryMathOperation* instr); | 2692 LInstruction* DoMathClz32(HUnaryMathOperation* instr); |
2636 LInstruction* DoDivByPowerOf2I(HDiv* instr); | 2693 LInstruction* DoDivByPowerOf2I(HDiv* instr); |
| 2694 LInstruction* DoDivByConstI(HDiv* instr); |
2637 LInstruction* DoDivI(HBinaryOperation* instr); | 2695 LInstruction* DoDivI(HBinaryOperation* instr); |
2638 LInstruction* DoModByPowerOf2I(HMod* instr); | 2696 LInstruction* DoModByPowerOf2I(HMod* instr); |
| 2697 LInstruction* DoModByConstI(HMod* instr); |
2639 LInstruction* DoModI(HMod* instr); | 2698 LInstruction* DoModI(HMod* instr); |
2640 LInstruction* DoFlooringDivByPowerOf2I(HMathFloorOfDiv* instr); | 2699 LInstruction* DoFlooringDivByPowerOf2I(HMathFloorOfDiv* instr); |
2641 LInstruction* DoFlooringDivByConstI(HMathFloorOfDiv* instr); | 2700 LInstruction* DoFlooringDivByConstI(HMathFloorOfDiv* instr); |
2642 | 2701 |
2643 private: | 2702 private: |
2644 enum Status { | 2703 enum Status { |
2645 UNUSED, | 2704 UNUSED, |
2646 BUILDING, | 2705 BUILDING, |
2647 DONE, | 2706 DONE, |
2648 ABORTED | 2707 ABORTED |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2761 | 2820 |
2762 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2821 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2763 }; | 2822 }; |
2764 | 2823 |
2765 #undef DECLARE_HYDROGEN_ACCESSOR | 2824 #undef DECLARE_HYDROGEN_ACCESSOR |
2766 #undef DECLARE_CONCRETE_INSTRUCTION | 2825 #undef DECLARE_CONCRETE_INSTRUCTION |
2767 | 2826 |
2768 } } // namespace v8::int | 2827 } } // namespace v8::int |
2769 | 2828 |
2770 #endif // V8_X64_LITHIUM_X64_H_ | 2829 #endif // V8_X64_LITHIUM_X64_H_ |
OLD | NEW |