]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/i386/strchrnul.S
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / i386 / strchrnul.S
index 9a521eb65add2f57c957e3ba02abc947cdb55fe4..da4385dd70e15d28e031bbfbf3f88cab08cd03dd 100644 (file)
@@ -1,7 +1,7 @@
 /* strchrnul (str, chr) -- Return pointer to first occurrence of CHR in STR
    or the final NUL byte.
    For Intel 80x86, x>=3.
-   Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1994-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.org>
    Some optimisations by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au>
    Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
 #include "asm-syntax.h"
-#include "bp-sym.h"
-#include "bp-asm.h"
 
-#define PARMS  LINKAGE+4       /* space for 1 saved reg */
+#define PARMS  4+4     /* space for 1 saved reg */
 #define RTN    PARMS
-#define STR    RTN+RTN_SIZE
-#define CHR    STR+PTR_SIZE
+#define STR    RTN
+#define CHR    STR+4
 
        .text
-ENTRY (BP_SYM (__strchrnul))
-       ENTER
+ENTRY (__strchrnul)
 
        pushl %edi              /* Save callee-safe registers used here.  */
+       cfi_adjust_cfa_offset (4)
+       cfi_rel_offset (edi, 0)
 
        movl STR(%esp), %eax
        movl CHR(%esp), %edx
-       CHECK_BOUNDS_LOW (%eax, STR(%esp))
 
        /* At the moment %edx contains CHR.  What we need for the
           algorithm is CHR in all bytes of the dword.  Avoid
@@ -271,12 +268,11 @@ L(7):     testb %cl, %cl          /* is first byte CHR? */
        /* It must be in the fourth byte and it cannot be NUL.  */
        incl %eax
 
-L(6):  CHECK_BOUNDS_HIGH (%eax, STR(%esp), jb)
-       RETURN_BOUNDED_POINTER (STR(%esp))
-       popl %edi               /* restore saved register content */
+L(6):  popl %edi               /* restore saved register content */
+       cfi_adjust_cfa_offset (-4)
+       cfi_restore (edi)
 
-       LEAVE
-       RET_PTR
-END (BP_SYM (__strchrnul))
+       ret
+END (__strchrnul)
 
-weak_alias (BP_SYM (__strchrnul), BP_SYM (strchrnul))
+weak_alias (__strchrnul, strchrnul)