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/i686/memset.S | |
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/i686/memset.S')
-rw-r--r-- | sysdeps/i386/i686/memset.S | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/sysdeps/i386/i686/memset.S b/sysdeps/i386/i686/memset.S index fd5b26aeae..3cb86c016d 100644 --- a/sysdeps/i386/i686/memset.S +++ b/sysdeps/i386/i686/memset.S @@ -21,18 +21,13 @@ #include "asm-syntax.h" #define PARMS 4+4 /* space for 1 saved reg */ -#ifdef USE_AS_BZERO -# define DEST PARMS -# define LEN DEST+4 -#else -# define RTN PARMS -# define DEST RTN -# define CHR DEST+4 -# define LEN CHR+4 -#endif +#define RTN PARMS +#define DEST RTN +#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_CHK (__memset_chk) movl 12(%esp), %eax cmpl %eax, 16(%esp) @@ -46,11 +41,7 @@ ENTRY (memset) cfi_adjust_cfa_offset (4) movl DEST(%esp), %edx movl LEN(%esp), %ecx -#ifdef USE_AS_BZERO - xorl %eax, %eax /* fill with 0 */ -#else movzbl CHR(%esp), %eax -#endif jecxz 1f movl %edx, %edi cfi_rel_offset (edi, 0) @@ -70,9 +61,7 @@ ENTRY (memset) 2: movl %ecx, %edx shrl $2, %ecx andl $3, %edx -#ifndef USE_AS_BZERO imul $0x01010101, %eax -#endif rep stosl movl %edx, %ecx @@ -80,9 +69,7 @@ ENTRY (memset) stosb 1: -#ifndef USE_AS_BZERO movl DEST(%esp), %eax /* start address of destination is result */ -#endif popl %edi cfi_adjust_cfa_offset (-4) cfi_restore (edi) |