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

Side by Side Diff: src/assembler.cc

Issue 11748033: Only enable MinGW-w64 pow() workaround if needed (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after
1396 m *= m; 1396 m *= m;
1397 if ((n & 2) != 0) p *= m; 1397 if ((n & 2) != 0) p *= m;
1398 m *= m; 1398 m *= m;
1399 n >>= 2; 1399 n >>= 2;
1400 } 1400 }
1401 return p; 1401 return p;
1402 } 1402 }
1403 1403
1404 1404
1405 double power_double_double(double x, double y) { 1405 double power_double_double(double x, double y) {
1406 #ifdef __MINGW64_VERSION_MAJOR 1406 #if defined(__MINGW64_VERSION_MAJOR) && (!defined(__MINGW64_VERSION_RC) || __MIN GW64_VERSION_RC < 1)
1407 // MinGW64 has a custom implementation for pow. This handles certain 1407 // MinGW64 has a custom implementation for pow. This handles certain
1408 // special cases that are different. 1408 // special cases that are different.
1409 if ((x == 0.0 || isinf(x)) && isfinite(y)) { 1409 if ((x == 0.0 || isinf(x)) && isfinite(y)) {
1410 double f; 1410 double f;
1411 if (modf(y, &f) != 0.0) return ((x == 0.0) ^ (y > 0)) ? V8_INFINITY : 0; 1411 if (modf(y, &f) != 0.0) return ((x == 0.0) ^ (y > 0)) ? V8_INFINITY : 0;
1412 } 1412 }
1413 1413
1414 if (x == 2.0) { 1414 if (x == 2.0) {
1415 int y_int = static_cast<int>(y); 1415 int y_int = static_cast<int>(y);
1416 if (y == y_int) return ldexp(1.0, y_int); 1416 if (y == y_int) return ldexp(1.0, y_int);
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1557 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); 1557 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position);
1558 state_.written_position = state_.current_position; 1558 state_.written_position = state_.current_position;
1559 written = true; 1559 written = true;
1560 } 1560 }
1561 1561
1562 // Return whether something was written. 1562 // Return whether something was written.
1563 return written; 1563 return written;
1564 } 1564 }
1565 1565
1566 } } // namespace v8::internal 1566 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698