Index: runtime/vm/simulator_arm.cc |
=================================================================== |
--- runtime/vm/simulator_arm.cc (revision 37827) |
+++ runtime/vm/simulator_arm.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> |
@@ -2653,7 +2652,7 @@ |
// Format(instr, "vcmps'cond 'sd, #0.0"); |
sm_val = 0.0f; |
} |
- if (isnan(sd_val) || isnan(sm_val)) { |
+ if (std::isnan(sd_val) || std::isnan(sm_val)) { |
fp_c_flag_ = true; |
fp_v_flag_ = true; |
} else if (sd_val == sm_val) { |
@@ -2674,7 +2673,7 @@ |
// Format(instr, "vcmpd'cond 'dd, #0.0"); |
dm_val = 0.0; |
} |
- if (isnan(dd_val) || isnan(dm_val)) { |
+ if (std::isnan(dd_val) || std::isnan(dm_val)) { |
fp_c_flag_ = true; |
fp_v_flag_ = true; |
} else if (dd_val == dm_val) { |
@@ -2781,7 +2780,7 @@ |
id_val = INT_MIN; |
} else if (dm_val >= INT_MAX) { |
id_val = INT_MAX; |
- } else if (isnan(dm_val)) { |
+ } else if (std::isnan(dm_val)) { |
id_val = 0; |
} else { |
id_val = static_cast<int32_t>(dm_val); |
@@ -2844,9 +2843,9 @@ |
static float arm_reciprocal_sqrt_estimate(float a) { |
// From the ARM Architecture Reference Manual A2-87. |
- if (isinf(a) || (fabs(a) >= exp2f(126))) return 0.0; |
+ if (std::isinf(a) || (fabs(a) >= exp2f(126))) return 0.0; |
else if (a == 0.0) return INFINITY; |
- else if (isnan(a)) return a; |
+ else if (std::isnan(a)) return a; |
uint32_t a_bits = bit_cast<uint32_t, float>(a); |
uint64_t scaled; |
@@ -2895,9 +2894,9 @@ |
static float arm_recip_estimate(float a) { |
// From the ARM Architecture Reference Manual A2-85. |
- if (isinf(a) || (fabs(a) >= exp2f(126))) return 0.0; |
+ if (std::isinf(a) || (fabs(a) >= exp2f(126))) return 0.0; |
else if (a == 0.0) return INFINITY; |
- else if (isnan(a)) return a; |
+ else if (std::isnan(a)) return a; |
uint32_t a_bits = bit_cast<uint32_t, float>(a); |
// scaled = '0011 1111 1110' : a<22:0> : Zeros(29) |