|
Packit |
6c4009 |
/* strcmp with SSE4.2
|
|
Packit |
6c4009 |
Copyright (C) 2010-2018 Free Software Foundation, Inc.
|
|
Packit |
6c4009 |
Contributed by Intel Corporation.
|
|
Packit |
6c4009 |
This file is part of the GNU C Library.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
The GNU C Library is free software; you can redistribute it and/or
|
|
Packit |
6c4009 |
modify it under the terms of the GNU Lesser General Public
|
|
Packit |
6c4009 |
License as published by the Free Software Foundation; either
|
|
Packit |
6c4009 |
version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
The GNU C Library is distributed in the hope that it will be useful,
|
|
Packit |
6c4009 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
6c4009 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
6c4009 |
Lesser General Public License for more details.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
You should have received a copy of the GNU Lesser General Public
|
|
Packit |
6c4009 |
License along with the GNU C Library; if not, see
|
|
Packit |
6c4009 |
<http://www.gnu.org/licenses/>. */
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#if IS_IN (libc)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#include <sysdep.h>
|
|
Packit |
6c4009 |
#include "asm-syntax.h"
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#define CFI_PUSH(REG) \
|
|
Packit |
6c4009 |
cfi_adjust_cfa_offset (4); \
|
|
Packit |
6c4009 |
cfi_rel_offset (REG, 0)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#define CFI_POP(REG) \
|
|
Packit |
6c4009 |
cfi_adjust_cfa_offset (-4); \
|
|
Packit |
6c4009 |
cfi_restore (REG)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#define PUSH(REG) pushl REG; CFI_PUSH (REG)
|
|
Packit |
6c4009 |
#define POP(REG) popl REG; CFI_POP (REG)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#ifdef USE_AS_STRNCMP
|
|
Packit |
6c4009 |
# ifndef STRCMP
|
|
Packit |
6c4009 |
# define STRCMP __strncmp_sse4_2
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
# define STR1 8
|
|
Packit |
6c4009 |
# define STR2 STR1+4
|
|
Packit |
6c4009 |
# define CNT STR2+4
|
|
Packit |
6c4009 |
# define RETURN POP (REM); ret; .p2align 4; CFI_PUSH (REM)
|
|
Packit |
6c4009 |
# define REM %ebp
|
|
Packit |
6c4009 |
#elif defined USE_AS_STRCASECMP_L
|
|
Packit |
6c4009 |
# include "locale-defines.h"
|
|
Packit |
6c4009 |
# ifndef STRCMP
|
|
Packit |
6c4009 |
# define STRCMP __strcasecmp_l_sse4_2
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
# ifdef PIC
|
|
Packit |
6c4009 |
# define STR1 12
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
# define STR1 8
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
# define STR2 STR1+4
|
|
Packit |
6c4009 |
# define LOCALE 12 /* Loaded before the adjustment. */
|
|
Packit |
6c4009 |
# ifdef PIC
|
|
Packit |
6c4009 |
# define RETURN POP (%edi); POP (%ebx); ret; \
|
|
Packit |
6c4009 |
.p2align 4; CFI_PUSH (%ebx); CFI_PUSH (%edi)
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
# define RETURN POP (%edi); ret; .p2align 4; CFI_PUSH (%edi)
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
# define NONASCII __strcasecmp_nonascii
|
|
Packit |
6c4009 |
#elif defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
# include "locale-defines.h"
|
|
Packit |
6c4009 |
# ifndef STRCMP
|
|
Packit |
6c4009 |
# define STRCMP __strncasecmp_l_sse4_2
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
# ifdef PIC
|
|
Packit |
6c4009 |
# define STR1 16
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
# define STR1 12
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
# define STR2 STR1+4
|
|
Packit |
6c4009 |
# define CNT STR2+4
|
|
Packit |
6c4009 |
# define LOCALE 16 /* Loaded before the adjustment. */
|
|
Packit |
6c4009 |
# ifdef PIC
|
|
Packit |
6c4009 |
# define RETURN POP (%edi); POP (REM); POP (%ebx); ret; \
|
|
Packit |
6c4009 |
.p2align 4; \
|
|
Packit |
6c4009 |
CFI_PUSH (%ebx); CFI_PUSH (REM); CFI_PUSH (%edi)
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
# define RETURN POP (%edi); POP (REM); ret; \
|
|
Packit |
6c4009 |
.p2align 4; CFI_PUSH (REM); CFI_PUSH (%edi)
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
# define REM %ebp
|
|
Packit |
6c4009 |
# define NONASCII __strncasecmp_nonascii
|
|
Packit |
6c4009 |
#else
|
|
Packit |
6c4009 |
# ifndef STRCMP
|
|
Packit |
6c4009 |
# define STRCMP __strcmp_sse4_2
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
# define STR1 4
|
|
Packit |
6c4009 |
# define STR2 STR1+4
|
|
Packit |
6c4009 |
# define RETURN ret; .p2align 4
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
.section .text.sse4.2,"ax",@progbits
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#ifdef USE_AS_STRCASECMP_L
|
|
Packit |
6c4009 |
ENTRY (__strcasecmp_sse4_2)
|
|
Packit |
6c4009 |
# ifdef PIC
|
|
Packit |
6c4009 |
PUSH (%ebx)
|
|
Packit |
6c4009 |
LOAD_PIC_REG(bx)
|
|
Packit |
6c4009 |
movl __libc_tsd_LOCALE@GOTNTPOFF(%ebx), %eax
|
|
Packit |
6c4009 |
# ifdef NO_TLS_DIRECT_SEG_REFS
|
|
Packit |
6c4009 |
addl %gs:0, %eax
|
|
Packit |
6c4009 |
movl (%eax), %eax
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
movl %gs:(%eax), %eax
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
# ifdef NO_TLS_DIRECT_SEG_REFS
|
|
Packit |
6c4009 |
movl %gs:0, %eax
|
|
Packit |
6c4009 |
movl __libc_tsd_LOCALE@NTPOFF(%eax), %eax
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
movl %gs:__libc_tsd_LOCALE@NTPOFF, %eax
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
# if LOCALE_T___LOCALES != 0 || LC_CTYPE != 0
|
|
Packit |
6c4009 |
movl LOCALE_T___LOCALES+LC_CTYPE*4(%eax), %eax
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
movl (%eax), %eax
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
testl $1, LOCALE_DATA_VALUES+_NL_CTYPE_NONASCII_CASE*SIZEOF_VALUES(%eax)
|
|
Packit |
6c4009 |
# ifdef PIC
|
|
Packit |
6c4009 |
je L(ascii)
|
|
Packit |
6c4009 |
POP (%ebx)
|
|
Packit |
6c4009 |
jmp __strcasecmp_nonascii
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
jne __strcasecmp_nonascii
|
|
Packit |
6c4009 |
jmp L(ascii)
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
END (__strcasecmp_sse4_2)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#ifdef USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
ENTRY (__strncasecmp_sse4_2)
|
|
Packit |
6c4009 |
# ifdef PIC
|
|
Packit |
6c4009 |
PUSH (%ebx)
|
|
Packit |
6c4009 |
LOAD_PIC_REG(bx)
|
|
Packit |
6c4009 |
movl __libc_tsd_LOCALE@GOTNTPOFF(%ebx), %eax
|
|
Packit |
6c4009 |
# ifdef NO_TLS_DIRECT_SEG_REFS
|
|
Packit |
6c4009 |
addl %gs:0, %eax
|
|
Packit |
6c4009 |
movl (%eax), %eax
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
movl %gs:(%eax), %eax
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
# ifdef NO_TLS_DIRECT_SEG_REFS
|
|
Packit |
6c4009 |
movl %gs:0, %eax
|
|
Packit |
6c4009 |
movl __libc_tsd_LOCALE@NTPOFF(%eax), %eax
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
movl %gs:__libc_tsd_LOCALE@NTPOFF, %eax
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
# if LOCALE_T___LOCALES != 0 || LC_CTYPE != 0
|
|
Packit |
6c4009 |
movl LOCALE_T___LOCALES+LC_CTYPE*4(%eax), %eax
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
movl (%eax), %eax
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
testl $1, LOCALE_DATA_VALUES+_NL_CTYPE_NONASCII_CASE*SIZEOF_VALUES(%eax)
|
|
Packit |
6c4009 |
# ifdef PIC
|
|
Packit |
6c4009 |
je L(ascii)
|
|
Packit |
6c4009 |
POP (%ebx)
|
|
Packit |
6c4009 |
jmp __strncasecmp_nonascii
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
jne __strncasecmp_nonascii
|
|
Packit |
6c4009 |
jmp L(ascii)
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
END (__strncasecmp_sse4_2)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ENTRY (STRCMP)
|
|
Packit |
6c4009 |
#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
movl LOCALE(%esp), %eax
|
|
Packit |
6c4009 |
# if LOCALE_T___LOCALES != 0 || LC_CTYPE != 0
|
|
Packit |
6c4009 |
movl LOCALE_T___LOCALES+LC_CTYPE*4(%eax), %eax
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
movl (%eax), %eax
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
testl $1, LOCALE_DATA_VALUES+_NL_CTYPE_NONASCII_CASE*SIZEOF_VALUES(%eax)
|
|
Packit |
6c4009 |
jne NONASCII
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# ifdef PIC
|
|
Packit |
6c4009 |
PUSH (%ebx)
|
|
Packit |
6c4009 |
LOAD_PIC_REG(bx)
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
L(ascii):
|
|
Packit |
6c4009 |
.section .rodata.cst16,"aM",@progbits,16
|
|
Packit |
6c4009 |
.align 16
|
|
Packit |
6c4009 |
.Lbelowupper:
|
|
Packit |
6c4009 |
.quad 0x4040404040404040
|
|
Packit |
6c4009 |
.quad 0x4040404040404040
|
|
Packit |
6c4009 |
.Ltopupper:
|
|
Packit |
6c4009 |
.quad 0x5b5b5b5b5b5b5b5b
|
|
Packit |
6c4009 |
.quad 0x5b5b5b5b5b5b5b5b
|
|
Packit |
6c4009 |
.Ltouppermask:
|
|
Packit |
6c4009 |
.quad 0x2020202020202020
|
|
Packit |
6c4009 |
.quad 0x2020202020202020
|
|
Packit |
6c4009 |
.previous
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# ifdef PIC
|
|
Packit |
6c4009 |
# define UCLOW_reg .Lbelowupper@GOTOFF(%ebx)
|
|
Packit |
6c4009 |
# define UCHIGH_reg .Ltopupper@GOTOFF(%ebx)
|
|
Packit |
6c4009 |
# define LCQWORD_reg .Ltouppermask@GOTOFF(%ebx)
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
# define UCLOW_reg .Lbelowupper
|
|
Packit |
6c4009 |
# define UCHIGH_reg .Ltopupper
|
|
Packit |
6c4009 |
# define LCQWORD_reg .Ltouppermask
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
PUSH (REM)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
PUSH (%edi)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
mov STR1(%esp), %edx
|
|
Packit |
6c4009 |
mov STR2(%esp), %eax
|
|
Packit |
6c4009 |
#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
movl CNT(%esp), REM
|
|
Packit |
6c4009 |
test REM, REM
|
|
Packit |
6c4009 |
je L(eq)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
mov %dx, %cx
|
|
Packit |
6c4009 |
and $0xfff, %cx
|
|
Packit |
6c4009 |
cmp $0xff0, %cx
|
|
Packit |
6c4009 |
ja L(first4bytes)
|
|
Packit |
6c4009 |
movdqu (%edx), %xmm2
|
|
Packit |
6c4009 |
mov %eax, %ecx
|
|
Packit |
6c4009 |
and $0xfff, %ecx
|
|
Packit |
6c4009 |
cmp $0xff0, %ecx
|
|
Packit |
6c4009 |
ja L(first4bytes)
|
|
Packit |
6c4009 |
#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
# define TOLOWER(reg1, reg2) \
|
|
Packit |
6c4009 |
movdqa reg1, %xmm3; \
|
|
Packit |
6c4009 |
movdqa UCHIGH_reg, %xmm4; \
|
|
Packit |
6c4009 |
movdqa reg2, %xmm5; \
|
|
Packit |
6c4009 |
movdqa UCHIGH_reg, %xmm6; \
|
|
Packit |
6c4009 |
pcmpgtb UCLOW_reg, %xmm3; \
|
|
Packit |
6c4009 |
pcmpgtb reg1, %xmm4; \
|
|
Packit |
6c4009 |
pcmpgtb UCLOW_reg, %xmm5; \
|
|
Packit |
6c4009 |
pcmpgtb reg2, %xmm6; \
|
|
Packit |
6c4009 |
pand %xmm4, %xmm3; \
|
|
Packit |
6c4009 |
pand %xmm6, %xmm5; \
|
|
Packit |
6c4009 |
pand LCQWORD_reg, %xmm3; \
|
|
Packit |
6c4009 |
pand LCQWORD_reg, %xmm5; \
|
|
Packit |
6c4009 |
por %xmm3, reg1; \
|
|
Packit |
6c4009 |
por %xmm5, reg2
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
movdqu (%eax), %xmm1
|
|
Packit |
6c4009 |
TOLOWER (%xmm2, %xmm1)
|
|
Packit |
6c4009 |
movd %xmm2, %ecx
|
|
Packit |
6c4009 |
movd %xmm1, %edi
|
|
Packit |
6c4009 |
movdqa %xmm2, %xmm3
|
|
Packit |
6c4009 |
movdqa %xmm1, %xmm4
|
|
Packit |
6c4009 |
cmpl %edi, %ecx
|
|
Packit |
6c4009 |
#else
|
|
Packit |
6c4009 |
# define TOLOWER(reg1, reg)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
movd %xmm2, %ecx
|
|
Packit |
6c4009 |
cmp (%eax), %ecx
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
jne L(less4bytes)
|
|
Packit |
6c4009 |
#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
movdqu (%eax), %xmm1
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
pxor %xmm2, %xmm1
|
|
Packit |
6c4009 |
pxor %xmm0, %xmm0
|
|
Packit |
6c4009 |
ptest %xmm1, %xmm0
|
|
Packit |
6c4009 |
jnc L(less16bytes)
|
|
Packit |
6c4009 |
pcmpeqb %xmm0, %xmm2
|
|
Packit |
6c4009 |
ptest %xmm2, %xmm0
|
|
Packit |
6c4009 |
jnc L(less16bytes)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
sub $16, REM
|
|
Packit |
6c4009 |
jbe L(eq)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
add $16, %edx
|
|
Packit |
6c4009 |
add $16, %eax
|
|
Packit |
6c4009 |
L(first4bytes):
|
|
Packit |
6c4009 |
movzbl (%eax), %ecx
|
|
Packit |
6c4009 |
#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
movzbl (%edx), %edi
|
|
Packit |
6c4009 |
# ifdef PIC
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%edi,4), %edi
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%edi,4), %edi
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
cmpl %ecx, %edi
|
|
Packit |
6c4009 |
#else
|
|
Packit |
6c4009 |
cmpb %cl, (%edx)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
jne L(neq)
|
|
Packit |
6c4009 |
cmpl $0, %ecx
|
|
Packit |
6c4009 |
je L(eq)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
cmp $1, REM
|
|
Packit |
6c4009 |
je L(eq)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
movzbl 1(%eax), %ecx
|
|
Packit |
6c4009 |
#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
movzbl 1(%edx), %edi
|
|
Packit |
6c4009 |
# ifdef PIC
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%edi,4), %edi
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%edi,4), %edi
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
cmpl %ecx, %edi
|
|
Packit |
6c4009 |
#else
|
|
Packit |
6c4009 |
cmpb %cl, 1(%edx)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
jne L(neq)
|
|
Packit |
6c4009 |
cmpl $0, %ecx
|
|
Packit |
6c4009 |
je L(eq)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
cmp $2, REM
|
|
Packit |
6c4009 |
je L(eq)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
movzbl 2(%eax), %ecx
|
|
Packit |
6c4009 |
#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
movzbl 2(%edx), %edi
|
|
Packit |
6c4009 |
# ifdef PIC
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%edi,4), %edi
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%edi,4), %edi
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
cmpl %ecx, %edi
|
|
Packit |
6c4009 |
#else
|
|
Packit |
6c4009 |
cmpb %cl, 2(%edx)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
jne L(neq)
|
|
Packit |
6c4009 |
cmpl $0, %ecx
|
|
Packit |
6c4009 |
je L(eq)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
cmp $3, REM
|
|
Packit |
6c4009 |
je L(eq)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
movzbl 3(%eax), %ecx
|
|
Packit |
6c4009 |
#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
movzbl 3(%edx), %edi
|
|
Packit |
6c4009 |
# ifdef PIC
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%edi,4), %edi
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%edi,4), %edi
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
cmpl %ecx, %edi
|
|
Packit |
6c4009 |
#else
|
|
Packit |
6c4009 |
cmpb %cl, 3(%edx)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
jne L(neq)
|
|
Packit |
6c4009 |
cmpl $0, %ecx
|
|
Packit |
6c4009 |
je L(eq)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
cmp $4, REM
|
|
Packit |
6c4009 |
je L(eq)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
movzbl 4(%eax), %ecx
|
|
Packit |
6c4009 |
#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
movzbl 4(%edx), %edi
|
|
Packit |
6c4009 |
# ifdef PIC
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%edi,4), %edi
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%edi,4), %edi
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
cmpl %ecx, %edi
|
|
Packit |
6c4009 |
#else
|
|
Packit |
6c4009 |
cmpb %cl, 4(%edx)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
jne L(neq)
|
|
Packit |
6c4009 |
cmpl $0, %ecx
|
|
Packit |
6c4009 |
je L(eq)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
cmp $5, REM
|
|
Packit |
6c4009 |
je L(eq)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
movzbl 5(%eax), %ecx
|
|
Packit |
6c4009 |
#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
movzbl 5(%edx), %edi
|
|
Packit |
6c4009 |
# ifdef PIC
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%edi,4), %edi
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%edi,4), %edi
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
cmpl %ecx, %edi
|
|
Packit |
6c4009 |
#else
|
|
Packit |
6c4009 |
cmpb %cl, 5(%edx)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
jne L(neq)
|
|
Packit |
6c4009 |
cmpl $0, %ecx
|
|
Packit |
6c4009 |
je L(eq)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
cmp $6, REM
|
|
Packit |
6c4009 |
je L(eq)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
movzbl 6(%eax), %ecx
|
|
Packit |
6c4009 |
#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
movzbl 6(%edx), %edi
|
|
Packit |
6c4009 |
# ifdef PIC
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%edi,4), %edi
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%edi,4), %edi
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
cmpl %ecx, %edi
|
|
Packit |
6c4009 |
#else
|
|
Packit |
6c4009 |
cmpb %cl, 6(%edx)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
jne L(neq)
|
|
Packit |
6c4009 |
cmpl $0, %ecx
|
|
Packit |
6c4009 |
je L(eq)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
cmp $7, REM
|
|
Packit |
6c4009 |
je L(eq)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
movzbl 7(%eax), %ecx
|
|
Packit |
6c4009 |
#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
movzbl 7(%edx), %edi
|
|
Packit |
6c4009 |
# ifdef PIC
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%edi,4), %edi
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%edi,4), %edi
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
cmpl %ecx, %edi
|
|
Packit |
6c4009 |
#else
|
|
Packit |
6c4009 |
cmpb %cl, 7(%edx)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
jne L(neq)
|
|
Packit |
6c4009 |
cmpl $0, %ecx
|
|
Packit |
6c4009 |
je L(eq)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
sub $8, REM
|
|
Packit |
6c4009 |
je L(eq)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
add $8, %eax
|
|
Packit |
6c4009 |
add $8, %edx
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
PUSH (%edi)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
PUSH (%esi)
|
|
Packit |
6c4009 |
#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
cfi_remember_state
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
mov %edx, %edi
|
|
Packit |
6c4009 |
mov %eax, %esi
|
|
Packit |
6c4009 |
xorl %eax, %eax
|
|
Packit |
6c4009 |
L(check_offset):
|
|
Packit |
6c4009 |
movl %edi, %edx
|
|
Packit |
6c4009 |
movl %esi, %ecx
|
|
Packit |
6c4009 |
andl $0xfff, %edx
|
|
Packit |
6c4009 |
andl $0xfff, %ecx
|
|
Packit |
6c4009 |
cmpl %edx, %ecx
|
|
Packit |
6c4009 |
cmovl %edx, %ecx
|
|
Packit |
6c4009 |
lea -0xff0(%ecx), %edx
|
|
Packit |
6c4009 |
sub %edx, %edi
|
|
Packit |
6c4009 |
sub %edx, %esi
|
|
Packit |
6c4009 |
testl %edx, %edx
|
|
Packit |
6c4009 |
jg L(crosspage)
|
|
Packit |
6c4009 |
L(loop):
|
|
Packit |
6c4009 |
movdqu (%esi,%edx), %xmm2
|
|
Packit |
6c4009 |
movdqu (%edi,%edx), %xmm1
|
|
Packit |
6c4009 |
TOLOWER (%xmm2, %xmm1)
|
|
Packit |
6c4009 |
pcmpistri $0x1a, %xmm2, %xmm1
|
|
Packit |
6c4009 |
jbe L(end)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
sub $16, REM
|
|
Packit |
6c4009 |
jbe L(more16byteseq)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
add $16, %edx
|
|
Packit |
6c4009 |
jle L(loop)
|
|
Packit |
6c4009 |
L(crosspage):
|
|
Packit |
6c4009 |
movzbl (%edi,%edx), %eax
|
|
Packit |
6c4009 |
movzbl (%esi,%edx), %ecx
|
|
Packit |
6c4009 |
#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
# ifdef PIC
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%eax,4), %eax
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%eax,4), %eax
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
subl %ecx, %eax
|
|
Packit |
6c4009 |
jne L(ret)
|
|
Packit |
6c4009 |
testl %ecx, %ecx
|
|
Packit |
6c4009 |
je L(ret)
|
|
Packit |
6c4009 |
#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
sub $1, REM
|
|
Packit |
6c4009 |
jbe L(more16byteseq)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
inc %edx
|
|
Packit |
6c4009 |
cmp $15, %edx
|
|
Packit |
6c4009 |
jle L(crosspage)
|
|
Packit |
6c4009 |
add %edx, %edi
|
|
Packit |
6c4009 |
add %edx, %esi
|
|
Packit |
6c4009 |
jmp L(check_offset)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
.p2align 4
|
|
Packit |
6c4009 |
L(end):
|
|
Packit |
6c4009 |
jnc L(ret)
|
|
Packit |
6c4009 |
#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
sub %ecx, REM
|
|
Packit |
6c4009 |
jbe L(more16byteseq)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
lea (%ecx,%edx), %ecx
|
|
Packit |
6c4009 |
movzbl (%edi,%ecx), %eax
|
|
Packit |
6c4009 |
movzbl (%esi,%ecx), %ecx
|
|
Packit |
6c4009 |
#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
# ifdef PIC
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%eax,4), %eax
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%eax,4), %eax
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
subl %ecx, %eax
|
|
Packit |
6c4009 |
L(ret):
|
|
Packit |
6c4009 |
POP (%esi)
|
|
Packit |
6c4009 |
POP (%edi)
|
|
Packit |
6c4009 |
#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
POP (REM)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
# ifdef PIC
|
|
Packit |
6c4009 |
POP (%ebx)
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
ret
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
.p2align 4
|
|
Packit |
6c4009 |
#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
cfi_restore_state
|
|
Packit |
6c4009 |
L(more16byteseq):
|
|
Packit |
6c4009 |
POP (%esi)
|
|
Packit |
6c4009 |
# ifdef USE_AS_STRNCMP
|
|
Packit |
6c4009 |
POP (%edi)
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
L(eq):
|
|
Packit |
6c4009 |
xorl %eax, %eax
|
|
Packit |
6c4009 |
RETURN
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
L(neq):
|
|
Packit |
6c4009 |
mov $1, %eax
|
|
Packit |
6c4009 |
ja L(neq_bigger)
|
|
Packit |
6c4009 |
neg %eax
|
|
Packit |
6c4009 |
L(neq_bigger):
|
|
Packit |
6c4009 |
RETURN
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
L(less16bytes):
|
|
Packit |
6c4009 |
add $0xfefefeff, %ecx
|
|
Packit |
6c4009 |
jnc L(less4bytes)
|
|
Packit |
6c4009 |
#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
movd %xmm3, %edi
|
|
Packit |
6c4009 |
xor %edi, %ecx
|
|
Packit |
6c4009 |
#else
|
|
Packit |
6c4009 |
xor (%edx), %ecx
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
or $0xfefefeff, %ecx
|
|
Packit |
6c4009 |
add $1, %ecx
|
|
Packit |
6c4009 |
jnz L(less4bytes)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
cmp $4, REM
|
|
Packit |
6c4009 |
jbe L(eq)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
psrldq $4, %xmm3
|
|
Packit |
6c4009 |
psrldq $4, %xmm4
|
|
Packit |
6c4009 |
movd %xmm3, %ecx
|
|
Packit |
6c4009 |
movd %xmm4, %edi
|
|
Packit |
6c4009 |
cmp %edi, %ecx
|
|
Packit |
6c4009 |
mov %ecx, %edi
|
|
Packit |
6c4009 |
#else
|
|
Packit |
6c4009 |
mov 4(%edx), %ecx
|
|
Packit |
6c4009 |
cmp 4(%eax), %ecx
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
jne L(more4bytes)
|
|
Packit |
6c4009 |
add $0xfefefeff, %ecx
|
|
Packit |
6c4009 |
jnc L(more4bytes)
|
|
Packit |
6c4009 |
#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
xor %edi, %ecx
|
|
Packit |
6c4009 |
#else
|
|
Packit |
6c4009 |
xor 4(%edx), %ecx
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
or $0xfefefeff, %ecx
|
|
Packit |
6c4009 |
add $1, %ecx
|
|
Packit |
6c4009 |
jnz L(more4bytes)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
sub $8, REM
|
|
Packit |
6c4009 |
jbe L(eq)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
add $8, %edx
|
|
Packit |
6c4009 |
add $8, %eax
|
|
Packit |
6c4009 |
L(less4bytes):
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
movzbl (%eax), %ecx
|
|
Packit |
6c4009 |
#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
movzbl (%edx), %edi
|
|
Packit |
6c4009 |
# ifdef PIC
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%edi,4), %edi
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%edi,4), %edi
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
cmpl %ecx, %edi
|
|
Packit |
6c4009 |
#else
|
|
Packit |
6c4009 |
cmpb %cl, (%edx)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
jne L(neq)
|
|
Packit |
6c4009 |
cmpl $0, %ecx
|
|
Packit |
6c4009 |
je L(eq)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
cmp $1, REM
|
|
Packit |
6c4009 |
je L(eq)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
movzbl 1(%eax), %ecx
|
|
Packit |
6c4009 |
#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
movzbl 1(%edx), %edi
|
|
Packit |
6c4009 |
# ifdef PIC
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%edi,4), %edi
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%edi,4), %edi
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
cmpl %ecx, %edi
|
|
Packit |
6c4009 |
#else
|
|
Packit |
6c4009 |
cmpb %cl, 1(%edx)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
jne L(neq)
|
|
Packit |
6c4009 |
cmpl $0, %ecx
|
|
Packit |
6c4009 |
je L(eq)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
cmp $2, REM
|
|
Packit |
6c4009 |
je L(eq)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
movzbl 2(%eax), %ecx
|
|
Packit |
6c4009 |
#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
movzbl 2(%edx), %edi
|
|
Packit |
6c4009 |
# ifdef PIC
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%edi,4), %edi
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%edi,4), %edi
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
cmpl %ecx, %edi
|
|
Packit |
6c4009 |
#else
|
|
Packit |
6c4009 |
cmpb %cl, 2(%edx)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
jne L(neq)
|
|
Packit |
6c4009 |
cmpl $0, %ecx
|
|
Packit |
6c4009 |
je L(eq)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
cmp $3, REM
|
|
Packit |
6c4009 |
je L(eq)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
movzbl 3(%eax), %ecx
|
|
Packit |
6c4009 |
#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
movzbl 3(%edx), %edi
|
|
Packit |
6c4009 |
# ifdef PIC
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%edi,4), %edi
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%edi,4), %edi
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
cmpl %ecx, %edi
|
|
Packit |
6c4009 |
#else
|
|
Packit |
6c4009 |
cmpb %cl, 3(%edx)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
jne L(neq)
|
|
Packit |
6c4009 |
cmpl $0, %ecx
|
|
Packit |
6c4009 |
je L(eq)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
L(more4bytes):
|
|
Packit |
6c4009 |
#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
cmp $4, REM
|
|
Packit |
6c4009 |
je L(eq)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
movzbl 4(%eax), %ecx
|
|
Packit |
6c4009 |
#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
movzbl 4(%edx), %edi
|
|
Packit |
6c4009 |
# ifdef PIC
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%edi,4), %edi
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%edi,4), %edi
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
cmpl %ecx, %edi
|
|
Packit |
6c4009 |
#else
|
|
Packit |
6c4009 |
cmpb %cl, 4(%edx)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
jne L(neq)
|
|
Packit |
6c4009 |
cmpl $0, %ecx
|
|
Packit |
6c4009 |
je L(eq)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
cmp $5, REM
|
|
Packit |
6c4009 |
je L(eq)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
movzbl 5(%eax), %ecx
|
|
Packit |
6c4009 |
#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
movzbl 5(%edx), %edi
|
|
Packit |
6c4009 |
# ifdef PIC
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%edi,4), %edi
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%edi,4), %edi
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
cmpl %ecx, %edi
|
|
Packit |
6c4009 |
#else
|
|
Packit |
6c4009 |
cmpb %cl, 5(%edx)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
jne L(neq)
|
|
Packit |
6c4009 |
cmpl $0, %ecx
|
|
Packit |
6c4009 |
je L(eq)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
cmp $6, REM
|
|
Packit |
6c4009 |
je L(eq)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
movzbl 6(%eax), %ecx
|
|
Packit |
6c4009 |
#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
movzbl 6(%edx), %edi
|
|
Packit |
6c4009 |
# ifdef PIC
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%edi,4), %edi
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%edi,4), %edi
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
cmpl %ecx, %edi
|
|
Packit |
6c4009 |
#else
|
|
Packit |
6c4009 |
cmpb %cl, 6(%edx)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
jne L(neq)
|
|
Packit |
6c4009 |
cmpl $0, %ecx
|
|
Packit |
6c4009 |
je L(eq)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
cmp $7, REM
|
|
Packit |
6c4009 |
je L(eq)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
movzbl 7(%eax), %ecx
|
|
Packit |
6c4009 |
#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
|
|
Packit |
6c4009 |
movzbl 7(%edx), %edi
|
|
Packit |
6c4009 |
# ifdef PIC
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%edi,4), %edi
|
|
Packit |
6c4009 |
# else
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
|
|
Packit |
6c4009 |
movl _nl_C_LC_CTYPE_tolower+128*4(,%edi,4), %edi
|
|
Packit |
6c4009 |
# endif
|
|
Packit |
6c4009 |
cmpl %ecx, %edi
|
|
Packit |
6c4009 |
#else
|
|
Packit |
6c4009 |
cmpb %cl, 7(%edx)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
jne L(neq)
|
|
Packit |
6c4009 |
jmp L(eq)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
END (STRCMP)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#endif
|