Skip to content

Commit

Permalink
Revert "Optimize 32bit memset/memcpy with SSE2/SSSE3."
Browse files Browse the repository at this point in the history
This reverts commit 3af48cb.
  • Loading branch information
Andreas Schwab committed Jan 20, 2010
1 parent f0dfc72 commit 7d16e87
Show file tree
Hide file tree
Showing 36 changed files with 15 additions and 6,339 deletions.
62 changes: 0 additions & 62 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -169,68 +169,6 @@

* posix/sched.h: Define time_t and pid_t for XPG7.

2010-01-12 H.J. Lu <hongjiu.lu@intel.com>

* sysdeps/i386/i686/bcopy.S: New file.

* sysdeps/i386/i686/cacheinfo.c (__x86_64_data_cache_size): Define.

* sysdeps/i386/i686/memcpy.S (__memcpy_chk): Use ENTRY_CHK
and END_CHK.
* sysdeps/i386/i686/memmove.S (__memmove_chk): Likewise.
* sysdeps/i386/i686/mempcpy.S (__mempcpy_chk): Likewise.
* sysdeps/i386/i686/memset.S (__memset_chk): Likewise.

* sysdeps/i386/i686/memmove.S: Support USE_AS_BCOPY.

* sysdeps/i386/i686/multiarch/Makefile (sysdep_routines): Add
bzero-sse2 memset-sse2 memcpy-ssse3 mempcpy-ssse3 memmove-ssse3
memcpy-ssse3-rep mempcpy-ssse3-rep memmove-ssse3-rep
bcopy-ssse3 bcopy-ssse3-rep memset-sse2-rep bzero-sse2-rep
* sysdeps/i386/i686/multiarch/bcopy-ssse3-rep.S: New file.
* sysdeps/i386/i686/multiarch/bcopy-ssse3.S: New file.
* sysdeps/i386/i686/multiarch/bcopy.S: New file.
* sysdeps/i386/i686/multiarch/bzero-sse2-rep.S: New file.
* sysdeps/i386/i686/multiarch/bzero-sse2.S: New file.
* sysdeps/i386/i686/multiarch/bzero.S: New file.
* sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S: New file.
* sysdeps/i386/i686/multiarch/memcpy-ssse3.S: New file.
* sysdeps/i386/i686/multiarch/memcpy.S: New file.
* sysdeps/i386/i686/multiarch/memcpy_chk.S: New file.
* sysdeps/i386/i686/multiarch/memmove-ssse3-rep.S: New file.
* sysdeps/i386/i686/multiarch/memmove-ssse3.S: New file.
* sysdeps/i386/i686/multiarch/memmove.S: New file.
* sysdeps/i386/i686/multiarch/memmove_chk.S: New file.
* sysdeps/i386/i686/multiarch/mempcpy-ssse3-rep.S: New file.
* sysdeps/i386/i686/multiarch/mempcpy-ssse3.S: New file.
* sysdeps/i386/i686/multiarch/mempcpy.S: New file.
* sysdeps/i386/i686/multiarch/mempcpy_chk.S: New file.
* sysdeps/i386/i686/multiarch/memset-sse2-rep.S: New file.
* sysdeps/i386/i686/multiarch/memset-sse2.S: New file.
* sysdeps/i386/i686/multiarch/memset.S: New file.
* sysdeps/i386/i686/multiarch/memset_chk.S: New file.

* sysdeps/i386/sysdep.h (ENTRY_CHK): New.
(END_CHK): Likewise.

* sysdeps/i386/i686/multiarch/ifunc-defines.sym: Add
FEATURE_OFFSET, FEATURE_SIZE and FEATURE_INDEX_1.
* sysdeps/x86_64/multiarch/ifunc-defines.sym: Likewise.

* sysdeps/x86_64/cacheinfo.c (intel_02_cache_info): Add entries
for 0x0e and 0x80.
(__x86_64_data_cache_size): New.
(init_cacheinfo): Set __x86_64_data_cache_size.

* sysdeps/x86_64/multiarch/init-arch.c (__init_cpu_features): Turn
on bit_Fast_Rep_String for Intel Core i7.

* sysdeps/x86_64/multiarch/init-arch.h (bit_Fast_Rep_String): New.
(index_Fast_Rep_String): Likewise.
(FEATURE_INDEX_1): Likewise.
(FEATURE_INDEX_MAX): Likewise.
(cpu_features): Add feature.

2010-01-12 Ulrich Drepper <drepper@redhat.com>

* conform/data/sys/select.h-data: Fix up for XPG7.
Expand Down
3 changes: 0 additions & 3 deletions sysdeps/i386/i686/bcopy.S

