about summary refs log tree commit diff
path: root/sysdeps/i386/i686/multiarch/strcmp-sse4.S
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2010-02-15 13:04:54 -0800
committerUlrich Drepper <drepper@redhat.com>2010-02-15 13:04:54 -0800
commit6bb74d9f86e543c418f94a7732e8ee47c9e8225f (patch)
treeedadff811d4545e48713f224f8fd172f078a576e /sysdeps/i386/i686/multiarch/strcmp-sse4.S
parent904057bc17fb3e3127a35ebf35fcac8d5bc8269b (diff)
downloadglibc-6bb74d9f86e543c418f94a7732e8ee47c9e8225f.tar.gz
glibc-6bb74d9f86e543c418f94a7732e8ee47c9e8225f.tar.xz
glibc-6bb74d9f86e543c418f94a7732e8ee47c9e8225f.zip
Fix up new x86 string functions.
Diffstat (limited to 'sysdeps/i386/i686/multiarch/strcmp-sse4.S')
-rw-r--r--sysdeps/i386/i686/multiarch/strcmp-sse4.S14
1 files changed, 14 insertions, 0 deletions
diff --git a/sysdeps/i386/i686/multiarch/strcmp-sse4.S b/sysdeps/i386/i686/multiarch/strcmp-sse4.S
index 977647203f..4b47851ed4 100644
--- a/sysdeps/i386/i686/multiarch/strcmp-sse4.S
+++ b/sysdeps/i386/i686/multiarch/strcmp-sse4.S
@@ -176,6 +176,7 @@ L(first4bytes):
 	PUSH	(%ebx)
 	PUSH	(%edi)
 	PUSH	(%esi)
+	cfi_remember_state
 	mov	%edx, %edi
 	mov	%eax, %esi
 	xorl	%eax, %eax
@@ -241,6 +242,7 @@ L(ret):
 #endif
 	ret
 
+	cfi_restore_state
 #ifdef USE_AS_STRNCMP
 L(more16byteseq):
 	POP	(%esi)
@@ -253,6 +255,10 @@ L(eq):
 	POP	(%ebp)
 #endif
 	ret
+
+#ifdef USE_AS_STRNCMP
+	CFI_PUSH (%ebp)
+#endif
 L(neq):
 	mov	$1, %eax
 	ja	L(neq_bigger)
@@ -263,6 +269,9 @@ L(neq_bigger):
 #endif
 	ret
 	.p2align 4
+#ifdef USE_AS_STRNCMP
+	CFI_PUSH (%ebp)
+#endif
 L(less16bytes):
 	add	$0xfefefeff, %ecx
 	jnc	L(less4bytes)
@@ -370,8 +379,13 @@ L(more4bytes):
 	movzbl	7(%eax), %ecx
 	cmpb	%cl, 7(%edx)
 	jne	L(neq)
+#if 0
+	// XXX bug in original code.  It had a fallthru without any code
 	cmpl	$0, %ecx
 	je	L(eq)
+#else
+	jmp	L(eq)
+#endif
 
 END (STRCMP)