OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_MIPS_LITHIUM_MIPS_H_ | 5 #ifndef V8_MIPS_LITHIUM_MIPS_H_ |
6 #define V8_MIPS_LITHIUM_MIPS_H_ | 6 #define V8_MIPS_LITHIUM_MIPS_H_ |
7 | 7 |
8 #include "src/hydrogen.h" | 8 #include "src/hydrogen.h" |
9 #include "src/lithium.h" | 9 #include "src/lithium.h" |
10 #include "src/lithium-allocator.h" | 10 #include "src/lithium-allocator.h" |
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 int32_t divisor() const { return divisor_; } | 682 int32_t divisor() const { return divisor_; } |
683 | 683 |
684 DECLARE_CONCRETE_INSTRUCTION(DivByConstI, "div-by-const-i") | 684 DECLARE_CONCRETE_INSTRUCTION(DivByConstI, "div-by-const-i") |
685 DECLARE_HYDROGEN_ACCESSOR(Div) | 685 DECLARE_HYDROGEN_ACCESSOR(Div) |
686 | 686 |
687 private: | 687 private: |
688 int32_t divisor_; | 688 int32_t divisor_; |
689 }; | 689 }; |
690 | 690 |
691 | 691 |
692 class LDivI V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 692 class LDivI V8_FINAL : public LTemplateInstruction<1, 2, 1> { |
693 public: | 693 public: |
694 LDivI(LOperand* dividend, LOperand* divisor) { | 694 LDivI(LOperand* dividend, LOperand* divisor, LOperand* temp) { |
695 inputs_[0] = dividend; | 695 inputs_[0] = dividend; |
696 inputs_[1] = divisor; | 696 inputs_[1] = divisor; |
| 697 temps_[0] = temp; |
697 } | 698 } |
698 | 699 |
699 LOperand* dividend() { return inputs_[0]; } | 700 LOperand* dividend() { return inputs_[0]; } |
700 LOperand* divisor() { return inputs_[1]; } | 701 LOperand* divisor() { return inputs_[1]; } |
| 702 LOperand* temp() { return temps_[0]; } |
701 | 703 |
702 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i") | 704 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i") |
703 DECLARE_HYDROGEN_ACCESSOR(BinaryOperation) | 705 DECLARE_HYDROGEN_ACCESSOR(BinaryOperation) |
704 }; | 706 }; |
705 | 707 |
706 | 708 |
707 class LFlooringDivByPowerOf2I V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 709 class LFlooringDivByPowerOf2I V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
708 public: | 710 public: |
709 LFlooringDivByPowerOf2I(LOperand* dividend, int32_t divisor) { | 711 LFlooringDivByPowerOf2I(LOperand* dividend, int32_t divisor) { |
710 inputs_[0] = dividend; | 712 inputs_[0] = dividend; |
(...skipping 2110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2821 | 2823 |
2822 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2824 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2823 }; | 2825 }; |
2824 | 2826 |
2825 #undef DECLARE_HYDROGEN_ACCESSOR | 2827 #undef DECLARE_HYDROGEN_ACCESSOR |
2826 #undef DECLARE_CONCRETE_INSTRUCTION | 2828 #undef DECLARE_CONCRETE_INSTRUCTION |
2827 | 2829 |
2828 } } // namespace v8::internal | 2830 } } // namespace v8::internal |
2829 | 2831 |
2830 #endif // V8_MIPS_LITHIUM_MIPS_H_ | 2832 #endif // V8_MIPS_LITHIUM_MIPS_H_ |
OLD | NEW |