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

Unified Diff: runtime/vm/simulator_mips.cc

Issue 353403004: Fixes Android build by using C++ math header instead of C one. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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
Index: runtime/vm/simulator_mips.cc
===================================================================
--- runtime/vm/simulator_mips.cc (revision 37827)
+++ runtime/vm/simulator_mips.cc (working copy)
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-#include <math.h> // for isnan.
#include <setjmp.h>
#include <stdlib.h>
@@ -1593,7 +1592,7 @@
case COP1_C_UN: {
ASSERT(instr->FormatField() == FMT_D); // Only D supported.
ASSERT(instr->FdField() == F0);
- set_fcsr_bit(fcsr_cc, isnan(fs_val) || isnan(ft_val));
+ set_fcsr_bit(fcsr_cc, std::isnan(fs_val) || std::isnan(ft_val));
break;
}
case COP1_C_EQ: {
@@ -1606,7 +1605,7 @@
ASSERT(instr->FormatField() == FMT_D); // Only D supported.
ASSERT(instr->FdField() == F0);
set_fcsr_bit(fcsr_cc,
- (fs_val == ft_val) || isnan(fs_val) || isnan(ft_val));
+ (fs_val == ft_val) || std::isnan(fs_val) || std::isnan(ft_val));
break;
}
case COP1_C_OLT: {
@@ -1619,7 +1618,7 @@
ASSERT(instr->FormatField() == FMT_D); // Only D supported.
ASSERT(instr->FdField() == F0);
set_fcsr_bit(fcsr_cc,
- (fs_val < ft_val) || isnan(fs_val) || isnan(ft_val));
+ (fs_val < ft_val) || std::isnan(fs_val) || std::isnan(ft_val));
break;
}
case COP1_C_OLE: {
@@ -1632,7 +1631,7 @@
ASSERT(instr->FormatField() == FMT_D); // Only D supported.
ASSERT(instr->FdField() == F0);
set_fcsr_bit(fcsr_cc,
- (fs_val <= ft_val) || isnan(fs_val) || isnan(ft_val));
+ (fs_val <= ft_val) || std::isnan(fs_val) || std::isnan(ft_val));
break;
}
case COP1_CVT_D: {
@@ -1668,8 +1667,8 @@
case FMT_D: {
double fs_dbl = get_fregister_double(instr->FsField());
int32_t fs_int;
- if (isnan(fs_dbl) || isinf(fs_dbl) || (fs_dbl > INT_MAX) ||
- (fs_dbl < INT_MIN)) {
+ if (std::isnan(fs_dbl) || std::isinf(fs_dbl) ||
+ (fs_dbl > INT_MAX) || (fs_dbl < INT_MIN)) {
fs_int = INT_MIN;
} else {
fs_int = static_cast<int32_t>(fs_dbl);

Powered by Google App Engine
This is Rietveld 408576698