about summary refs log tree commit diff
path: root/sysdeps/i386/i586/memset.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/i586/memset.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/i586/memset.S')
-rw-r--r--sysdeps/i386/i586/memset.S16
1 files changed, 3 insertions, 13 deletions
diff --git a/sysdeps/i386/i586/memset.S b/sysdeps/i386/i586/memset.S
index ae09c3b40a..672af41398 100644
--- a/sysdeps/i386/i586/memset.S
+++ b/sysdeps/i386/i586/memset.S
@@ -23,15 +23,11 @@
 #define PARMS	4+4	/* space for 1 saved reg */
 #define RTN	PARMS
 #define DEST	RTN
-#ifdef USE_AS_BZERO
-# define LEN	DEST+4
-#else
-# define CHR	DEST+4
-# define LEN	CHR+4
-#endif
+#define CHR	DEST+4
+#define LEN	CHR+4
 
         .text
-#if defined SHARED && IS_IN (libc) && !defined USE_AS_BZERO
+#if defined SHARED && IS_IN (libc)
 ENTRY (__memset_chk)
 	movl	12(%esp), %eax
 	cmpl	%eax, 16(%esp)
@@ -46,15 +42,11 @@ ENTRY (memset)
 	movl	DEST(%esp), %edi
 	cfi_rel_offset (edi, 0)
 	movl	LEN(%esp), %edx
-#ifdef USE_AS_BZERO
-	xorl	%eax, %eax	/* we fill with 0 */
-#else
 	movb	CHR(%esp), %al
 	movb	%al, %ah
 	movl	%eax, %ecx
 	shll	$16, %eax
 	movw	%cx, %ax
-#endif
 	cld
 
 /* If less than 36 bytes to write, skip tricky code (it wouldn't work).  */
@@ -100,10 +92,8 @@ L(2):	shrl	$2, %ecx	/* convert byte count to longword count */
 	rep
 	stosb
 
-#ifndef USE_AS_BZERO
 	/* Load result (only if used as memset).  */
 	movl DEST(%esp), %eax	/* start address of destination is result */
-#endif
 	popl	%edi
 	cfi_adjust_cfa_offset (-4)
 	cfi_restore (edi)