Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(318)

Side by Side Diff: src/arm/lithium-arm.h

Issue 204583002: Implement flooring division by a constant via truncating division by a constant. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/a64/lithium-codegen-a64.cc ('k') | src/arm/lithium-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 740
741 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByPowerOf2I, 741 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByPowerOf2I,
742 "flooring-div-by-power-of-2-i") 742 "flooring-div-by-power-of-2-i")
743 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) 743 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv)
744 744
745 private: 745 private:
746 int32_t divisor_; 746 int32_t divisor_;
747 }; 747 };
748 748
749 749
750 class LFlooringDivByConstI V8_FINAL : public LTemplateInstruction<1, 1, 0> { 750 class LFlooringDivByConstI V8_FINAL : public LTemplateInstruction<1, 1, 2> {
751 public: 751 public:
752 LFlooringDivByConstI(LOperand* dividend, int32_t divisor) { 752 LFlooringDivByConstI(LOperand* dividend, int32_t divisor, LOperand* temp) {
753 inputs_[0] = dividend; 753 inputs_[0] = dividend;
754 divisor_ = divisor; 754 divisor_ = divisor;
755 temps_[0] = temp;
755 } 756 }
756 757
757 LOperand* dividend() { return inputs_[0]; } 758 LOperand* dividend() { return inputs_[0]; }
758 int32_t divisor() const { return divisor_; } 759 int32_t divisor() const { return divisor_; }
759 LOperand* temp1() { return temps_[0]; } 760 LOperand* temp() { return temps_[0]; }
760 761
761 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByConstI, "flooring-div-by-const-i") 762 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByConstI, "flooring-div-by-const-i")
762 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) 763 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv)
763 764
764 private: 765 private:
765 int32_t divisor_; 766 int32_t divisor_;
766 }; 767 };
767 768
768 769
769 class LMulI V8_FINAL : public LTemplateInstruction<1, 2, 0> { 770 class LMulI V8_FINAL : public LTemplateInstruction<1, 2, 0> {
(...skipping 2070 matching lines...) Expand 10 before | Expand all | Expand 10 after
2840 2841
2841 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2842 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2842 }; 2843 };
2843 2844
2844 #undef DECLARE_HYDROGEN_ACCESSOR 2845 #undef DECLARE_HYDROGEN_ACCESSOR
2845 #undef DECLARE_CONCRETE_INSTRUCTION 2846 #undef DECLARE_CONCRETE_INSTRUCTION
2846 2847
2847 } } // namespace v8::internal 2848 } } // namespace v8::internal
2848 2849
2849 #endif // V8_ARM_LITHIUM_ARM_H_ 2850 #endif // V8_ARM_LITHIUM_ARM_H_
OLDNEW
« no previous file with comments | « src/a64/lithium-codegen-a64.cc ('k') | src/arm/lithium-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698