diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2010-01-12 11:22:03 -0800 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2010-01-12 11:22:03 -0800 |
commit | 3af48cbdfaeb8bc389de1caeb33bc29811da80e8 (patch) | |
tree | 94a209777ab8c7e24cff9e50660a4075e6338594 /sysdeps/i386/i686/memmove.S | |
parent | 4bfc6ab9ae3b259caa8b12229f0c67b4b514e9cd (diff) | |
download | glibc-3af48cbdfaeb8bc389de1caeb33bc29811da80e8.tar.gz |
Optimize 32bit memset/memcpy with SSE2/SSSE3.
Diffstat (limited to 'sysdeps/i386/i686/memmove.S')
-rw-r--r-- | sysdeps/i386/i686/memmove.S | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/sysdeps/i386/i686/memmove.S b/sysdeps/i386/i686/memmove.S index b93b5c729f..981f14f4e0 100644 --- a/sysdeps/i386/i686/memmove.S +++ b/sysdeps/i386/i686/memmove.S @@ -26,18 +26,27 @@ #define PARMS LINKAGE+4 /* one spilled register */ #define RTN PARMS -#define DEST RTN+RTN_SIZE -#define SRC DEST+PTR_SIZE -#define LEN SRC+PTR_SIZE .text -#if defined PIC && !defined NOT_IN_libc -ENTRY (__memmove_chk) + +#ifdef USE_AS_BCOPY +# define SRC RTN+RTN_SIZE +# define DEST SRC+PTR_SIZE +# define LEN DEST+PTR_SIZE +#else +# define DEST RTN+RTN_SIZE +# define SRC DEST+PTR_SIZE +# define LEN SRC+PTR_SIZE + +# if defined PIC && !defined NOT_IN_libc +ENTRY_CHK (__memmove_chk) movl 12(%esp), %eax cmpl %eax, 16(%esp) jb HIDDEN_JUMPTARGET (__chk_fail) -END (__memmove_chk) +END_CHK (__memmove_chk) +# endif #endif + ENTRY (BP_SYM (memmove)) ENTER @@ -69,8 +78,10 @@ ENTRY (BP_SYM (memmove)) movsl movl %edx, %esi cfi_restore (esi) +#ifndef USE_AS_BCOPY movl DEST(%esp), %eax RETURN_BOUNDED_POINTER (DEST(%esp)) +#endif popl %edi cfi_adjust_cfa_offset (-4) @@ -101,8 +112,10 @@ ENTRY (BP_SYM (memmove)) movsl movl %edx, %esi cfi_restore (esi) +#ifndef USE_AS_BCOPY movl DEST(%esp), %eax RETURN_BOUNDED_POINTER (DEST(%esp)) +#endif cld popl %edi @@ -112,4 +125,6 @@ ENTRY (BP_SYM (memmove)) LEAVE RET_PTR END (BP_SYM (memmove)) +#ifndef USE_AS_BCOPY libc_hidden_builtin_def (memmove) +#endif |