summary refs log tree commit diff
path: root/sysdeps/i386/i686
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386/i686')
-rw-r--r--sysdeps/i386/i686/add_n.S9
-rw-r--r--sysdeps/i386/i686/memcmp.S4
-rw-r--r--sysdeps/i386/i686/memcpy.S3
-rw-r--r--sysdeps/i386/i686/memmove.S7
-rw-r--r--sysdeps/i386/i686/mempcpy.S5
-rw-r--r--sysdeps/i386/i686/memset.S4
-rw-r--r--sysdeps/i386/i686/strcmp.S17
-rw-r--r--sysdeps/i386/i686/strtok.S42
8 files changed, 6 insertions, 85 deletions
diff --git a/sysdeps/i386/i686/add_n.S b/sysdeps/i386/i686/add_n.S
index 5e91aad741..bc7646d935 100644
--- a/sysdeps/i386/i686/add_n.S
+++ b/sysdeps/i386/i686/add_n.S
@@ -34,7 +34,6 @@ L(1):	addl    (%esp), %eax
 	ret
 #endif
 ENTRY (BP_SYM (__mpn_add_n))
-	ENTER
 
 	pushl %edi
 	cfi_adjust_cfa_offset (4)
@@ -47,13 +46,6 @@ ENTRY (BP_SYM (__mpn_add_n))
 	cfi_rel_offset (esi, 0)
 	movl	S2(%esp),%edx
 	movl	SIZE(%esp),%ecx
-#if __BOUNDED_POINTERS__
-	shll	$2, %ecx	/* convert limbs to bytes */
-	CHECK_BOUNDS_BOTH_WIDE (%edi, RES(%esp), %ecx)
-	CHECK_BOUNDS_BOTH_WIDE (%esi, S1(%esp), %ecx)
-	CHECK_BOUNDS_BOTH_WIDE (%edx, S2(%esp), %ecx)
-	shrl	$2, %ecx
-#endif
 	movl	%ecx,%eax
 	shrl	$3,%ecx			/* compute count for unrolled loop */
 	negl	%eax
@@ -116,6 +108,5 @@ L(oop):	movl	(%esi),%eax
 	cfi_adjust_cfa_offset (-4)
 	cfi_restore (edi)
 
-	LEAVE
 	ret
 END (BP_SYM (__mpn_add_n))
diff --git a/sysdeps/i386/i686/memcmp.S b/sysdeps/i386/i686/memcmp.S
index eacac8ee18..8215acecd3 100644
--- a/sysdeps/i386/i686/memcmp.S
+++ b/sysdeps/i386/i686/memcmp.S
@@ -26,9 +26,9 @@
 #define BLK2		BLK1+PTR_SIZE
 #define LEN		BLK2+PTR_SIZE
 #define ENTRANCE	pushl %ebx; cfi_adjust_cfa_offset (4); \
-			cfi_rel_offset (ebx, 0); ENTER
+			cfi_rel_offset (ebx, 0)
 #define RETURN		popl %ebx; cfi_adjust_cfa_offset (-4); \
