about summary refs log tree commit diff
path: root/sysdeps/i386/i686/memset.S
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
committerUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
commita334319f6530564d22e775935d9c91663623a1b4 (patch)
treeb5877475619e4c938e98757d518bb1e9cbead751 /sysdeps/i386/i686/memset.S
parent0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (diff)
downloadglibc-a334319f6530564d22e775935d9c91663623a1b4.tar.gz
glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.xz
glibc-a334319f6530564d22e775935d9c91663623a1b4.zip
(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
Diffstat (limited to 'sysdeps/i386/i686/memset.S')
-rw-r--r--sysdeps/i386/i686/memset.S24
1 files changed, 7 insertions, 17 deletions
diff --git a/sysdeps/i386/i686/memset.S b/sysdeps/i386/i686/memset.S
index dfa1aa7019..561188ffec 100644
--- a/sysdeps/i386/i686/memset.S
+++ b/sysdeps/i386/i686/memset.S
@@ -1,6 +1,6 @@
 /* memset/bzero -- set memory area to CH/0
    Highly optimized version for ix86, x>=6.
-   Copyright (C) 1999,2000,2003,2005,2006 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 
@@ -51,7 +51,6 @@ ENTRY (BP_SYM (memset))
 
 	cld
 	pushl	%edi
-	cfi_adjust_cfa_offset (4)
 	movl	DEST(%esp), %edx
 	movl	LEN(%esp), %ecx
 	CHECK_BOUNDS_BOTH_WIDE (%edx, DEST(%esp), %ecx)
@@ -62,19 +61,18 @@ ENTRY (BP_SYM (memset))
 #endif
 	jecxz	1f
 	movl	%edx, %edi
-	cfi_rel_offset (edi, 0)
 	andl	$3, %edx
-	jz	2f	/* aligned */
-	jp	3f	/* misaligned at 3, store just one byte below */
-	stosb		/* misaligned at 1 or 2, store two bytes */
+	jz	2f
+	jnp	3f
+	stosb
 	decl	%ecx
 	jz	1f
 3:	stosb
 	decl	%ecx
 	jz	1f
-	xorl	$1, %edx
-	jnz	2f	/* was misaligned at 2 or 3, now aligned */
-	stosb		/* was misaligned at 1, store third byte */
+	xorl	$3, %edx
+	jz	2f
+	stosb
 	decl	%ecx
 2:	movl	%ecx, %edx
 	shrl	$2, %ecx
@@ -94,8 +92,6 @@ ENTRY (BP_SYM (memset))
 	RETURN_BOUNDED_POINTER (DEST(%esp))
 #endif
 	popl	%edi
-	cfi_adjust_cfa_offset (-4)
-	cfi_restore (edi)
 
 	LEAVE
 #if BZERO_P
@@ -105,9 +101,3 @@ ENTRY (BP_SYM (memset))
 #endif
 END (BP_SYM (memset))
 libc_hidden_builtin_def (memset)
-
-#if defined PIC && !defined NOT_IN_libc && !BZERO_P
-strong_alias (__memset_chk, __memset_zero_constant_len_parameter)
-	.section .gnu.warning.__memset_zero_constant_len_parameter
-	.string "memset used with constant zero length parameter; this could be due to transposed parameters"
-#endif