Skip to content

Commit

Permalink
Simplify x86 strcmp-sse4 unwind info.
Browse files Browse the repository at this point in the history
  • Loading branch information
H.J. Lu authored and Ulrich Drepper committed Feb 18, 2010
1 parent 82abe82 commit 28be609
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2010-02-16 H.J. Lu <hongjiu.lu@intel.com>

* sysdeps/i386/i686/multiarch/strcmp-sse4.S: Simplify unwind info.

2010-02-17 H.J. Lu <hongjiu.lu@intel.com>
Ulrich Drepper <drepper@redhat.com>

Expand Down
22 changes: 7 additions & 15 deletions sysdeps/i386/i686/multiarch/strcmp-sse4.S
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,15 @@
# endif
# define STR1 4
# define STR2 STR1+4
# define RETURN ret; .p2align 4
#else
# ifndef STRCMP
# define STRCMP __strncmp_sse4_2
# endif
# define STR1 8
# define STR2 STR1+4
# define CNT STR2+4
# define RETURN POP (%ebp); ret; .p2align 4; CFI_PUSH (%ebp)
#endif

.section .text.sse4.2,"ax",@progbits
Expand Down Expand Up @@ -223,6 +225,7 @@ L(crosspage):
add $16, %esi
jmp L(check_offset)

.p2align 4
L(end):
jnc L(ret)
#ifdef USE_AS_STRNCMP
Expand All @@ -242,6 +245,7 @@ L(ret):
#endif
ret

.p2align 4
cfi_restore_state
#ifdef USE_AS_STRNCMP
L(more16byteseq):
Expand All @@ -251,27 +255,15 @@ L(more16byteseq):
#endif
L(eq):
xorl %eax, %eax
#ifdef USE_AS_STRNCMP
POP (%ebp)
#endif
ret
RETURN

#ifdef USE_AS_STRNCMP
CFI_PUSH (%ebp)
#endif
L(neq):
mov $1, %eax
ja L(neq_bigger)
neg %eax
L(neq_bigger):
#ifdef USE_AS_STRNCMP
POP (%ebp)
#endif
ret
.p2align 4
#ifdef USE_AS_STRNCMP
CFI_PUSH (%ebp)
#endif
RETURN

L(less16bytes):
add $0xfefefeff, %ecx
jnc L(less4bytes)
Expand Down

0 comments on commit 28be609

Please sign in to comment.