-			cfi_restore (ebx); LEAVE; ret
+			cfi_restore (ebx); ret
 
 /* Load an entry in a jump table into EBX.  TABLE is a jump table
    with relative offsets.  INDEX is a register contains the index
diff --git a/sysdeps/i386/i686/memcpy.S b/sysdeps/i386/i686/memcpy.S
index e6dc87d77d..78d60e56b4 100644
--- a/sysdeps/i386/i686/memcpy.S
+++ b/sysdeps/i386/i686/memcpy.S
@@ -38,7 +38,6 @@ ENTRY_CHK (__memcpy_chk)
 END_CHK (__memcpy_chk)
 #endif
 ENTRY (BP_SYM (memcpy))
-	ENTER
 
 	movl	%edi, %eax
 	movl	DEST(%esp), %edi
@@ -81,9 +80,7 @@ ENTRY (BP_SYM (memcpy))
 .Lend:	movl	%eax, %edi
 	movl	%edx, %esi
 	movl	DEST(%esp), %eax
-	RETURN_BOUNDED_POINTER (DEST(%esp))
 
-	LEAVE
 	RET_PTR
 
 	/* When we come here the pointers do not have the same
diff --git a/sysdeps/i386/i686/memmove.S b/sysdeps/i386/i686/memmove.S
index 6079851477..a99edf4d1f 100644
--- a/sysdeps/i386/i686/memmove.S
+++ b/sysdeps/i386/i686/memmove.S
@@ -47,7 +47,6 @@ END_CHK (__memmove_chk)
 #endif
 
 ENTRY (BP_SYM (memmove))
-	ENTER
 
 	pushl	%edi
 	cfi_adjust_cfa_offset (4)
@@ -58,8 +57,6 @@ ENTRY (BP_SYM (memmove))
 	movl	%esi, %edx
 	movl	SRC(%esp), %esi
 	cfi_register (esi, edx)
-	CHECK_BOUNDS_BOTH_WIDE (%edi, DEST(%esp), %ecx)
-	CHECK_BOUNDS_BOTH_WIDE (%esi, SRC(%esp), %ecx)
 
 	movl	%edi, %eax
 	subl	%esi, %eax
@@ -79,14 +76,12 @@ ENTRY (BP_SYM (memmove))
 	cfi_restore (esi)
 #ifndef USE_AS_BCOPY
 	movl	DEST(%esp), %eax
-	RETURN_BOUNDED_POINTER (DEST(%esp))
 #endif
 
 	popl	%edi
 	cfi_adjust_cfa_offset (-4)
 	cfi_restore (edi)
 
-	LEAVE
 	RET_PTR
 
 	cfi_adjust_cfa_offset (4)
@@ -113,7 +108,6 @@ ENTRY (BP_SYM (memmove))
 	cfi_restore (esi)
 #ifndef USE_AS_BCOPY
 	movl	DEST(%esp), %eax
-	RETURN_BOUNDED_POINTER (DEST(%esp))
 #endif
 
 	cld
@@ -121,7 +115,6 @@ ENTRY (BP_SYM (memmove))
 	cfi_adjust_cfa_offset (-4)
 	cfi_restore (edi)
 
-	LEAVE
 	RET_PTR
 END (BP_SYM (memmove))
 #ifndef USE_AS_BCOPY
diff --git a/sysdeps/i386/i686/mempcpy.S b/sysdeps/i386/i686/mempcpy.S
index 8022b7b959..fe72287a29 100644
--- a/sysdeps/i386/i686/mempcpy.S
+++ b/sysdeps/i386/i686/mempcpy.S
@@ -38,17 +38,14 @@ ENTRY_CHK (__mempcpy_chk)
 END_CHK (__mempcpy_chk)
 #endif
 ENTRY (BP_SYM (__mempcpy))
-	ENTER
 
 	movl	LEN(%esp), %ecx
 	movl	%edi, %eax
 	cfi_register (edi, eax)
 	movl	DEST(%esp), %edi
-	CHECK_BOUNDS_BOTH_WIDE (%edi, DEST(%esp), %ecx)
 	movl	%esi, %edx
 	cfi_register (esi, edx)
 	movl	SRC(%esp), %esi
-	CHECK_BOUNDS_BOTH_WIDE (%esi, SRC(%esp), %ecx)
 	cld
 	shrl	$1, %ecx
 	jnc	1f
@@ -62,9 +59,7 @@ ENTRY (BP_SYM (__mempcpy))
 	cfi_restore (edi)
 	movl	%edx, %esi
 	cfi_restore (esi)
-	RETURN_BOUNDED_POINTER (DEST(%esp))
 
-	LEAVE
 	RET_PTR
 END (BP_SYM (__mempcpy))
 libc_hidden_def (BP_SYM (__mempcpy))
diff --git a/sysdeps/i386/i686/memset.S b/sysdeps/i386/i686/memset.S
index ad0c9677fe..9033652511 100644
--- a/sysdeps/i386/i686/memset.S
+++ b/sysdeps/i386/i686/memset.S
@@ -46,14 +46,12 @@ ENTRY_CHK (__memset_chk)
 END_CHK (__memset_chk)
 #endif
 ENTRY (BP_SYM (memset))
-	ENTER
 
 	cld
 	pushl	%edi
 	cfi_adjust_cfa_offset (4)
 	movl	DEST(%esp), %edx
 	movl	LEN(%esp), %ecx
-	CHECK_BOUNDS_BOTH_WIDE (%edx, DEST(%esp), %ecx)
 #if BZERO_P
 	xorl	%eax, %eax	/* fill with 0 */
 #else
