This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: x86-32 strncmp


On Tue, Nov 30, 2010 at 1:08 PM, Ulrich Drepper <drepper@gmail.com> wrote:
> There is something wrong isysdeps/i386/i686/multiarch/strcmp-ssse3.S.
> Look at this:
>
>
> ENTRY (STRCMP)
> #ifdef USE_AS_STRNCMP
> ? ? ? ?PUSH ? ?(%ebp)
> #endif
> ? ? ? ?movl ? ?STR1(%esp), %edx
> ? ? ? ?movl ? ?STR2(%esp), %eax
> #ifdef USE_AS_STRNCMP
> ? ? ? ?movl ? ?CNT(%esp), %ebp
> ? ? ? ?cmp ? ? $16, %ebp
> ? ? ? ?jb ? ? ?L(less16bytes_sncmp)
> ? ? ? ?jmp ? ? L(more16bytes)
> #endif
>
> ? ? ? ?movzbl ?(%eax), %ecx
> ? ? ? ?cmpb ? ?%cl, (%edx)
> ? ? ? ?jne ? ? L(neq)
>
>
> The code following the second #endif is never reached if
> USE_AS_STRNCMP is defined. ?I doubt this is intended. ?If it is, just
> remove the whole block.
>

Here is  a patch.

Thanks.

-- 
H.J.
----
2010-12-01  H.J. Lu  <hongjiu.lu@intel.com>

	* sysdeps/i386/i686/multiarch/strcmp-ssse3.S (STRCMP): Remove
	unused codes.

Attachment: libc-strncmp-2.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]