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 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 | 752 |
753 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByPowerOf2I, | 753 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByPowerOf2I, |
754 "flooring-div-by-power-of-2-i") | 754 "flooring-div-by-power-of-2-i") |
755 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) | 755 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) |
756 | 756 |
757 private: | 757 private: |
758 int32_t divisor_; | 758 int32_t divisor_; |
759 }; | 759 }; |
760 | 760 |
761 | 761 |
762 class LFlooringDivByConstI V8_FINAL : public LTemplateInstruction<1, 1, 2> { | 762 class LFlooringDivByConstI V8_FINAL : public LTemplateInstruction<1, 1, 3> { |
763 public: | 763 public: |
764 LFlooringDivByConstI(LOperand* dividend, | 764 LFlooringDivByConstI(LOperand* dividend, |
765 int32_t divisor, | 765 int32_t divisor, |
766 LOperand* temp1, | 766 LOperand* temp1, |
767 LOperand* temp2) { | 767 LOperand* temp2, |
| 768 LOperand* temp3) { |
768 inputs_[0] = dividend; | 769 inputs_[0] = dividend; |
769 divisor_ = divisor; | 770 divisor_ = divisor; |
770 temps_[0] = temp1; | 771 temps_[0] = temp1; |
771 temps_[1] = temp2; | 772 temps_[1] = temp2; |
| 773 temps_[2] = temp3; |
772 } | 774 } |
773 | 775 |
774 LOperand* dividend() { return inputs_[0]; } | 776 LOperand* dividend() { return inputs_[0]; } |
775 int32_t divisor() const { return divisor_; } | 777 int32_t divisor() const { return divisor_; } |
776 LOperand* temp1() { return temps_[0]; } | 778 LOperand* temp1() { return temps_[0]; } |
777 LOperand* temp2() { return temps_[0]; } | 779 LOperand* temp2() { return temps_[1]; } |
| 780 LOperand* temp3() { return temps_[2]; } |
778 | 781 |
779 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByConstI, "flooring-div-by-const-i") | 782 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByConstI, "flooring-div-by-const-i") |
780 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) | 783 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) |
781 | 784 |
782 private: | 785 private: |
783 int32_t divisor_; | 786 int32_t divisor_; |
784 }; | 787 }; |
785 | 788 |
786 | 789 |
787 class LMulI V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 790 class LMulI V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
(...skipping 2001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2789 | 2792 |
2790 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2793 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2791 }; | 2794 }; |
2792 | 2795 |
2793 #undef DECLARE_HYDROGEN_ACCESSOR | 2796 #undef DECLARE_HYDROGEN_ACCESSOR |
2794 #undef DECLARE_CONCRETE_INSTRUCTION | 2797 #undef DECLARE_CONCRETE_INSTRUCTION |
2795 | 2798 |
2796 } } // namespace v8::int | 2799 } } // namespace v8::int |
2797 | 2800 |
2798 #endif // V8_X64_LITHIUM_X64_H_ | 2801 #endif // V8_X64_LITHIUM_X64_H_ |
OLD | NEW |