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 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
568 }; | 568 }; |
569 | 569 |
570 | 570 |
571 class LArgumentsElements: public LTemplateInstruction<1, 0, 0> { | 571 class LArgumentsElements: public LTemplateInstruction<1, 0, 0> { |
572 public: | 572 public: |
573 DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments-elements") | 573 DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments-elements") |
574 DECLARE_HYDROGEN_ACCESSOR(ArgumentsElements) | 574 DECLARE_HYDROGEN_ACCESSOR(ArgumentsElements) |
575 }; | 575 }; |
576 | 576 |
577 | 577 |
578 class LModI: public LTemplateInstruction<1, 2, 3> { | 578 class LModI: public LTemplateInstruction<1, 2, 2> { |
579 public: | 579 public: |
580 // Used when the right hand is a constant power of 2. | |
581 LModI(LOperand* left, | |
582 LOperand* right) { | |
583 inputs_[0] = left; | |
584 inputs_[1] = right; | |
585 temps_[0] = NULL; | |
586 temps_[1] = NULL; | |
587 temps_[2] = NULL; | |
588 } | |
589 | |
590 // Used for the standard case. | |
591 LModI(LOperand* left, | 580 LModI(LOperand* left, |
592 LOperand* right, | 581 LOperand* right, |
593 LOperand* temp, | 582 LOperand* temp = NULL, |
594 LOperand* temp2, | 583 LOperand* temp2 = NULL) { |
595 LOperand* temp3) { | |
596 inputs_[0] = left; | 584 inputs_[0] = left; |
597 inputs_[1] = right; | 585 inputs_[1] = right; |
598 temps_[0] = temp; | 586 temps_[0] = temp; |
599 temps_[1] = temp2; | 587 temps_[1] = temp2; |
600 temps_[2] = temp3; | |
601 } | 588 } |
602 | 589 |
603 LOperand* left() { return inputs_[0]; } | 590 LOperand* left() { return inputs_[0]; } |
604 LOperand* right() { return inputs_[1]; } | 591 LOperand* right() { return inputs_[1]; } |
605 LOperand* temp() { return temps_[0]; } | 592 LOperand* temp() { return temps_[0]; } |
606 LOperand* temp2() { return temps_[1]; } | 593 LOperand* temp2() { return temps_[1]; } |
607 LOperand* temp3() { return temps_[2]; } | |
608 | 594 |
609 DECLARE_CONCRETE_INSTRUCTION(ModI, "mod-i") | 595 DECLARE_CONCRETE_INSTRUCTION(ModI, "mod-i") |
610 DECLARE_HYDROGEN_ACCESSOR(Mod) | 596 DECLARE_HYDROGEN_ACCESSOR(Mod) |
611 }; | 597 }; |
612 | 598 |
613 | 599 |
614 class LDivI: public LTemplateInstruction<1, 2, 0> { | 600 class LDivI: public LTemplateInstruction<1, 2, 0> { |
615 public: | 601 public: |
616 LDivI(LOperand* left, LOperand* right) { | 602 LDivI(LOperand* left, LOperand* right) { |
617 inputs_[0] = left; | 603 inputs_[0] = left; |
(...skipping 2227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2845 | 2831 |
2846 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2832 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2847 }; | 2833 }; |
2848 | 2834 |
2849 #undef DECLARE_HYDROGEN_ACCESSOR | 2835 #undef DECLARE_HYDROGEN_ACCESSOR |
2850 #undef DECLARE_CONCRETE_INSTRUCTION | 2836 #undef DECLARE_CONCRETE_INSTRUCTION |
2851 | 2837 |
2852 } } // namespace v8::internal | 2838 } } // namespace v8::internal |
2853 | 2839 |
2854 #endif // V8_ARM_LITHIUM_ARM_H_ | 2840 #endif // V8_ARM_LITHIUM_ARM_H_ |
OLD | NEW |