diff options
author | Prajakta Gudadhe <pgudadhe@nvidia.com> | 2012-05-07 14:17:44 -0700 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2012-05-09 13:34:31 -0700 |
commit | 08e72d0161e39e99ff1003bf1ce894f37d7b7eb4 (patch) | |
tree | 87b0528fa23fc00d475454b3585beb4f1f3e7f20 /libc | |
parent | 08b51e2c091d036c124259ae59eb7be6bbe346af (diff) | |
download | bionic-08e72d0161e39e99ff1003bf1ce894f37d7b7eb4.zip bionic-08e72d0161e39e99ff1003bf1ce894f37d7b7eb4.tar.gz bionic-08e72d0161e39e99ff1003bf1ce894f37d7b7eb4.tar.bz2 |
bionic: add support for non-NEON memcpy() on NEON SoCs
Some SoCs that support NEON nevertheless perform better with a non-NEON than a
NEON memcpy(). This patch adds build variable ARCH_ARM_USE_NON_NEON_MEMCPY,
which can be set in BoardConfig.mk. When ARCH_ARM_USE_NON_NEON_MEMCPY is
defined, we compile in the non-NEON optimized memcpy() even if the SoC supports
NEON.
Change-Id: Ia0e5bee6bad5880ffc5ff8f34a1382d567546cf9
Diffstat (limited to 'libc')
-rw-r--r-- | libc/Android.mk | 3 | ||||
-rw-r--r-- | libc/arch-arm/bionic/memcpy.S | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/libc/Android.mk b/libc/Android.mk index dab6523..a403146 100644 --- a/libc/Android.mk +++ b/libc/Android.mk @@ -478,6 +478,9 @@ ifeq ($(TARGET_ARCH),arm) ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true) libc_common_cflags += -DHAVE_ARM_TLS_REGISTER endif + ifeq ($(ARCH_ARM_USE_NON_NEON_MEMCPY),true) + libc_common_cflags += -DARCH_ARM_USE_NON_NEON_MEMCPY + endif else # !arm ifeq ($(TARGET_ARCH),x86) libc_crt_target_cflags := diff --git a/libc/arch-arm/bionic/memcpy.S b/libc/arch-arm/bionic/memcpy.S index 438fa00..8c0b4d7 100644 --- a/libc/arch-arm/bionic/memcpy.S +++ b/libc/arch-arm/bionic/memcpy.S @@ -29,7 +29,7 @@ #include <machine/cpu-features.h> #include <machine/asm.h> -#if defined(__ARM_NEON__) +#if defined(__ARM_NEON__) && !defined(ARCH_ARM_USE_NON_NEON_MEMCPY) .text .fpu neon |