@@ -90,13 +88,11 @@ ENTRY (BP_SYM (memset))
 1:
 #if !BZERO_P
 	movl DEST(%esp), %eax	/* start address of destination is result */
-	RETURN_BOUNDED_POINTER (DEST(%esp))
 #endif
 	popl	%edi
 	cfi_adjust_cfa_offset (-4)
 	cfi_restore (edi)
 
-	LEAVE
 #if BZERO_P
 	ret
 #else
diff --git a/sysdeps/i386/i686/strcmp.S b/sysdeps/i386/i686/strcmp.S
index b53260ffd6..9f42977297 100644
--- a/sysdeps/i386/i686/strcmp.S
+++ b/sysdeps/i386/i686/strcmp.S
@@ -28,12 +28,9 @@
 
         .text
 ENTRY (BP_SYM (strcmp))
-	ENTER
 
 	movl	STR1(%esp), %ecx
 	movl	STR2(%esp), %edx
-	CHECK_BOUNDS_LOW (%ecx, STR1(%esp))
-	CHECK_BOUNDS_LOW (%edx, STR2(%esp))
 
 L(oop):	movb	(%ecx), %al
 	cmpb	(%edx), %al
@@ -46,26 +43,12 @@ L(oop):	movb	(%ecx), %al
 	xorl	%eax, %eax
 	/* when strings are equal, pointers rest one beyond
 	   the end of the NUL terminators.  */
-	CHECK_BOUNDS_HIGH (%ecx, STR1(%esp), jbe)
-	CHECK_BOUNDS_HIGH (%edx, STR2(%esp), jbe)
-	LEAVE
 	ret
 
-#ifndef __BOUNDED_POINTERS__
 L(neq):	movl	$1, %eax
 	movl	$-1, %ecx
 	cmovbl	%ecx, %eax
-#else
-L(neq):	movl	$1, %eax
-	ja	L(chk)
-	negl	%eax
-	/* When strings differ, pointers rest on
-	   the unequal characters.  */
-L(chk):	CHECK_BOUNDS_HIGH (%ecx, STR1(%esp), jb)
-	CHECK_BOUNDS_HIGH (%edx, STR2(%esp), jb)
-#endif
 
-	LEAVE
 	ret
 END (BP_SYM (strcmp))
 libc_hidden_builtin_def (strcmp)
diff --git a/sysdeps/i386/i686/strtok.S b/sysdeps/i386/i686/strtok.S
index 794efbaed0..281f6635e1 100644
--- a/sysdeps/i386/i686/strtok.S
+++ b/sysdeps/i386/i686/strtok.S
@@ -46,11 +46,7 @@
 	.type save_ptr, @object
 	.size save_ptr, 4
 save_ptr:
-# if __BOUNDED_POINTERS__
-	.space 12
-# else
 	.space 4
-# endif
 
 # ifdef PIC
 #  define SAVE_PTR save_ptr@GOTOFF(%ebx)
@@ -81,7 +77,6 @@ save_ptr:
 #endif
 
 ENTRY (BP_SYM (FUNCTION))
-	ENTER
 
 #if !defined USE_AS_STRTOK_R && defined PIC
 	pushl %ebx			/* Save PIC register.  */
@@ -127,23 +122,7 @@ ENTRY (BP_SYM (FUNCTION))
 	cmove %eax, %edx
 	testl %edx, %edx
 	jz L(returnNULL)
