]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/i386/i586/strlen.S
Prefer https to http for gnu.org and fsf.org URLs
[thirdparty/glibc.git] / sysdeps / i386 / i586 / strlen.S
index 29d81d6b8de51b8705544cd581b5ef85b0ddbf10..334758558085ed4bba6a9106f645b6e5e4bb04ad 100644 (file)
@@ -1,6 +1,6 @@
 /* strlen -- Compute length of NUL terminated string.
    Highly optimized version for ix86, x>=5.
-   Copyright (C) 1995,1996,1997,2000,2002,2003 Free Software Foundation, Inc.
+   Copyright (C) 1995-2019 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
 
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
+   <https://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
 #include "asm-syntax.h"
-#include "bp-sym.h"
-#include "bp-asm.h"
 
 /* This version is especially optimized for the i586 (and following?)
    processors.  This is mainly done by using the two pipelines.  The
 /* The magic value which is used throughout in the whole code.  */
 #define magic 0xfefefeff
 
-#define PARMS  LINKAGE         /* no space for saved regs */
+#define PARMS  4               /* no space for saved regs */
 #define STR    PARMS
 
        .text
-ENTRY (BP_SYM (strlen))
-       ENTER
+ENTRY (strlen)
 
        movl STR(%esp), %eax
-       CHECK_BOUNDS_LOW (%eax, STR(%esp))
        movl $3, %edx           /* load mask (= 3) */
 
        andl %eax, %edx         /* separate last two bits of address */
@@ -178,11 +174,9 @@ L(3):      subl $4, %eax           /* correct too early pointer increment */
 
        incl %eax               /* increment pointer */
 
-L(2):  CHECK_BOUNDS_HIGH (%eax, STR(%esp), jb)
-       subl STR(%esp), %eax    /* now compute the length as difference
+L(2):  subl STR(%esp), %eax    /* now compute the length as difference
                                   between start and terminating NUL
                                   character */
-       LEAVE
        ret
-END (BP_SYM (strlen))
+END (strlen)
 libc_hidden_builtin_def (strlen)