diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2010-06-30 08:26:11 -0700 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2010-06-30 08:26:11 -0700 |
commit | 6fb8cbcb58a29fff73eb2101b34caa19a7f88eba (patch) | |
tree | 3a39ddec3a6cf66f8541c6591dbe4017136580f0 /sysdeps/x86_64/multiarch/memmove.c | |
parent | d85f8ff66711fd3b1c5753330499c7403fa46d81 (diff) | |
download | glibc-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.c')
-rw-r--r-- | sysdeps/x86_64/multiarch/memmove.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sysdeps/x86_64/multiarch/memmove.c b/sysdeps/x86_64/multiarch/memmove.c new file mode 100644 index 0000000000..bbe96273be --- /dev/null +++ b/sysdeps/x86_64/multiarch/memmove.c @@ -0,0 +1,24 @@ +#ifndef NOT_IN_libc +#include "init-arch.h" + +#define MEMMOVE __memmove_sse2 +#ifdef SHARED +# undef libc_hidden_builtin_def +# define libc_hidden_builtin_def(name) \ + __hidden_ver1 (__memmove_sse2, __GI_memmove, __memmove_sse2); +#endif +#endif + +#include "string/memmove.c" + +#ifndef NOT_IN_libc +extern __typeof (__memmove_sse2) __memmove_sse2 attribute_hidden; +extern __typeof (__memmove_sse2) __memmove_ssse3 attribute_hidden; +extern __typeof (__memmove_sse2) __memmove_ssse3_back attribute_hidden; + +libc_ifunc (memmove, + HAS_SSSE3 + ? (HAS_FAST_COPY_BACKWARD + ? __memmove_ssse3_back : __memmove_ssse3) + : __memmove_sse2); +#endif |