Atom optimized string and memory routines

Change-Id: I27b68bb28551c75c9ac84bb9730e2cd8254d8991
diff --git a/libc/Android.mk b/libc/Android.mk
index 9013e9a..f627640 100644
--- a/libc/Android.mk
+++ b/libc/Android.mk
@@ -171,7 +171,6 @@
 	stdlib/tolower_.c \
 	stdlib/toupper_.c \
 	stdlib/wchar.c \
-	string/bcopy.c \
 	string/index.c \
 	string/memccpy.c \
 	string/memchr.c \
@@ -182,7 +181,6 @@
 	string/strcasestr.c \
 	string/strcat.c \
 	string/strchr.c \
-	string/strcmp.c \
 	string/strcoll.c \
 	string/strcpy.c \
 	string/strcspn.c \
@@ -192,7 +190,6 @@
 	string/strlcat.c \
 	string/strlcpy.c \
 	string/strncat.c \
-	string/strncmp.c \
 	string/strncpy.c \
 	string/strndup.c \
 	string/strnlen.c \
@@ -299,6 +296,9 @@
 	arch-arm/bionic/strlen.c.arm \
 	arch-arm/bionic/syscall.S \
 	string/memmove.c.arm \
+	string/bcopy.c \
+	string/strcmp.c \
+	string/strncmp.c \
 	unistd/socketcalls.c
 
 # These files need to be arm so that gdbserver
@@ -330,12 +330,15 @@
 	arch-x86/bionic/_setjmp.S \
 	arch-x86/bionic/vfork.S \
 	arch-x86/bionic/syscall.S \
-	arch-x86/string/bzero.S \
-	arch-x86/string/memset.S \
-	arch-x86/string/memcmp.S \
-	arch-x86/string/memcpy.S \
+	arch-x86/string/bcopy_wrapper.S \
+	arch-x86/string/memcpy_wrapper.S \
+	arch-x86/string/memmove_wrapper.S \
+	arch-x86/string/bzero_wrapper.S \
+	arch-x86/string/memcmp_wrapper.S \
+	arch-x86/string/memset_wrapper.S \
+	arch-x86/string/strcmp_wrapper.S \
+	arch-x86/string/strncmp_wrapper.S \
 	arch-x86/string/strlen.S \
-	string/memmove.c \
 	bionic/pthread.c \
 	bionic/pthread-timers.c \
 	bionic/ptrace.c
@@ -367,6 +370,9 @@
 	arch-sh/bionic/__set_tls.c \
 	arch-sh/bionic/__get_tls.c \
 	arch-sh/bionic/ffs.S \
+	string/bcopy.c \
+	string/strcmp.c \
+	string/strncmp.c \
 	string/memcmp.c \
 	string/strlen.c \
 	bionic/eabi.c \
@@ -414,6 +420,10 @@
 else # !arm
   ifeq ($(TARGET_ARCH),x86)
     libc_crt_target_cflags := -m32
+
+    # Enable recent IA friendly memory routines (such as for Atom)
+    # These will not work on the earlier x86 machines
+    libc_common_cflags += -mtune=i686 -DUSE_SSSE3 -DUSE_SSE2
   endif # x86
 endif # !arm