diff --git a/compiler-rt/lib/ppc/DD.h b/compiler-rt/lib/ppc/DD.h index 13862dc98404..fc3e41cbe07e 100644 --- a/compiler-rt/lib/ppc/DD.h +++ b/compiler-rt/lib/ppc/DD.h @@ -20,7 +20,7 @@ typedef union { (((((xHi)*(yHi) - (xy)) + (xHi)*(yLo)) + (xLo)*(yHi)) + (xLo)*(yLo)) static inline double __attribute__((always_inline)) -fabs(double x) +local_fabs(double x) { doublebits result = { .d = x }; result.x &= UINT64_C(0x7fffffffffffffff); diff --git a/compiler-rt/lib/ppc/gcc_qadd.c b/compiler-rt/lib/ppc/gcc_qadd.c index c388c7e99c6e..32e16e9d1d11 100644 --- a/compiler-rt/lib/ppc/gcc_qadd.c +++ b/compiler-rt/lib/ppc/gcc_qadd.c @@ -55,7 +55,7 @@ long double __gcc_qadd(long double x, long double y) h = A + (B - (A + B)); t = a + (b - (a + b)); - if (fabs(A) <= fabs(B)) + if (local_fabs(A) <= local_fabs(B)) w = (a + b) + h; else w = (a + b) + H; @@ -64,7 +64,7 @@ long double __gcc_qadd(long double x, long double y) Y = (A + B) - W; Y += w; - if (fabs(a) <= fabs(b)) + if (local_fabs(a) <= local_fabs(b)) w = t + Y; else w = T + Y; diff --git a/compiler-rt/lib/ppc/gcc_qsub.c b/compiler-rt/lib/ppc/gcc_qsub.c index 4f1f7ac70f3c..c092e24dbda1 100644 --- a/compiler-rt/lib/ppc/gcc_qsub.c +++ b/compiler-rt/lib/ppc/gcc_qsub.c @@ -55,7 +55,7 @@ long double __gcc_qsub(long double x, long double y) h = A + (B - (A + B)); t = a + (b - (a + b)); - if (fabs(A) <= fabs(B)) + if (local_fabs(A) <= local_fabs(B)) w = (a + b) + h; else w = (a + b) + H; @@ -64,7 +64,7 @@ long double __gcc_qsub(long double x, long double y) Y = (A + B) - W; Y += w; - if (fabs(a) <= fabs(b)) + if (local_fabs(a) <= local_fabs(b)) w = t + Y; else w = T + Y;