-#if __BOUNDED_POINTERS__
-# ifdef USE_AS_STRTOK_R
-	movl SAVE(%esp), %ecx	/* borrow %ecx for a moment */
-# endif
-	je L(0)
-	/* Save bounds of incoming non-NULL STR into save area.  */
-	movl 4+STR(%esp), %eax
-	movl %eax, 4+SAVE_PTR
-	movl 8+STR(%esp), %eax
-	movl %eax, 8+SAVE_PTR
-L(0):	CHECK_BOUNDS_LOW (%edx, SAVE_PTR)
-# ifdef USE_AS_STRTOK_R
-	xorl %ecx, %ecx		/* restore %ecx to zero */
-# endif
-#endif
 	movl DELIM(%esp), %eax		/* Get start of delimiter set.  */
-	CHECK_BOUNDS_LOW (%eax, DELIM(%esp))
 
 /* For understanding the following code remember that %ecx == 0 now.
    Although all the following instruction only modify %cl we always
@@ -151,17 +130,17 @@ L(0):	CHECK_BOUNDS_LOW (%edx, SAVE_PTR)
 
 L(2):	movb (%eax), %cl	/* get byte from stopset */
 	testb %cl, %cl		/* is NUL char? */
-	jz L(1_1)		/* yes => start compare loop */
+	jz L(1)			/* yes => start compare loop */
 	movb %cl, (%esp,%ecx)	/* set corresponding byte in stopset table */
 
 	movb 1(%eax), %cl	/* get byte from stopset */
 	testb $0xff, %cl	/* is NUL char? */
-	jz L(1_2)		/* yes => start compare loop */
+	jz L(1)			/* yes => start compare loop */
 	movb %cl, (%esp,%ecx)	/* set corresponding byte in stopset table */
 
 	movb 2(%eax), %cl	/* get byte from stopset */
 	testb $0xff, %cl	/* is NUL char? */
-	jz L(1_3)		/* yes => start compare loop */
+	jz L(1)			/* yes => start compare loop */
 	movb %cl, (%esp,%ecx)	/* set corresponding byte in stopset table */
 
 	movb 3(%eax), %cl	/* get byte from stopset */
@@ -170,16 +149,7 @@ L(2):	movb (%eax), %cl	/* get byte from stopset */
 	testb $0xff, %cl	/* is NUL char? */
 	jnz L(2)		/* no => process next dword from stopset */
 
-#if __BOUNDED_POINTERS__
-	jmp L(1_0)		/* pointer is correct for bounds check */
-L(1_3):	incl %eax		/* adjust pointer for bounds check */
-L(1_2):	incl %eax		/* ditto */
-L(1_1):	incl %eax		/* ditto */
-L(1_0):	CHECK_BOUNDS_HIGH (%eax, DELIM(%esp), jbe)
-#else
-L(1_3):; L(1_2):; L(1_1):	/* fall through */
-#endif
-	leal -4(%edx), %eax	/* prepare loop */
+L(1):	leal -4(%edx), %eax	/* prepare loop */
 
 	/* We use a neat trick for the following loop.  Normally we would
 	   have to test for two termination conditions
@@ -253,8 +223,6 @@ L(8):	cmpl %eax, %edx
 	movl SAVE(%esp), %ecx
 #endif
 	movl %edx, SAVE_PTR
-	CHECK_BOUNDS_HIGH (%edx, SAVE_PTR, jb)
-	RETURN_BOUNDED_POINTER (SAVE_PTR)
 
 L(epilogue):
 	/* Remove the stopset table.  */
@@ -265,7 +233,6 @@ L(epilogue):
 	cfi_adjust_cfa_offset (-4)
 	cfi_restore (ebx)
 #endif
-	LEAVE
 	RET_PTR
 
 L(returnNULL):
@@ -274,7 +241,6 @@ L(returnNULL):
 	movl SAVE(%esp), %ecx
 #endif
 	movl %edx, SAVE_PTR
-	RETURN_NULL_BOUNDED_POINTER
 	jmp L(epilogue)
 
 END (BP_SYM (FUNCTION))