about summary refs log tree commit diff
path: root/sysdeps/i386/i586/strchr.S
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2013-02-19 21:58:08 +0000
committerJoseph Myers <joseph@codesourcery.com>2013-02-19 21:58:08 +0000
commit92945b5261c412eb590b2b34c7ec9a035f0693a1 (patch)
tree2d09031d37dcb8faab0ba90eb72b61681deecc51 /sysdeps/i386/i586/strchr.S
parentb65e2ba34b218a58a74123e2d6ba70ab0d4797bf (diff)
downloadglibc-92945b5261c412eb590b2b34c7ec9a035f0693a1.tar.gz
glibc-92945b5261c412eb590b2b34c7ec9a035f0693a1.tar.xz
glibc-92945b5261c412eb590b2b34c7ec9a035f0693a1.zip
Remove some bounded-pointers support from i386 .S files.
Diffstat (limited to 'sysdeps/i386/i586/strchr.S')
-rw-r--r--sysdeps/i386/i586/strchr.S26
1 files changed, 10 insertions, 16 deletions
diff --git a/sysdeps/i386/i586/strchr.S b/sysdeps/i386/i586/strchr.S
index d005b164f3..e2dfa20152 100644
--- a/sysdeps/i386/i586/strchr.S
+++ b/sysdeps/i386/i586/strchr.S
@@ -43,7 +43,6 @@
 
 	.text
 ENTRY (BP_SYM (strchr))
-	ENTER
 
 	pushl %edi		/* Save callee-safe registers.  */
 	cfi_adjust_cfa_offset (-4)
@@ -57,7 +56,6 @@ ENTRY (BP_SYM (strchr))
 
 	movl STR(%esp), %eax
 	movl CHR(%esp), %edx
-	CHECK_BOUNDS_LOW (%eax, STR(%esp))
 
 	movl %eax, %edi		/* duplicate string pointer for later */
 	cfi_rel_offset (edi, 12)
@@ -82,7 +80,7 @@ ENTRY (BP_SYM (strchr))
 	jp L(0)			/* exactly two bits set */
 
 	xorb (%eax), %cl	/* is byte the one we are looking for? */
-	jz L(2)			/* yes => return pointer */
+	jz L(out)		/* yes => return pointer */
 
 	xorb %dl, %cl		/* load single byte and test for NUL */
 	je L(3)			/* yes => return NULL */
@@ -91,7 +89,7 @@ ENTRY (BP_SYM (strchr))
 	incl %eax
 
 	cmpb %cl, %dl		/* is byte == C? */
-	je L(2)			/* aligned => return pointer */
+	je L(out)		/* aligned => return pointer */
 
 	cmpb $0, %cl		/* is byte NUL? */
 	je L(3)			/* yes => return NULL */
@@ -104,7 +102,7 @@ ENTRY (BP_SYM (strchr))
 L(0):	movb (%eax), %cl	/* load single byte */
 
 	cmpb %cl, %dl		/* is byte == C? */
-	je L(2)			/* aligned => return pointer */
+	je L(out)		/* aligned => return pointer */
 
 	cmpb $0, %cl		/* is byte NUL? */
 	je L(3)			/* yes => return NULL */
@@ -274,23 +272,21 @@ L(1):	xorl %ecx, %ebp			/* (word^magic) */
 L(5):	subl $4, %eax		/* adjust pointer */
 	testb %bl, %bl		/* first byte == C? */
 
-	jz L(2)			/* yes => return pointer */
+	jz L(out)		/* yes => return pointer */
 
 	incl %eax		/* increment pointer */
 	testb %bh, %bh		/* second byte == C? */
 
-	jz L(2)			/* yes => return pointer */
+	jz L(out)		/* yes => return pointer */
 
 	shrl $16, %ebx		/* make upper bytes accessible */
 	incl %eax		/* increment pointer */
 
 	cmp $0, %bl		/* third byte == C */
-	je L(2)			/* yes => return pointer */
+	je L(out)		/* yes => return pointer */
 
 	incl %eax		/* increment pointer */
 
-L(2):	CHECK_BOUNDS_HIGH (%eax, STR(%esp), jb)
-	RETURN_BOUNDED_POINTER (STR(%esp))
 L(out):	popl %ebp		/* restore saved registers */
 	cfi_adjust_cfa_offset (-4)
 	cfi_restore (ebp)
@@ -305,7 +301,6 @@ L(out):	popl %ebp		/* restore saved registers */
 	cfi_adjust_cfa_offset (-4)
 	cfi_restore (edi)
 
-	LEAVE
 	RET_PTR
 
 	cfi_adjust_cfa_offset (16)
@@ -318,7 +313,7 @@ L(out):	popl %ebp		/* restore saved registers */
 L(4):	subl $4, %eax		/* adjust pointer */
 	cmpb %dl, %cl		/* first byte == C? */
 
-	je L(2)			/* yes => return pointer */
+	je L(out)		/* yes => return pointer */
 
 	cmpb $0, %cl		/* first byte == NUL? */
 	je L(3)			/* yes => return NULL */
@@ -326,7 +321,7 @@ L(4):	subl $4, %eax		/* adjust pointer */
 	incl %eax		/* increment pointer */
 
 	cmpb %dl, %ch		/* second byte == C? */
-	je L(2)			/* yes => return pointer */
+	je L(out)		/* yes => return pointer */
 
 	cmpb $0, %ch		/* second byte == NUL? */
 	je L(3)			/* yes => return NULL */
@@ -335,7 +330,7 @@ L(4):	subl $4, %eax		/* adjust pointer */
 	incl %eax		/* increment pointer */
 
 	cmpb %dl, %cl		/* third byte == C? */
-	je L(2)			/* yes => return pointer */
+	je L(out)		/* yes => return pointer */
 
 	cmpb $0, %cl		/* third byte == NUL? */
 	je L(3)			/* yes => return NULL */
@@ -344,10 +339,9 @@ L(4):	subl $4, %eax		/* adjust pointer */
 
 	/* The test four the fourth byte is necessary!  */
 	cmpb %dl, %ch		/* fourth byte == C? */
-	je L(2)			/* yes => return pointer */
+	je L(out)		/* yes => return pointer */
 
 L(3):	xorl %eax, %eax
-	RETURN_NULL_BOUNDED_POINTER
 	jmp L(out)
 END (BP_SYM (strchr))