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

Unified Diff: runtime/vm/simulator_arm64.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
« no previous file with comments | « runtime/vm/simulator_arm.cc ('k') | runtime/vm/simulator_mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/simulator_arm64.cc
===================================================================
--- runtime/vm/simulator_arm64.cc (revision 37827)
+++ runtime/vm/simulator_arm64.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>
@@ -2444,9 +2443,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;
koda 2014/06/30 20:50:40 It looks slightly odd to have only one of these in
siva 2014/06/30 20:59:34 I agree too, it does seem odd. I am wondering if
zra 2014/06/30 20:59:44 Yah, it does look strange, but hopefully it will m
zra 2014/06/30 22:14:33 Done.
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;
@@ -2495,9 +2494,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)
@@ -2820,7 +2819,7 @@
c_flag_ = false;
v_flag_ = false;
- if (isnan(vn_val) || isnan(vm_val)) {
+ if (std::isnan(vn_val) || std::isnan(vm_val)) {
c_flag_ = true;
v_flag_ = true;
} else if (vn_val == vm_val) {
« no previous file with comments | « runtime/vm/simulator_arm.cc ('k') | runtime/vm/simulator_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698