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

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

Issue 172133003: Harmony: optimize Math.clz32. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix 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 | Annotate | Revision Log
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | src/x64/lithium-x64.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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 V(LoadFieldByIndex) \ 117 V(LoadFieldByIndex) \
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(MathClz32) \
127 V(MathExp) \ 128 V(MathExp) \
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) \
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 explicit LMathLog(LOperand* value) { 754 explicit LMathLog(LOperand* value) {
754 inputs_[0] = value; 755 inputs_[0] = value;
755 } 756 }
756 757
757 LOperand* value() { return inputs_[0]; } 758 LOperand* value() { return inputs_[0]; }
758 759
759 DECLARE_CONCRETE_INSTRUCTION(MathLog, "math-log") 760 DECLARE_CONCRETE_INSTRUCTION(MathLog, "math-log")
760 }; 761 };
761 762
762 763
764 class LMathClz32 V8_FINAL : public LTemplateInstruction<1, 1, 0> {
765 public:
766 explicit LMathClz32(LOperand* value) {
767 inputs_[0] = value;
768 }
769
770 LOperand* value() { return inputs_[0]; }
771
772 DECLARE_CONCRETE_INSTRUCTION(MathClz32, "math-clz32")
773 };
774
775
763 class LMathExp V8_FINAL : public LTemplateInstruction<1, 1, 2> { 776 class LMathExp V8_FINAL : public LTemplateInstruction<1, 1, 2> {
764 public: 777 public:
765 LMathExp(LOperand* value, LOperand* temp1, LOperand* temp2) { 778 LMathExp(LOperand* value, LOperand* temp1, LOperand* temp2) {
766 inputs_[0] = value; 779 inputs_[0] = value;
767 temps_[0] = temp1; 780 temps_[0] = temp1;
768 temps_[1] = temp2; 781 temps_[1] = temp2;
769 ExternalReference::InitializeMathExpData(); 782 ExternalReference::InitializeMathExpData();
770 } 783 }
771 784
772 LOperand* value() { return inputs_[0]; } 785 LOperand* value() { return inputs_[0]; }
(...skipping 1749 matching lines...) Expand 10 before | Expand all | Expand 10 after
2522 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) 2535 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO)
2523 #undef DECLARE_DO 2536 #undef DECLARE_DO
2524 2537
2525 LInstruction* DoMathFloor(HUnaryMathOperation* instr); 2538 LInstruction* DoMathFloor(HUnaryMathOperation* instr);
2526 LInstruction* DoMathRound(HUnaryMathOperation* instr); 2539 LInstruction* DoMathRound(HUnaryMathOperation* instr);
2527 LInstruction* DoMathAbs(HUnaryMathOperation* instr); 2540 LInstruction* DoMathAbs(HUnaryMathOperation* instr);
2528 LInstruction* DoMathLog(HUnaryMathOperation* instr); 2541 LInstruction* DoMathLog(HUnaryMathOperation* instr);
2529 LInstruction* DoMathExp(HUnaryMathOperation* instr); 2542 LInstruction* DoMathExp(HUnaryMathOperation* instr);
2530 LInstruction* DoMathSqrt(HUnaryMathOperation* instr); 2543 LInstruction* DoMathSqrt(HUnaryMathOperation* instr);
2531 LInstruction* DoMathPowHalf(HUnaryMathOperation* instr); 2544 LInstruction* DoMathPowHalf(HUnaryMathOperation* instr);
2545 LInstruction* DoMathClz32(HUnaryMathOperation* instr);
2532 2546
2533 private: 2547 private:
2534 enum Status { 2548 enum Status {
2535 UNUSED, 2549 UNUSED,
2536 BUILDING, 2550 BUILDING,
2537 DONE, 2551 DONE,
2538 ABORTED 2552 ABORTED
2539 }; 2553 };
2540 2554
2541 LPlatformChunk* chunk() const { return chunk_; } 2555 LPlatformChunk* chunk() const { return chunk_; }
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
2651 2665
2652 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2666 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2653 }; 2667 };
2654 2668
2655 #undef DECLARE_HYDROGEN_ACCESSOR 2669 #undef DECLARE_HYDROGEN_ACCESSOR
2656 #undef DECLARE_CONCRETE_INSTRUCTION 2670 #undef DECLARE_CONCRETE_INSTRUCTION
2657 2671
2658 } } // namespace v8::int 2672 } } // namespace v8::int
2659 2673
2660 #endif // V8_X64_LITHIUM_X64_H_ 2674 #endif // V8_X64_LITHIUM_X64_H_
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698