about summary refs log tree commit diff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-01-30 11:07:13 -0800
committerH.J. Lu <hjl.tools@gmail.com>2015-01-30 11:07:13 -0800
commit1bc1103620e8f6c7e01cb54a8ed04ee1c3eb5a1a (patch)
treee15fa55f0c80666239a0c41477c66c98acdd7d0e
parentf63a6815da4c72626b14b456a6902cc8d3671729 (diff)
downloadglibc-hjl/memcpy/dpdk/master.tar.gz
glibc-hjl/memcpy/dpdk/master.tar.xz
glibc-hjl/memcpy/dpdk/master.zip
Add memcpy-rte-ssse3.c hjl/memcpy/dpdk/master
-rw-r--r--sysdeps/x86_64/multiarch/Makefile5
-rw-r--r--sysdeps/x86_64/multiarch/ifunc-impl-list.c2
-rw-r--r--sysdeps/x86_64/multiarch/memcpy-rte-ssse3.c4
3 files changed, 10 insertions, 1 deletions
diff --git a/sysdeps/x86_64/multiarch/Makefile b/sysdeps/x86_64/multiarch/Makefile
index 581beb9fae..1afc991195 100644
--- a/sysdeps/x86_64/multiarch/Makefile
+++ b/sysdeps/x86_64/multiarch/Makefile
@@ -18,7 +18,10 @@ sysdep_routines += strncat-c stpncpy-c strncpy-c strcmp-ssse3 \
 		   strcpy-sse2-unaligned strncpy-sse2-unaligned \
 		   stpcpy-sse2-unaligned stpncpy-sse2-unaligned \
 		   strcat-sse2-unaligned strncat-sse2-unaligned \
-		   strchr-sse2-no-bsf memcmp-ssse3 strstr-sse2-unaligned
+		   strchr-sse2-no-bsf memcmp-ssse3 strstr-sse2-unaligned \
+		   memcpy-rte-ssse3
+
+CFLAGS-memcpy-rte-ssse3.c += -mssse3
 
 ifeq (yes,$(config-cflags-sse4))
 sysdep_routines += strcspn-c strpbrk-c strspn-c varshift
diff --git a/sysdeps/x86_64/multiarch/ifunc-impl-list.c b/sysdeps/x86_64/multiarch/ifunc-impl-list.c
index 59e48dc915..623771884a 100644
--- a/sysdeps/x86_64/multiarch/ifunc-impl-list.c
+++ b/sysdeps/x86_64/multiarch/ifunc-impl-list.c
@@ -229,6 +229,8 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
 
   /* Support sysdeps/x86_64/multiarch/memcpy.S.  */
   IFUNC_IMPL (i, name, memcpy,
+	      IFUNC_IMPL_ADD (array, i, memcpy, HAS_SSSE3,
+			      __memcpy_rte_ssse3)
 	      IFUNC_IMPL_ADD (array, i, memcpy, HAS_AVX,
 			      __memcpy_rte_avx)
 	      IFUNC_IMPL_ADD (array, i, memcpy, HAS_AVX,
diff --git a/sysdeps/x86_64/multiarch/memcpy-rte-ssse3.c b/sysdeps/x86_64/multiarch/memcpy-rte-ssse3.c
new file mode 100644
index 0000000000..f893ea04e4
--- /dev/null
+++ b/sysdeps/x86_64/multiarch/memcpy-rte-ssse3.c
@@ -0,0 +1,4 @@
+#if IS_IN (libc) && defined SHARED
+#define rte_memcpy  __memcpy_rte_ssse3
+#include "rte_memcpy.h"
+#endif