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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 V(DivByPowerOf2I) \ | 92 V(DivByPowerOf2I) \ |
93 V(DivI) \ | 93 V(DivI) \ |
94 V(DoubleBits) \ | 94 V(DoubleBits) \ |
95 V(DoubleToI) \ | 95 V(DoubleToI) \ |
96 V(DoubleToSmi) \ | 96 V(DoubleToSmi) \ |
97 V(Drop) \ | 97 V(Drop) \ |
98 V(Dummy) \ | 98 V(Dummy) \ |
99 V(DummyUse) \ | 99 V(DummyUse) \ |
100 V(FlooringDivByConstI) \ | 100 V(FlooringDivByConstI) \ |
101 V(FlooringDivByPowerOf2I) \ | 101 V(FlooringDivByPowerOf2I) \ |
| 102 V(FlooringDivI) \ |
102 V(ForInCacheArray) \ | 103 V(ForInCacheArray) \ |
103 V(ForInPrepareMap) \ | 104 V(ForInPrepareMap) \ |
104 V(FunctionLiteral) \ | 105 V(FunctionLiteral) \ |
105 V(GetCachedArrayIndex) \ | 106 V(GetCachedArrayIndex) \ |
106 V(Goto) \ | 107 V(Goto) \ |
107 V(HasCachedArrayIndexAndBranch) \ | 108 V(HasCachedArrayIndexAndBranch) \ |
108 V(HasInstanceTypeAndBranch) \ | 109 V(HasInstanceTypeAndBranch) \ |
109 V(InnerAllocatedObject) \ | 110 V(InnerAllocatedObject) \ |
110 V(InstanceOf) \ | 111 V(InstanceOf) \ |
111 V(InstanceOfKnownGlobal) \ | 112 V(InstanceOfKnownGlobal) \ |
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
737 DECLARE_CONCRETE_INSTRUCTION(DivByConstI, "div-by-const-i") | 738 DECLARE_CONCRETE_INSTRUCTION(DivByConstI, "div-by-const-i") |
738 DECLARE_HYDROGEN_ACCESSOR(Div) | 739 DECLARE_HYDROGEN_ACCESSOR(Div) |
739 | 740 |
740 private: | 741 private: |
741 int32_t divisor_; | 742 int32_t divisor_; |
742 }; | 743 }; |
743 | 744 |
744 | 745 |
745 class LDivI V8_FINAL : public LTemplateInstruction<1, 2, 1> { | 746 class LDivI V8_FINAL : public LTemplateInstruction<1, 2, 1> { |
746 public: | 747 public: |
747 LDivI(LOperand* left, LOperand* right, LOperand* temp) { | 748 LDivI(LOperand* dividend, LOperand* divisor, LOperand* temp) { |
748 inputs_[0] = left; | 749 inputs_[0] = dividend; |
749 inputs_[1] = right; | 750 inputs_[1] = divisor; |
750 temps_[0] = temp; | 751 temps_[0] = temp; |
751 } | 752 } |
752 | 753 |
753 LOperand* left() { return inputs_[0]; } | 754 LOperand* dividend() { return inputs_[0]; } |
754 LOperand* right() { return inputs_[1]; } | 755 LOperand* divisor() { return inputs_[1]; } |
755 LOperand* temp() { return temps_[0]; } | 756 LOperand* temp() { return temps_[0]; } |
756 | 757 |
757 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i") | 758 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i") |
758 DECLARE_HYDROGEN_ACCESSOR(BinaryOperation) | 759 DECLARE_HYDROGEN_ACCESSOR(BinaryOperation) |
759 }; | 760 }; |
760 | 761 |
761 | 762 |
762 class LFlooringDivByPowerOf2I V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 763 class LFlooringDivByPowerOf2I V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
763 public: | 764 public: |
764 LFlooringDivByPowerOf2I(LOperand* dividend, int32_t divisor) { | 765 LFlooringDivByPowerOf2I(LOperand* dividend, int32_t divisor) { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
799 LOperand* temp3() { return temps_[2]; } | 800 LOperand* temp3() { return temps_[2]; } |
800 | 801 |
801 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByConstI, "flooring-div-by-const-i") | 802 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByConstI, "flooring-div-by-const-i") |
802 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) | 803 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) |
803 | 804 |
804 private: | 805 private: |
805 int32_t divisor_; | 806 int32_t divisor_; |
806 }; | 807 }; |
807 | 808 |
808 | 809 |
| 810 class LFlooringDivI V8_FINAL : public LTemplateInstruction<1, 2, 1> { |
| 811 public: |
| 812 LFlooringDivI(LOperand* dividend, LOperand* divisor, LOperand* temp) { |
| 813 inputs_[0] = dividend; |
| 814 inputs_[1] = divisor; |
| 815 temps_[0] = temp; |
| 816 } |
| 817 |
| 818 LOperand* dividend() { return inputs_[0]; } |
| 819 LOperand* divisor() { return inputs_[1]; } |
| 820 LOperand* temp() { return temps_[0]; } |
| 821 |
| 822 DECLARE_CONCRETE_INSTRUCTION(FlooringDivI, "flooring-div-i") |
| 823 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) |
| 824 }; |
| 825 |
| 826 |
809 class LMulI V8_FINAL : public LTemplateInstruction<1, 2, 1> { | 827 class LMulI V8_FINAL : public LTemplateInstruction<1, 2, 1> { |
810 public: | 828 public: |
811 LMulI(LOperand* left, LOperand* right, LOperand* temp) { | 829 LMulI(LOperand* left, LOperand* right, LOperand* temp) { |
812 inputs_[0] = left; | 830 inputs_[0] = left; |
813 inputs_[1] = right; | 831 inputs_[1] = right; |
814 temps_[0] = temp; | 832 temps_[0] = temp; |
815 } | 833 } |
816 | 834 |
817 LOperand* left() { return inputs_[0]; } | 835 LOperand* left() { return inputs_[0]; } |
818 LOperand* right() { return inputs_[1]; } | 836 LOperand* right() { return inputs_[1]; } |
(...skipping 1924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2743 LInstruction* DoMathFloor(HUnaryMathOperation* instr); | 2761 LInstruction* DoMathFloor(HUnaryMathOperation* instr); |
2744 LInstruction* DoMathRound(HUnaryMathOperation* instr); | 2762 LInstruction* DoMathRound(HUnaryMathOperation* instr); |
2745 LInstruction* DoMathAbs(HUnaryMathOperation* instr); | 2763 LInstruction* DoMathAbs(HUnaryMathOperation* instr); |
2746 LInstruction* DoMathLog(HUnaryMathOperation* instr); | 2764 LInstruction* DoMathLog(HUnaryMathOperation* instr); |
2747 LInstruction* DoMathExp(HUnaryMathOperation* instr); | 2765 LInstruction* DoMathExp(HUnaryMathOperation* instr); |
2748 LInstruction* DoMathSqrt(HUnaryMathOperation* instr); | 2766 LInstruction* DoMathSqrt(HUnaryMathOperation* instr); |
2749 LInstruction* DoMathPowHalf(HUnaryMathOperation* instr); | 2767 LInstruction* DoMathPowHalf(HUnaryMathOperation* instr); |
2750 LInstruction* DoMathClz32(HUnaryMathOperation* instr); | 2768 LInstruction* DoMathClz32(HUnaryMathOperation* instr); |
2751 LInstruction* DoDivByPowerOf2I(HDiv* instr); | 2769 LInstruction* DoDivByPowerOf2I(HDiv* instr); |
2752 LInstruction* DoDivByConstI(HDiv* instr); | 2770 LInstruction* DoDivByConstI(HDiv* instr); |
2753 LInstruction* DoDivI(HBinaryOperation* instr); | 2771 LInstruction* DoDivI(HDiv* instr); |
2754 LInstruction* DoModByPowerOf2I(HMod* instr); | 2772 LInstruction* DoModByPowerOf2I(HMod* instr); |
2755 LInstruction* DoModByConstI(HMod* instr); | 2773 LInstruction* DoModByConstI(HMod* instr); |
2756 LInstruction* DoModI(HMod* instr); | 2774 LInstruction* DoModI(HMod* instr); |
2757 LInstruction* DoFlooringDivByPowerOf2I(HMathFloorOfDiv* instr); | 2775 LInstruction* DoFlooringDivByPowerOf2I(HMathFloorOfDiv* instr); |
2758 LInstruction* DoFlooringDivByConstI(HMathFloorOfDiv* instr); | 2776 LInstruction* DoFlooringDivByConstI(HMathFloorOfDiv* instr); |
| 2777 LInstruction* DoFlooringDivI(HMathFloorOfDiv* instr); |
2759 | 2778 |
2760 private: | 2779 private: |
2761 enum Status { | 2780 enum Status { |
2762 UNUSED, | 2781 UNUSED, |
2763 BUILDING, | 2782 BUILDING, |
2764 DONE, | 2783 DONE, |
2765 ABORTED | 2784 ABORTED |
2766 }; | 2785 }; |
2767 | 2786 |
2768 LPlatformChunk* chunk() const { return chunk_; } | 2787 LPlatformChunk* chunk() const { return chunk_; } |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2883 | 2902 |
2884 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2903 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2885 }; | 2904 }; |
2886 | 2905 |
2887 #undef DECLARE_HYDROGEN_ACCESSOR | 2906 #undef DECLARE_HYDROGEN_ACCESSOR |
2888 #undef DECLARE_CONCRETE_INSTRUCTION | 2907 #undef DECLARE_CONCRETE_INSTRUCTION |
2889 | 2908 |
2890 } } // namespace v8::internal | 2909 } } // namespace v8::internal |
2891 | 2910 |
2892 #endif // V8_IA32_LITHIUM_IA32_H_ | 2911 #endif // V8_IA32_LITHIUM_IA32_H_ |
OLD | NEW |