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

Side by Side Diff: src/ia32/full-codegen-ia32.cc

Issue 8749002: Implement Math.pow using FPU instructions and inline it in crankshaft (ia32). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Also do NaN/infinity check on base for TAGGED case. Created 9 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 2865 matching lines...) Expand 10 before | Expand all | Expand 10 after
2876 2876
2877 2877
2878 void FullCodeGenerator::EmitMathPow(CallRuntime* expr) { 2878 void FullCodeGenerator::EmitMathPow(CallRuntime* expr) {
2879 // Load the arguments on the stack and call the runtime function. 2879 // Load the arguments on the stack and call the runtime function.
2880 ZoneList<Expression*>* args = expr->arguments(); 2880 ZoneList<Expression*>* args = expr->arguments();
2881 ASSERT(args->length() == 2); 2881 ASSERT(args->length() == 2);
2882 VisitForStackValue(args->at(0)); 2882 VisitForStackValue(args->at(0));
2883 VisitForStackValue(args->at(1)); 2883 VisitForStackValue(args->at(1));
2884 2884
2885 if (CpuFeatures::IsSupported(SSE2)) { 2885 if (CpuFeatures::IsSupported(SSE2)) {
2886 MathPowStub stub; 2886 MathPowStub stub(MathPowStub::ON_STACK);
2887 __ CallStub(&stub); 2887 __ CallStub(&stub);
2888 } else { 2888 } else {
2889 __ CallRuntime(Runtime::kMath_pow, 2); 2889 __ CallRuntime(Runtime::kMath_pow, 2);
2890 } 2890 }
2891 context()->Plug(eax); 2891 context()->Plug(eax);
2892 } 2892 }
2893 2893
2894 2894
2895 void FullCodeGenerator::EmitSetValueOf(CallRuntime* expr) { 2895 void FullCodeGenerator::EmitSetValueOf(CallRuntime* expr) {
2896 ZoneList<Expression*>* args = expr->arguments(); 2896 ZoneList<Expression*>* args = expr->arguments();
(...skipping 1483 matching lines...) Expand 10 before | Expand all | Expand 10 after
4380 *context_length = 0; 4380 *context_length = 0;
4381 return previous_; 4381 return previous_;
4382 } 4382 }
4383 4383
4384 4384
4385 #undef __ 4385 #undef __
4386 4386
4387 } } // namespace v8::internal 4387 } } // namespace v8::internal
4388 4388
4389 #endif // V8_TARGET_ARCH_IA32 4389 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698