This file was deleted.

1 change: 0 additions & 1 deletion sysdeps/i386/i686/cacheinfo.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#define __x86_64_data_cache_size __x86_data_cache_size
#define __x86_64_data_cache_size_half __x86_data_cache_size_half
#define __x86_64_shared_cache_size __x86_shared_cache_size
#define __x86_64_shared_cache_size_half __x86_shared_cache_size_half
Expand Down
4 changes: 2 additions & 2 deletions sysdeps/i386/i686/memcpy.S
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@

.text
#if defined PIC && !defined NOT_IN_libc
ENTRY_CHK (__memcpy_chk)
ENTRY (__memcpy_chk)
movl 12(%esp), %eax
cmpl %eax, 16(%esp)
jb HIDDEN_JUMPTARGET (__chk_fail)
END_CHK (__memcpy_chk)
END (__memcpy_chk)
#endif
ENTRY (BP_SYM (memcpy))
ENTER
Expand Down
27 changes: 6 additions & 21 deletions sysdeps/i386/i686/memmove.S
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,18 @@

#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

#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)
#if defined PIC && !defined NOT_IN_libc
ENTRY (__memmove_chk)
movl 12(%esp), %eax
cmpl %eax, 16(%esp)
jb HIDDEN_JUMPTARGET (__chk_fail)
END_CHK (__memmove_chk)
# endif
END (__memmove_chk)
#endif

ENTRY (BP_SYM (memmove))
ENTER

Expand Down Expand Up @@ -78,10 +69,8 @@ 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)
Expand Down Expand Up @@ -112,10 +101,8 @@ 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
Expand All @@ -125,6 +112,4 @@ ENTRY (BP_SYM (memmove))
LEAVE
RET_PTR
END (BP_SYM (memmove))
#ifndef USE_AS_BCOPY
libc_hidden_builtin_def (memmove)
#endif
4 changes: 2 additions & 2 deletions sysdeps/i386/i686/mempcpy.S
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@

.text
#if defined PIC && !defined NOT_IN_libc
ENTRY_CHK (__mempcpy_chk)
ENTRY (__mempcpy_chk)
movl 12(%esp), %eax
cmpl %eax, 16(%esp)
jb HIDDEN_JUMPTARGET (__chk_fail)
END_CHK (__mempcpy_chk)
END (__mempcpy_chk)
#endif
ENTRY (BP_SYM (__mempcpy))
ENTER
Expand Down
4 changes: 2 additions & 2 deletions sysdeps/i386/i686/memset.S
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@

.text
#if defined PIC && !defined NOT_IN_libc && !BZERO_P
ENTRY_CHK (__memset_chk)
ENTRY (__memset_chk)
movl 12(%esp), %eax
cmpl %eax, 16(%esp)
jb HIDDEN_JUMPTARGET (__chk_fail)
END_CHK (__memset_chk)
END (__memset_chk)
#endif
ENTRY (BP_SYM (memset))
ENTER
Expand Down
4 changes: 0 additions & 4 deletions sysdeps/i386/i686/multiarch/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ gen-as-const-headers += ifunc-defines.sym
endif

ifeq ($(subdir),string)
sysdep_routines += bzero-sse2 memset-sse2 memcpy-ssse3 mempcpy-ssse3 \
memmove-ssse3 memcpy-ssse3-rep mempcpy-ssse3-rep \
memmove-ssse3-rep bcopy-ssse3 bcopy-ssse3-rep \
memset-sse2-rep bzero-sse2-rep
ifeq (yes,$(config-cflags-sse4))
sysdep_routines += strcspn-c strpbrk-c strspn-c strstr-c strcasestr-c
CFLAGS-strcspn-c.c += -msse4
Expand Down
4 changes: 0 additions & 4 deletions sysdeps/i386/i686/multiarch/bcopy-ssse3-rep.S

This file was deleted.

4 changes: 0 additions & 4 deletions sysdeps/i386/i686/multiarch/bcopy-ssse3.S

This file was deleted.

89 changes: 0 additions & 89 deletions sysdeps/i386/i686/multiarch/bcopy.S

This file was deleted.

3 changes: 0 additions & 3 deletions sysdeps/i386/i686/multiarch/bzero-sse2-rep.S

This file was deleted.

3 changes: 0 additions & 3 deletions sysdeps/i386/i686/multiarch/bzero-sse2.S

This file was deleted.

97 changes: 0 additions & 97 deletions sysdeps/i386/i686/multiarch/bzero.S

This file was deleted.

Loading

0 comments on commit 7d16e87

Please sign in to comment.