about summary refs log tree commit diff
path: root/sysdeps/i386/i686/multiarch/memset-sse2-rep.S
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-02-10 14:55:44 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-02-23 14:18:18 -0300
commit0f88a5c66e1cbb574bf37d953bf7155c0a1f5ae7 (patch)
tree201168eb1e5bd955582a6d3541e3f44c61afbb56 /sysdeps/i386/i686/multiarch/memset-sse2-rep.S
parentdbf37d6d0eccc01e6f5574a01eae64bb54a491ba (diff)
downloadglibc-0f88a5c66e1cbb574bf37d953bf7155c0a1f5ae7.tar.gz
glibc-0f88a5c66e1cbb574bf37d953bf7155c0a1f5ae7.tar.xz
glibc-0f88a5c66e1cbb574bf37d953bf7155c0a1f5ae7.zip
i686: Remove bzero optimizations
The symbol is not present in current POSIX specification and compiler
already generates memset call.
Diffstat (limited to 'sysdeps/i386/i686/multiarch/memset-sse2-rep.S')
-rw-r--r--sysdeps/i386/i686/multiarch/memset-sse2-rep.S24
1 files changed, 5 insertions, 19 deletions
diff --git a/sysdeps/i386/i686/multiarch/memset-sse2-rep.S b/sysdeps/i386/i686/multiarch/memset-sse2-rep.S
index 37a10575e7..28df7836e0 100644
--- a/sysdeps/i386/i686/multiarch/memset-sse2-rep.S
+++ b/sysdeps/i386/i686/multiarch/memset-sse2-rep.S
@@ -32,16 +32,10 @@
 #define PUSH(REG)	pushl REG; CFI_PUSH (REG)
 #define POP(REG)	popl REG; CFI_POP (REG)
 
-#ifdef USE_AS_BZERO
-# define DEST		PARMS
-# define LEN		DEST+4
-# define SETRTNVAL
-#else
-# define DEST		PARMS
-# define CHR		DEST+4
-# define LEN		CHR+4
-# define SETRTNVAL	movl DEST(%esp), %eax
-#endif
+#define DEST		PARMS
+#define CHR		DEST+4
+#define LEN		CHR+4
+#define SETRTNVAL	movl DEST(%esp), %eax
 
 #ifdef PIC
 # define ENTRANCE	PUSH (%ebx);
@@ -78,7 +72,7 @@
 #endif
 
 	.section .text.sse2,"ax",@progbits
-#if defined SHARED && IS_IN (libc) && !defined USE_AS_BZERO
+#if defined SHARED && IS_IN (libc)
 ENTRY (__memset_chk_sse2_rep)
 	movl	12(%esp), %eax
 	cmpl	%eax, 16(%esp)
@@ -89,16 +83,12 @@ ENTRY (__memset_sse2_rep)
 	ENTRANCE
 
 	movl	LEN(%esp), %ecx
-#ifdef USE_AS_BZERO
-	xor	%eax, %eax
-#else
 	movzbl	CHR(%esp), %eax
 	movb	%al, %ah
 	/* Fill the whole EAX with pattern.  */
 	movl	%eax, %edx
 	shl	$16, %eax
 	or	%edx, %eax
-#endif
 	movl	DEST(%esp), %edx
 	cmp	$32, %ecx
 	jae	L(32bytesormore)
@@ -228,12 +218,8 @@ L(write_3bytes):
 /* ECX > 32 and EDX is 4 byte aligned.  */
 L(32bytesormore):
 	/* Fill xmm0 with the pattern.  */
-#ifdef USE_AS_BZERO
-	pxor	%xmm0, %xmm0
-#else
 	movd	%eax, %xmm0
 	pshufd	$0, %xmm0, %xmm0
-#endif
 	testl	$0xf, %edx
 	jz	L(aligned_16)
 /* ECX > 32 and EDX is not 16 byte aligned.  */