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

Unified Diff: src/runtime/runtime-simd.cc

Issue 2056693002: Replace std::trunc() with trunc() to support cross-compiling (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-simd.cc
diff --git a/src/runtime/runtime-simd.cc b/src/runtime/runtime-simd.cc
index 2de703968f42cde442122f41515cc712e4f58f51..70bc950150ae5b3c2719f480cfc438ab27350396 100644
--- a/src/runtime/runtime-simd.cc
+++ b/src/runtime/runtime-simd.cc
@@ -26,7 +26,7 @@ static bool CanCast(F from) {
// A float can't represent 2^31 - 1 or 2^32 - 1 exactly, so promote the limits
// to double. Otherwise, the limit is truncated and numbers like 2^31 or 2^32
// get through, causing any static_cast to be undefined.
- from = std::trunc(from);
+ from = trunc(from);
return from >= static_cast<double>(std::numeric_limits<T>::min()) &&
from <= static_cast<double>(std::numeric_limits<T>::max());
}
« 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