From 5d228a436a8257f082e84671bf8c89b79a2c3853 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 29 Jul 2013 14:58:41 +0200 Subject: Fix handling LC_CTYPE nonascii-case fallback in i686 SSE4.2 and SSSE3 strcasecmp/strncasecmp --- ChangeLog | 8 ++++++++ sysdeps/i386/i686/multiarch/strcmp-sse4.S | 12 ++++++++++++ sysdeps/i386/i686/multiarch/strcmp-ssse3.S | 12 ++++++++++++ 3 files changed, 32 insertions(+) diff --git a/ChangeLog b/ChangeLog index ed8d7fe..89f2fef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2013-08-27 Andreas Schwab + + * sysdeps/i386/i686/multiarch/strcmp-sse4.S (__strcasecmp_sse4_2) + (__strncasecmp_sse4_2) [PIC]: Restore %ebx before falling through + to __strcasecmp_nonascii and __strncasecmp_nonascii. + * sysdeps/i386/i686/multiarch/strcmp-ssse3.S (__strcasecmp_ssse3) + (__strncasecmp_ssse3) [PIC]: Likewise. + 2013-08-26 Roland McGrath * io/lxstat64.c: Just call __xstat64, for parity with stub __lxstat. diff --git a/sysdeps/i386/i686/multiarch/strcmp-sse4.S b/sysdeps/i386/i686/multiarch/strcmp-sse4.S index 62f458f..355ed4e 100644 --- a/sysdeps/i386/i686/multiarch/strcmp-sse4.S +++ b/sysdeps/i386/i686/multiarch/strcmp-sse4.S @@ -121,8 +121,14 @@ ENTRY (__strcasecmp_sse4_2) movl (%eax), %eax # endif testl $1, LOCALE_DATA_VALUES+_NL_CTYPE_NONASCII_CASE*SIZEOF_VALUES(%eax) +# ifdef PIC + je L(ascii) + POP (%ebx) + jmp __strcasecmp_nonascii +# else jne __strcasecmp_nonascii jmp L(ascii) +# endif END (__strcasecmp_sse4_2) #endif @@ -152,8 +158,14 @@ ENTRY (__strncasecmp_sse4_2) movl (%eax), %eax # endif testl $1, LOCALE_DATA_VALUES+_NL_CTYPE_NONASCII_CASE*SIZEOF_VALUES(%eax) +# ifdef PIC + je L(ascii) + POP (%ebx) + jmp __strncasecmp_nonascii +# else jne __strncasecmp_nonascii jmp L(ascii) +# endif END (__strncasecmp_sse4_2) #endif diff --git a/sysdeps/i386/i686/multiarch/strcmp-ssse3.S b/sysdeps/i386/i686/multiarch/strcmp-ssse3.S index 5fd9ac8..3eb304b 100644 --- a/sysdeps/i386/i686/multiarch/strcmp-ssse3.S +++ b/sysdeps/i386/i686/multiarch/strcmp-ssse3.S @@ -138,8 +138,14 @@ ENTRY (__strcasecmp_ssse3) movl (%eax), %eax # endif testl $1, LOCALE_DATA_VALUES+_NL_CTYPE_NONASCII_CASE*SIZEOF_VALUES(%eax) +# ifdef PIC + je L(ascii) + POP (%ebx) + jmp __strcasecmp_nonascii +# else jne __strcasecmp_nonascii jmp L(ascii) +# endif END (__strcasecmp_ssse3) #endif @@ -169,8 +175,14 @@ ENTRY (__strncasecmp_ssse3) movl (%eax), %eax # endif testl $1, LOCALE_DATA_VALUES+_NL_CTYPE_NONASCII_CASE*SIZEOF_VALUES(%eax) +# ifdef PIC + je L(ascii) + POP (%ebx) + jmp __strncasecmp_nonascii +# else jne __strncasecmp_nonascii jmp L(ascii) +# endif END (__strncasecmp_ssse3) #endif -- cgit v1.1