diff options
author | Steve Kondik <shade@chemlab.org> | 2013-02-15 09:50:31 -0800 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2013-02-15 10:02:23 -0800 |
commit | 1e126c23e21da1dcbefc6f5c444b97ef622e67ad (patch) | |
tree | 875b2be9da6ca2fda617ff82daf8758dbfe2b4ae | |
parent | 8c35d7eaeb67ace9a96922f16ba9e491dcde6534 (diff) | |
download | bionic-1e126c23e21da1dcbefc6f5c444b97ef622e67ad.zip bionic-1e126c23e21da1dcbefc6f5c444b97ef622e67ad.tar.gz bionic-1e126c23e21da1dcbefc6f5c444b97ef622e67ad.tar.bz2 |
libm: Enable fast NEON pow() for supported targets
Change-Id: Iabda43e3c8462074a9a46c8f496eac903ea17084
-rw-r--r-- | libm/Android.mk | 18 | ||||
-rw-r--r-- | libm/src/e_pow.c | 4 |
2 files changed, 7 insertions, 15 deletions
diff --git a/libm/Android.mk b/libm/Android.mk index a28f1b8..a697d68 100644 --- a/libm/Android.mk +++ b/libm/Android.mk @@ -160,9 +160,13 @@ ifeq ($(TARGET_ARCH),arm) src/s_scalbnf.c \ src/e_sqrtf.c + ifeq ($(ARCH_ARM_HAVE_ARMV7A),true) + libm_common_src_files += \ + arm/e_pow.S + endif + ifeq ($(TARGET_USE_KRAIT_BIONIC_OPTIMIZATION),true) libm_common_src_files += \ - arm/e_pow.S \ arm/s_cos.S \ arm/s_sin.S libm_common_cflags += -DKRAIT_NEON_OPTIMIZATION -fno-if-conversion @@ -172,18 +176,6 @@ ifeq ($(TARGET_ARCH),arm) src/s_sin.c endif - ifeq ($(TARGET_USE_SPARROW_BIONIC_OPTIMIZATION),true) - libm_common_src_files += \ - arm/e_pow.S - libm_common_cflags += -DSPARROW_NEON_OPTIMIZATION - endif - - ifeq ($(TARGET_USE_SCORPION_BIONIC_OPTIMIZATION),true) - libm_common_src_files += \ - arm/e_pow.S - libm_common_cflags += -DSCORPION_NEON_OPTIMIZATION - endif - libm_common_includes = $(LOCAL_PATH)/arm endif diff --git a/libm/src/e_pow.c b/libm/src/e_pow.c index bd82f30..67171e6 100644 --- a/libm/src/e_pow.c +++ b/libm/src/e_pow.c @@ -61,7 +61,7 @@ static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_pow.c,v 1.11 2005/02/04 18:2 #include "math.h" #include "math_private.h" -#if defined(KRAIT_NEON_OPTIMIZATION) || defined(SPARROW_NEON_OPTIMIZATION) || defined(SCORPION_NEON_OPTIMIZATION) +#if defined(__ARM_NEON__) #if defined(KRAIT_NO_AAPCS_VFP_MODE) double pow_neon(double x, double y); #else @@ -229,7 +229,7 @@ __ieee754_pow(double x, double y) t1 = u+v; SET_LOW_WORD(t1,0); t2 = v-(t1-u); -#if defined(KRAIT_NEON_OPTIMIZATION) || defined(SPARROW_NEON_OPTIMIZATION) || defined(SCORPION_NEON_OPTIMIZATION) +#if defined(__ARM_NEON__) } else if (ix <= 0x40100000 && iy <= 0x40100000 && hy > 0 && hx > 0) { #if defined(KRAIT_NO_AAPCS_VFP_MODE) return pow_neon(x,y); |