Chromium Code Reviews| 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 |