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

Unified Diff: src/assembler.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, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: src/assembler.cc
diff --git a/src/assembler.cc b/src/assembler.cc
index bc05c01800dc51889ee58e31264d533045be84ff..e1cf13ff71a6a53604c0137d50784859f12e1c30 100644
--- a/src/assembler.cc
+++ b/src/assembler.cc
@@ -1113,6 +1113,9 @@ double power_double_int(double x, int y) {
double power_double_double(double x, double y) {
+ // The checks for special cases can be dropped in ia32 because it has already
+ // been done in generated code before bailing out here.
+#if !defined(V8_TARGET_ARCH_IA32)
int y_int = static_cast<int>(y);
if (y == y_int) {
return power_double_int(x, y_int); // Returns 1.0 for exponent 0.
@@ -1121,6 +1124,7 @@ double power_double_double(double x, double y) {
if (y == 0.5) return sqrt(x + 0.0); // -0 must be converted to +0.
if (y == -0.5) return 1.0 / sqrt(x + 0.0);
}
+#endif
if (isnan(y) || ((x == 1 || x == -1) && isinf(y))) {
return OS::nan_value();
}
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/code-stubs.h » ('j') | src/ia32/code-stubs-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698