diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-02-10 14:55:44 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-02-23 14:18:18 -0300 |
commit | 0f88a5c66e1cbb574bf37d953bf7155c0a1f5ae7 (patch) | |
tree | 201168eb1e5bd955582a6d3541e3f44c61afbb56 /sysdeps/i386/i586 | |
parent | dbf37d6d0eccc01e6f5574a01eae64bb54a491ba (diff) | |
download | glibc-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')
-rw-r--r-- | sysdeps/i386/i586/bzero.S | 4 | ||||
-rw-r--r-- | sysdeps/i386/i586/memset.S | 16 |
2 files changed, 3 insertions, 17 deletions
diff --git a/sysdeps/i386/i586/bzero.S b/sysdeps/i386/i586/bzero.S deleted file mode 100644 index 2a106719a4..0000000000 --- a/sysdeps/i386/i586/bzero.S +++ /dev/null @@ -1,4 +0,0 @@ -#define USE_AS_BZERO -#define memset __bzero -#include <sysdeps/i386/i586/memset.S> -weak_alias (__bzero, bzero) 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) |