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

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

Issue 172533002: MIPS: Harmony: optimize Math.clz32. (Closed) Base URL: git@github.com:paul99/v8m-rb.git@master
Patch Set: Fixed nit. Created 6 years, 10 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
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/mips/lithium-mips.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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 V(LoadFunctionPrototype) \ 118 V(LoadFunctionPrototype) \
119 V(LoadGlobalCell) \ 119 V(LoadGlobalCell) \
120 V(LoadGlobalGeneric) \ 120 V(LoadGlobalGeneric) \
121 V(LoadKeyed) \ 121 V(LoadKeyed) \
122 V(LoadKeyedGeneric) \ 122 V(LoadKeyedGeneric) \
123 V(LoadNamedField) \ 123 V(LoadNamedField) \
124 V(LoadNamedGeneric) \ 124 V(LoadNamedGeneric) \
125 V(MapEnumLength) \ 125 V(MapEnumLength) \
126 V(MathAbs) \ 126 V(MathAbs) \
127 V(MathExp) \ 127 V(MathExp) \
128 V(MathClz32) \
128 V(MathFloor) \ 129 V(MathFloor) \
129 V(MathFloorOfDiv) \ 130 V(MathFloorOfDiv) \
130 V(MathLog) \ 131 V(MathLog) \
131 V(MathMinMax) \ 132 V(MathMinMax) \
132 V(MathPowHalf) \ 133 V(MathPowHalf) \
133 V(MathRound) \ 134 V(MathRound) \
134 V(MathSqrt) \ 135 V(MathSqrt) \
135 V(ModI) \ 136 V(ModI) \
136 V(MulI) \ 137 V(MulI) \
137 V(MultiplyAddD) \ 138 V(MultiplyAddD) \
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 explicit LMathLog(LOperand* value) { 796 explicit LMathLog(LOperand* value) {
796 inputs_[0] = value; 797 inputs_[0] = value;
797 } 798 }
798 799
799 LOperand* value() { return inputs_[0]; } 800 LOperand* value() { return inputs_[0]; }
800 801
801 DECLARE_CONCRETE_INSTRUCTION(MathLog, "math-log") 802 DECLARE_CONCRETE_INSTRUCTION(MathLog, "math-log")
802 }; 803 };
803 804
804 805
806 class LMathClz32 V8_FINAL : public LTemplateInstruction<1, 1, 0> {
807 public:
808 explicit LMathClz32(LOperand* value) {
809 inputs_[0] = value;
810 }
811
812 LOperand* value() { return inputs_[0]; }
813
814 DECLARE_CONCRETE_INSTRUCTION(MathClz32, "math-clz32")
815 };
816
817
805 class LMathExp V8_FINAL : public LTemplateInstruction<1, 1, 3> { 818 class LMathExp V8_FINAL : public LTemplateInstruction<1, 1, 3> {
806 public: 819 public:
807 LMathExp(LOperand* value, 820 LMathExp(LOperand* value,
808 LOperand* double_temp, 821 LOperand* double_temp,
809 LOperand* temp1, 822 LOperand* temp1,
810 LOperand* temp2) { 823 LOperand* temp2) {
811 inputs_[0] = value; 824 inputs_[0] = value;
812 temps_[0] = temp1; 825 temps_[0] = temp1;
813 temps_[1] = temp2; 826 temps_[1] = temp2;
814 temps_[2] = double_temp; 827 temps_[2] = double_temp;
(...skipping 1756 matching lines...) Expand 10 before | Expand all | Expand 10 after
2571 2584
2572 static bool HasMagicNumberForDivisor(int32_t divisor); 2585 static bool HasMagicNumberForDivisor(int32_t divisor);
2573 2586
2574 LInstruction* DoMathFloor(HUnaryMathOperation* instr); 2587 LInstruction* DoMathFloor(HUnaryMathOperation* instr);
2575 LInstruction* DoMathRound(HUnaryMathOperation* instr); 2588 LInstruction* DoMathRound(HUnaryMathOperation* instr);
2576 LInstruction* DoMathAbs(HUnaryMathOperation* instr); 2589 LInstruction* DoMathAbs(HUnaryMathOperation* instr);
2577 LInstruction* DoMathLog(HUnaryMathOperation* instr); 2590 LInstruction* DoMathLog(HUnaryMathOperation* instr);
2578 LInstruction* DoMathExp(HUnaryMathOperation* instr); 2591 LInstruction* DoMathExp(HUnaryMathOperation* instr);
2579 LInstruction* DoMathSqrt(HUnaryMathOperation* instr); 2592 LInstruction* DoMathSqrt(HUnaryMathOperation* instr);
2580 LInstruction* DoMathPowHalf(HUnaryMathOperation* instr); 2593 LInstruction* DoMathPowHalf(HUnaryMathOperation* instr);
2594 LInstruction* DoMathClz32(HUnaryMathOperation* instr);
2581 2595
2582 private: 2596 private:
2583 enum Status { 2597 enum Status {
2584 UNUSED, 2598 UNUSED,
2585 BUILDING, 2599 BUILDING,
2586 DONE, 2600 DONE,
2587 ABORTED 2601 ABORTED
2588 }; 2602 };
2589 2603
2590 LPlatformChunk* chunk() const { return chunk_; } 2604 LPlatformChunk* chunk() const { return chunk_; }
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
2694 2708
2695 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2709 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2696 }; 2710 };
2697 2711
2698 #undef DECLARE_HYDROGEN_ACCESSOR 2712 #undef DECLARE_HYDROGEN_ACCESSOR
2699 #undef DECLARE_CONCRETE_INSTRUCTION 2713 #undef DECLARE_CONCRETE_INSTRUCTION
2700 2714
2701 } } // namespace v8::internal 2715 } } // namespace v8::internal
2702 2716
2703 #endif // V8_MIPS_LITHIUM_MIPS_H_ 2717 #endif // V8_MIPS_LITHIUM_MIPS_H_
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/mips/lithium-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698