diff options
Diffstat (limited to 'libc/sysdeps/i386/strchrnul.S')
-rw-r--r-- | libc/sysdeps/i386/strchrnul.S | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/libc/sysdeps/i386/strchrnul.S b/libc/sysdeps/i386/strchrnul.S index d2879cf9c..7ceb88ed8 100644 --- a/libc/sysdeps/i386/strchrnul.S +++ b/libc/sysdeps/i386/strchrnul.S @@ -22,17 +22,14 @@ #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) @@ -40,7 +37,6 @@ ENTRY (BP_SYM (__strchrnul)) 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 @@ -272,14 +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) |