about summary refs log tree commit diff
path: root/sysdeps/x86_64/multiarch/memmove_chk.c
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2010-06-30 08:26:11 -0700
committerUlrich Drepper <drepper@redhat.com>2010-06-30 08:26:11 -0700
commit6fb8cbcb58a29fff73eb2101b34caa19a7f88eba (patch)
tree3a39ddec3a6cf66f8541c6591dbe4017136580f0 /sysdeps/x86_64/multiarch/memmove_chk.c
parentd85f8ff66711fd3b1c5753330499c7403fa46d81 (diff)
downloadglibc-6fb8cbcb58a29fff73eb2101b34caa19a7f88eba.tar.gz
glibc-6fb8cbcb58a29fff73eb2101b34caa19a7f88eba.tar.xz
glibc-6fb8cbcb58a29fff73eb2101b34caa19a7f88eba.zip
Improve 64bit memcpy/memmove for Atom, Core 2 and Core i7
This patch includes optimized 64bit memcpy/memmove for Atom, Core 2 and
Core i7.  It improves memcpy by up to 3X on Atom, up to 4X on Core 2 and
up to 1X on Core i7.  It also improves memmove by up to 3X on Atom, up to
4X on Core 2 and up to 2X on Core i7.
Diffstat (limited to 'sysdeps/x86_64/multiarch/memmove_chk.c')
-rw-r--r--sysdeps/x86_64/multiarch/memmove_chk.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sysdeps/x86_64/multiarch/memmove_chk.c b/sysdeps/x86_64/multiarch/memmove_chk.c
new file mode 100644
index 0000000000..a474f5f5ee
--- /dev/null
+++ b/sysdeps/x86_64/multiarch/memmove_chk.c
@@ -0,0 +1,15 @@
+#include "init-arch.h"
+
+#define MEMMOVE_CHK __memmove_chk_sse2
+
+#include "debug/memmove_chk.c"
+
+extern __typeof (__memmove_chk_sse2) __memmove_chk_sse2 attribute_hidden;
+extern __typeof (__memmove_chk_sse2) __memmove_chk_ssse3 attribute_hidden;
+extern __typeof (__memmove_chk_sse2) __memmove_chk_ssse3_back attribute_hidden;
+
+libc_ifunc (__memmove_chk,
+	    HAS_SSSE3
+	    ? (HAS_FAST_COPY_BACKWARD
+	       ? __memmove_chk_ssse3_back : __memmove_chk_ssse3)
+	    : __memmove_chk_sse2);