Use compiler builtins for fabs.

Change-Id: Id3bf761d6dfc187f218b5215c53d76bddc83d50b
This commit is contained in:
Elliott Hughes
2015-08-21 11:04:23 -07:00
parent 079fc83313
commit d76f16973a
7 changed files with 81 additions and 68 deletions

View File

@@ -20,6 +20,8 @@
#include <sys/cdefs.h>
#include <limits.h>
#define __BIONIC_MATH_INLINE extern __inline__ __always_inline __attribute__((gnu_inline)) __attribute__((__artificial__))
__BEGIN_DECLS
#pragma GCC visibility push(default)
@@ -161,6 +163,7 @@ double sqrt(double);
double ceil(double);
double fabs(double) __pure2;
__BIONIC_MATH_INLINE double fabs(double x) { return __builtin_fabs(x); }
double floor(double);
double fmod(double, double);
@@ -279,6 +282,7 @@ float sqrtf(float);
float ceilf(float);
float fabsf(float) __pure2;
__BIONIC_MATH_INLINE float fabsf(float x) { return __builtin_fabsf(x); }
float floorf(float);
float fmodf(float, float);
float roundf(float);
@@ -366,6 +370,7 @@ long double exp2l(long double);
long double expl(long double);
long double expm1l(long double);
long double fabsl(long double) __pure2;
__BIONIC_MATH_INLINE long double fabsl(long double x) { return __builtin_fabsl(x); }
long double fdiml(long double, long double);
long double floorl(long double);
long double fmal(long double, long double, long double);