diff options
author | David 'Digit' Turner <digit@google.com> | 2011-12-14 18:23:40 +0100 |
---|---|---|
committer | David 'Digit' Turner <digit@google.com> | 2011-12-14 18:23:40 +0100 |
commit | a5cb76bca00b1ce44a04687fb179809c12ea9cd3 (patch) | |
tree | 16c42ffde3fc4b588418501465d6d1c18702395c | |
parent | f6aa779383f5f5e61969a2b4fdb8bf435c5194b1 (diff) | |
download | android_bionic-a5cb76bca00b1ce44a04687fb179809c12ea9cd3.tar.gz android_bionic-a5cb76bca00b1ce44a04687fb179809c12ea9cd3.tar.bz2 android_bionic-a5cb76bca00b1ce44a04687fb179809c12ea9cd3.zip |
libc: x86: Use SSE2 or SSSE3 optimized routines when possible.
This patch uses the new hardware feature macros for x86 to define
various compile-time macros used to make the C library use
SSE2 and/or SSSE3 optimized memory functions for target CPUs
that support these features.
Note that previously, we relied on the macros being defined by
build/core/combo/TARGET_linux-x86.mk, but this is no longer the
case.
Change-Id: Ieae5ff5284c0c839bc920953fb6b91d2f2633afc
-rw-r--r-- | libc/Android.mk | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libc/Android.mk b/libc/Android.mk index caeab8c03..5d851df42 100644 --- a/libc/Android.mk +++ b/libc/Android.mk @@ -513,7 +513,12 @@ ifeq ($(TARGET_ARCH),arm) else # !arm ifeq ($(TARGET_ARCH),x86) libc_crt_target_cflags := - # TARGET_GLOBAL_CFLAGS from build/core/combo/TARGET_linux-x86.mk sets all required flags. + ifeq ($(ARCH_X86_HAVE_SSE2),true) + libc_crt_target_cflags += -DUSE_SSE2=1 + endif + ifeq ($(ARCH_X86_HAVE_SSSE3),true) + libc_crt_target_cflags += -DUSE_SSSE3=1 + endif endif # x86 endif # !arm |