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

Unified Diff: src/assembler.cc

Issue 866843003: Contribution of PowerPC port (continuation of 422063005) - AIX Common1 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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 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 21f1715859859fb5cd54107a26e06b218c43a3cd..dba577266948f1d78d043a4aee8355f09213a1f7 100644
--- a/src/assembler.cc
+++ b/src/assembler.cc
@@ -1458,6 +1458,22 @@ double power_double_double(double x, double y) {
return std::ldexp(1.0, y_int);
}
}
+#elif V8_OS_AIX
Sven Panne 2015/01/27 11:47:05 Can we merge this with the case above? If I see th
michael_dawson 2015/01/29 00:08:29 It looks like there are a few other differences in
Sven Panne 2015/01/29 09:54:33 We don't test MINGW builds, either, it was just pa
michael_dawson 2015/01/29 18:21:58 ok will do
+ // AIX has a custom implementation for pow. This handles certain
+ // special cases that are different.
+ if ((x == 0.0 || std::isinf(x)) && y != 0.0 && std::isfinite(y)) {
+ double f;
+ double result = ((x == 0.0) ^ (y > 0)) ? V8_INFINITY : 0;
+ /* retain sign if odd integer exponent */
+ return ((modf(y, &f) == 0.0) && (static_cast<int64_t>(y) & 1))
+ ? copysign(result, x)
+ : result;
+ }
+
+ if (x == 2.0) {
+ int y_int = static_cast<int>(y);
+ if (y == y_int) return ldexp(1.0, y_int);
+ }
#endif
// The checks for special cases can be dropped in ia32 because it has already

Powered by Google App Engine
This is Rietveld 408576698