summaryrefslogtreecommitdiff
path: root/libc/sysdeps/i386/strchr.S
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2013-03-03 17:10:55 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2013-03-03 17:10:55 +0000
commitd15f124ff59606604c0243ee19cd67bc99ecd09f (patch)
treef0b18e431b15b797d5f5dc980928cd1a26b8f74a /libc/sysdeps/i386/strchr.S
parentc1078e9067234e88d5c1ca8af18ae67b64141d66 (diff)
downloadeglibc2-d15f124ff59606604c0243ee19cd67bc99ecd09f.tar.gz
Merge changes between r22241 and r22552 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@22553 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/sysdeps/i386/strchr.S')
-rw-r--r--libc/sysdeps/i386/strchr.S25
1 files changed, 8 insertions, 17 deletions
diff --git a/libc/sysdeps/i386/strchr.S b/libc/sysdeps/i386/strchr.S
index b0ba99b42..666c7498f 100644
--- a/libc/sysdeps/i386/strchr.S
+++ b/libc/sysdeps/i386/strchr.S
@@ -21,24 +21,20 @@
#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 (strchr))
- ENTER
+ENTRY (strchr)
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 C. What we need for the
algorithm is C in all bytes of the dword. Avoid
@@ -243,13 +239,11 @@ L(11): movl (%eax), %ecx /* get word (= 4 bytes) in question */
L(2): /* Return NULL. */
xorl %eax, %eax
- RETURN_NULL_BOUNDED_POINTER
popl %edi /* restore saved register content */
cfi_adjust_cfa_offset (-4)
cfi_restore (edi)
- LEAVE
- RET_PTR
+ ret
cfi_adjust_cfa_offset (4)
cfi_rel_offset (edi, 0)
@@ -285,15 +279,12 @@ L(7): testb %cl, %cl /* is first byte C? */
incl %eax
L(6):
- CHECK_BOUNDS_HIGH (%eax, STR(%esp), jb)
- RETURN_BOUNDED_POINTER (STR(%esp))
popl %edi /* restore saved register content */
cfi_adjust_cfa_offset (-4)
cfi_restore (edi)
- LEAVE
- RET_PTR
-END (BP_SYM (strchr))
+ ret
+END (strchr)
-weak_alias (BP_SYM (strchr), BP_SYM (index))
+weak_alias (strchr, index)
libc_hidden_builtin_def (strchr)