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

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

Issue 11418149: Faster implementation of Math.exp() (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix Win build Created 8 years 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/ia32/lithium-codegen-ia32.cc ('k') | src/ia32/lithium-ia32.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(LoadExternalArrayPointer) \ 118 V(LoadExternalArrayPointer) \
119 V(LoadFunctionPrototype) \ 119 V(LoadFunctionPrototype) \
120 V(LoadGlobalCell) \ 120 V(LoadGlobalCell) \
121 V(LoadGlobalGeneric) \ 121 V(LoadGlobalGeneric) \
122 V(LoadKeyed) \ 122 V(LoadKeyed) \
123 V(LoadKeyedGeneric) \ 123 V(LoadKeyedGeneric) \
124 V(LoadNamedField) \ 124 V(LoadNamedField) \
125 V(LoadNamedFieldPolymorphic) \ 125 V(LoadNamedFieldPolymorphic) \
126 V(LoadNamedGeneric) \ 126 V(LoadNamedGeneric) \
127 V(MapEnumLength) \ 127 V(MapEnumLength) \
128 V(MathExp) \
128 V(MathFloorOfDiv) \ 129 V(MathFloorOfDiv) \
129 V(MathMinMax) \ 130 V(MathMinMax) \
130 V(MathPowHalf) \ 131 V(MathPowHalf) \
131 V(ModI) \ 132 V(ModI) \
132 V(MulI) \ 133 V(MulI) \
133 V(NumberTagD) \ 134 V(NumberTagD) \
134 V(NumberTagI) \ 135 V(NumberTagI) \
135 V(NumberTagU) \ 136 V(NumberTagU) \
136 V(NumberUntagD) \ 137 V(NumberUntagD) \
137 V(ObjectLiteral) \ 138 V(ObjectLiteral) \
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 LOperand* value() { return inputs_[0]; } 633 LOperand* value() { return inputs_[0]; }
633 634
634 DECLARE_CONCRETE_INSTRUCTION(UnaryMathOperation, "unary-math-operation") 635 DECLARE_CONCRETE_INSTRUCTION(UnaryMathOperation, "unary-math-operation")
635 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) 636 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation)
636 637
637 virtual void PrintDataTo(StringStream* stream); 638 virtual void PrintDataTo(StringStream* stream);
638 BuiltinFunctionId op() const { return hydrogen()->op(); } 639 BuiltinFunctionId op() const { return hydrogen()->op(); }
639 }; 640 };
640 641
641 642
643 class LMathExp: public LTemplateInstruction<1, 1, 2> {
644 public:
645 LMathExp(LOperand* value,
646 LOperand* temp1,
647 LOperand* temp2) {
648 inputs_[0] = value;
649 temps_[0] = temp1;
650 temps_[1] = temp2;
651 ExternalReference::InitializeMathExpData();
652 }
653
654 LOperand* value() { return inputs_[0]; }
655 LOperand* temp1() { return temps_[0]; }
656 LOperand* temp2() { return temps_[1]; }
657
658 DECLARE_CONCRETE_INSTRUCTION(MathExp, "math-exp")
659
660 virtual void PrintDataTo(StringStream* stream);
661 };
662
663
642 class LMathPowHalf: public LTemplateInstruction<1, 2, 1> { 664 class LMathPowHalf: public LTemplateInstruction<1, 2, 1> {
643 public: 665 public:
644 LMathPowHalf(LOperand* context, LOperand* value, LOperand* temp) { 666 LMathPowHalf(LOperand* context, LOperand* value, LOperand* temp) {
645 inputs_[1] = context; 667 inputs_[1] = context;
646 inputs_[0] = value; 668 inputs_[0] = value;
647 temps_[0] = temp; 669 temps_[0] = temp;
648 } 670 }
649 671
650 LOperand* context() { return inputs_[1]; } 672 LOperand* context() { return inputs_[1]; }
651 LOperand* value() { return inputs_[0]; } 673 LOperand* value() { return inputs_[0]; }
(...skipping 2004 matching lines...) Expand 10 before | Expand all | Expand 10 after
2656 2678
2657 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2679 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2658 }; 2680 };
2659 2681
2660 #undef DECLARE_HYDROGEN_ACCESSOR 2682 #undef DECLARE_HYDROGEN_ACCESSOR
2661 #undef DECLARE_CONCRETE_INSTRUCTION 2683 #undef DECLARE_CONCRETE_INSTRUCTION
2662 2684
2663 } } // namespace v8::internal 2685 } } // namespace v8::internal
2664 2686
2665 #endif // V8_IA32_LITHIUM_IA32_H_ 2687 #endif // V8_IA32_LITHIUM_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698