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

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

Issue 141653015: Simplify HUnaryMathOperation::Canonicalize. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Feedback Created 6 years, 11 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 | « no previous file | 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 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 LDivI(LOperand* left, LOperand* right, LOperand* temp) { 647 LDivI(LOperand* left, LOperand* right, LOperand* temp) {
648 inputs_[0] = left; 648 inputs_[0] = left;
649 inputs_[1] = right; 649 inputs_[1] = right;
650 temps_[0] = temp; 650 temps_[0] = temp;
651 } 651 }
652 652
653 LOperand* left() { return inputs_[0]; } 653 LOperand* left() { return inputs_[0]; }
654 LOperand* right() { return inputs_[1]; } 654 LOperand* right() { return inputs_[1]; }
655 LOperand* temp() { return temps_[0]; } 655 LOperand* temp() { return temps_[0]; }
656 656
657 bool is_flooring() { return hydrogen_value()->IsMathFloorOfDiv(); }
658
657 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i") 659 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i")
658 DECLARE_HYDROGEN_ACCESSOR(Div) 660 DECLARE_HYDROGEN_ACCESSOR(Div)
659 }; 661 };
660 662
661 663
662 class LMathFloorOfDiv V8_FINAL : public LTemplateInstruction<1, 2, 1> { 664 class LMathFloorOfDiv V8_FINAL : public LTemplateInstruction<1, 2, 1> {
663 public: 665 public:
664 LMathFloorOfDiv(LOperand* left, 666 LMathFloorOfDiv(LOperand* left,
665 LOperand* right, 667 LOperand* right,
666 LOperand* temp = NULL) { 668 LOperand* temp = NULL) {
(...skipping 2021 matching lines...) Expand 10 before | Expand all | Expand 10 after
2688 // Declare methods that deal with the individual node types. 2690 // Declare methods that deal with the individual node types.
2689 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); 2691 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node);
2690 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) 2692 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO)
2691 #undef DECLARE_DO 2693 #undef DECLARE_DO
2692 2694
2693 LInstruction* DoMultiplyAdd(HMul* mul, HValue* addend); 2695 LInstruction* DoMultiplyAdd(HMul* mul, HValue* addend);
2694 LInstruction* DoMultiplySub(HValue* minuend, HMul* mul); 2696 LInstruction* DoMultiplySub(HValue* minuend, HMul* mul);
2695 LInstruction* DoRSub(HSub* instr); 2697 LInstruction* DoRSub(HSub* instr);
2696 2698
2697 static bool HasMagicNumberForDivisor(int32_t divisor); 2699 static bool HasMagicNumberForDivisor(int32_t divisor);
2698 static HValue* SimplifiedDivisorForMathFloorOfDiv(HValue* val);
2699 2700
2700 LInstruction* DoMathFloor(HUnaryMathOperation* instr); 2701 LInstruction* DoMathFloor(HUnaryMathOperation* instr);
2701 LInstruction* DoMathRound(HUnaryMathOperation* instr); 2702 LInstruction* DoMathRound(HUnaryMathOperation* instr);
2702 LInstruction* DoMathAbs(HUnaryMathOperation* instr); 2703 LInstruction* DoMathAbs(HUnaryMathOperation* instr);
2703 LInstruction* DoMathLog(HUnaryMathOperation* instr); 2704 LInstruction* DoMathLog(HUnaryMathOperation* instr);
2704 LInstruction* DoMathExp(HUnaryMathOperation* instr); 2705 LInstruction* DoMathExp(HUnaryMathOperation* instr);
2705 LInstruction* DoMathSqrt(HUnaryMathOperation* instr); 2706 LInstruction* DoMathSqrt(HUnaryMathOperation* instr);
2706 LInstruction* DoMathPowHalf(HUnaryMathOperation* instr); 2707 LInstruction* DoMathPowHalf(HUnaryMathOperation* instr);
2707 2708
2708 private: 2709 private:
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
2820 2821
2821 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2822 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2822 }; 2823 };
2823 2824
2824 #undef DECLARE_HYDROGEN_ACCESSOR 2825 #undef DECLARE_HYDROGEN_ACCESSOR
2825 #undef DECLARE_CONCRETE_INSTRUCTION 2826 #undef DECLARE_CONCRETE_INSTRUCTION
2826 2827
2827 } } // namespace v8::internal 2828 } } // namespace v8::internal
2828 2829
2829 #endif // V8_ARM_LITHIUM_ARM_H_ 2830 #endif // V8_ARM_LITHIUM_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/lithium-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698