OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // |
| 3 // Copyright IBM Corp. 2012, 2013. All rights reserved. |
| 4 // |
2 // Use of this source code is governed by a BSD-style license that can be | 5 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 6 // found in the LICENSE file. |
4 | 7 |
5 #ifndef V8_ARM_LITHIUM_ARM_H_ | 8 #ifndef V8_PPC_LITHIUM_PPC_H_ |
6 #define V8_ARM_LITHIUM_ARM_H_ | 9 #define V8_PPC_LITHIUM_PPC_H_ |
7 | 10 |
8 #include "src/hydrogen.h" | 11 #include "src/hydrogen.h" |
9 #include "src/lithium.h" | 12 #include "src/lithium.h" |
10 #include "src/lithium-allocator.h" | 13 #include "src/lithium-allocator.h" |
11 #include "src/safepoint-table.h" | 14 #include "src/safepoint-table.h" |
12 #include "src/utils.h" | 15 #include "src/utils.h" |
13 | 16 |
14 namespace v8 { | 17 namespace v8 { |
15 namespace internal { | 18 namespace internal { |
16 | 19 |
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 int32_t divisor() const { return divisor_; } | 635 int32_t divisor() const { return divisor_; } |
633 | 636 |
634 DECLARE_CONCRETE_INSTRUCTION(ModByConstI, "mod-by-const-i") | 637 DECLARE_CONCRETE_INSTRUCTION(ModByConstI, "mod-by-const-i") |
635 DECLARE_HYDROGEN_ACCESSOR(Mod) | 638 DECLARE_HYDROGEN_ACCESSOR(Mod) |
636 | 639 |
637 private: | 640 private: |
638 int32_t divisor_; | 641 int32_t divisor_; |
639 }; | 642 }; |
640 | 643 |
641 | 644 |
642 class LModI V8_FINAL : public LTemplateInstruction<1, 2, 2> { | 645 class LModI V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
643 public: | 646 public: |
644 LModI(LOperand* left, LOperand* right, LOperand* temp, LOperand* temp2) { | 647 LModI(LOperand* left, LOperand* right) { |
645 inputs_[0] = left; | 648 inputs_[0] = left; |
646 inputs_[1] = right; | 649 inputs_[1] = right; |
647 temps_[0] = temp; | |
648 temps_[1] = temp2; | |
649 } | 650 } |
650 | 651 |
651 LOperand* left() { return inputs_[0]; } | 652 LOperand* left() { return inputs_[0]; } |
652 LOperand* right() { return inputs_[1]; } | 653 LOperand* right() { return inputs_[1]; } |
653 LOperand* temp() { return temps_[0]; } | |
654 LOperand* temp2() { return temps_[1]; } | |
655 | 654 |
656 DECLARE_CONCRETE_INSTRUCTION(ModI, "mod-i") | 655 DECLARE_CONCRETE_INSTRUCTION(ModI, "mod-i") |
657 DECLARE_HYDROGEN_ACCESSOR(Mod) | 656 DECLARE_HYDROGEN_ACCESSOR(Mod) |
658 }; | 657 }; |
659 | 658 |
660 | 659 |
661 class LDivByPowerOf2I V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 660 class LDivByPowerOf2I V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
662 public: | 661 public: |
663 LDivByPowerOf2I(LOperand* dividend, int32_t divisor) { | 662 LDivByPowerOf2I(LOperand* dividend, int32_t divisor) { |
664 inputs_[0] = dividend; | 663 inputs_[0] = dividend; |
(...skipping 22 matching lines...) Expand all Loading... |
687 int32_t divisor() const { return divisor_; } | 686 int32_t divisor() const { return divisor_; } |
688 | 687 |
689 DECLARE_CONCRETE_INSTRUCTION(DivByConstI, "div-by-const-i") | 688 DECLARE_CONCRETE_INSTRUCTION(DivByConstI, "div-by-const-i") |
690 DECLARE_HYDROGEN_ACCESSOR(Div) | 689 DECLARE_HYDROGEN_ACCESSOR(Div) |
691 | 690 |
692 private: | 691 private: |
693 int32_t divisor_; | 692 int32_t divisor_; |
694 }; | 693 }; |
695 | 694 |
696 | 695 |
697 class LDivI V8_FINAL : public LTemplateInstruction<1, 2, 1> { | 696 class LDivI V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
698 public: | 697 public: |
699 LDivI(LOperand* dividend, LOperand* divisor, LOperand* temp) { | 698 LDivI(LOperand* dividend, LOperand* divisor) { |
700 inputs_[0] = dividend; | 699 inputs_[0] = dividend; |
701 inputs_[1] = divisor; | 700 inputs_[1] = divisor; |
702 temps_[0] = temp; | |
703 } | 701 } |
704 | 702 |
705 LOperand* dividend() { return inputs_[0]; } | 703 LOperand* dividend() { return inputs_[0]; } |
706 LOperand* divisor() { return inputs_[1]; } | 704 LOperand* divisor() { return inputs_[1]; } |
707 LOperand* temp() { return temps_[0]; } | |
708 | 705 |
709 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i") | 706 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i") |
710 DECLARE_HYDROGEN_ACCESSOR(BinaryOperation) | 707 DECLARE_HYDROGEN_ACCESSOR(BinaryOperation) |
711 }; | 708 }; |
712 | 709 |
713 | 710 |
714 class LFlooringDivByPowerOf2I V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 711 class LFlooringDivByPowerOf2I V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
715 public: | 712 public: |
716 LFlooringDivByPowerOf2I(LOperand* dividend, int32_t divisor) { | 713 LFlooringDivByPowerOf2I(LOperand* dividend, int32_t divisor) { |
717 inputs_[0] = dividend; | 714 inputs_[0] = dividend; |
718 divisor_ = divisor; | 715 divisor_ = divisor; |
719 } | 716 } |
720 | 717 |
721 LOperand* dividend() { return inputs_[0]; } | 718 LOperand* dividend() { return inputs_[0]; } |
722 int32_t divisor() { return divisor_; } | 719 int32_t divisor() { return divisor_; } |
723 | 720 |
724 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByPowerOf2I, | 721 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByPowerOf2I, |
725 "flooring-div-by-power-of-2-i") | 722 "flooring-div-by-power-of-2-i") |
726 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) | 723 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) |
727 | 724 |
728 private: | 725 private: |
729 int32_t divisor_; | 726 int32_t divisor_; |
730 }; | 727 }; |
731 | 728 |
732 | 729 |
733 class LFlooringDivByConstI V8_FINAL : public LTemplateInstruction<1, 1, 2> { | 730 class LFlooringDivByConstI V8_FINAL : public LTemplateInstruction<1, 1, 1> { |
734 public: | 731 public: |
735 LFlooringDivByConstI(LOperand* dividend, int32_t divisor, LOperand* temp) { | 732 LFlooringDivByConstI(LOperand* dividend, int32_t divisor, LOperand* temp) { |
736 inputs_[0] = dividend; | 733 inputs_[0] = dividend; |
737 divisor_ = divisor; | 734 divisor_ = divisor; |
738 temps_[0] = temp; | 735 temps_[0] = temp; |
739 } | 736 } |
740 | 737 |
741 LOperand* dividend() { return inputs_[0]; } | 738 LOperand* dividend() { return inputs_[0]; } |
742 int32_t divisor() const { return divisor_; } | 739 int32_t divisor() const { return divisor_; } |
743 LOperand* temp() { return temps_[0]; } | 740 LOperand* temp() { return temps_[0]; } |
744 | 741 |
745 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByConstI, "flooring-div-by-const-i") | 742 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByConstI, "flooring-div-by-const-i") |
746 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) | 743 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) |
747 | 744 |
748 private: | 745 private: |
749 int32_t divisor_; | 746 int32_t divisor_; |
750 }; | 747 }; |
751 | 748 |
752 | 749 |
753 class LFlooringDivI V8_FINAL : public LTemplateInstruction<1, 2, 1> { | 750 class LFlooringDivI V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
754 public: | 751 public: |
755 LFlooringDivI(LOperand* dividend, LOperand* divisor, LOperand* temp) { | 752 LFlooringDivI(LOperand* dividend, LOperand* divisor) { |
756 inputs_[0] = dividend; | 753 inputs_[0] = dividend; |
757 inputs_[1] = divisor; | 754 inputs_[1] = divisor; |
758 temps_[0] = temp; | |
759 } | 755 } |
760 | 756 |
761 LOperand* dividend() { return inputs_[0]; } | 757 LOperand* dividend() { return inputs_[0]; } |
762 LOperand* divisor() { return inputs_[1]; } | 758 LOperand* divisor() { return inputs_[1]; } |
763 LOperand* temp() { return temps_[0]; } | |
764 | 759 |
765 DECLARE_CONCRETE_INSTRUCTION(FlooringDivI, "flooring-div-i") | 760 DECLARE_CONCRETE_INSTRUCTION(FlooringDivI, "flooring-div-i") |
766 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) | 761 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) |
767 }; | 762 }; |
768 | 763 |
769 | 764 |
770 class LMulI V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 765 class LMulI V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
771 public: | 766 public: |
772 LMulI(LOperand* left, LOperand* right) { | 767 LMulI(LOperand* left, LOperand* right) { |
773 inputs_[0] = left; | 768 inputs_[0] = left; |
(...skipping 2106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2880 LAllocator* allocator_; | 2875 LAllocator* allocator_; |
2881 | 2876 |
2882 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2877 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2883 }; | 2878 }; |
2884 | 2879 |
2885 #undef DECLARE_HYDROGEN_ACCESSOR | 2880 #undef DECLARE_HYDROGEN_ACCESSOR |
2886 #undef DECLARE_CONCRETE_INSTRUCTION | 2881 #undef DECLARE_CONCRETE_INSTRUCTION |
2887 | 2882 |
2888 } } // namespace v8::internal | 2883 } } // namespace v8::internal |
2889 | 2884 |
2890 #endif // V8_ARM_LITHIUM_ARM_H_ | 2885 #endif // V8_PPC_LITHIUM_PPC_H_ |
OLD | NEW |