]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/x86_64/multiarch/strcmp-sse42.S
Update copyright notices with scripts/update-copyrights
[thirdparty/glibc.git] / sysdeps / x86_64 / multiarch / strcmp-sse42.S
index b93eda13b4674e3480a1ba500ebe7216b97c996b..2d0758a656cb04e8ad97ed41e618230bf29b1ea4 100644 (file)
@@ -1,5 +1,5 @@
 /* strcmp with SSE4.2
-   Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
+   Copyright (C) 2009-2014 Free Software Foundation, Inc.
    Contributed by Intel Corporation.
    This file is part of the GNU C Library.
 
@@ -14,9 +14,8 @@
    Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
 
 
 /* We use 0x1a:
        .section .text.SECTION,"ax",@progbits
        .align  16
        .type   STRCMP_SSE42, @function
+       .globl  STRCMP_SSE42
+       .hidden STRCMP_SSE42
 #ifdef USE_AS_STRCASECMP_L
 ENTRY (GLABEL(__strcasecmp))
        movq    __libc_tsd_LOCALE@gottpoff(%rip),%rax
-       movq    %fs:(%rax),%rdx
+       mov     %fs:(%rax),%RDX_LP
 
        // XXX 5 byte should be before the function
        /* 5-byte NOP.  */
@@ -63,7 +64,7 @@ END (GLABEL(__strcasecmp))
 #ifdef USE_AS_STRNCASECMP_L
 ENTRY (GLABEL(__strncasecmp))
        movq    __libc_tsd_LOCALE@gottpoff(%rip),%rax
-       movq    %fs:(%rax),%rcx
+       mov     %fs:(%rax),%RCX_LP
 
        // XXX 5 byte should be before the function
        /* 5-byte NOP.  */
@@ -100,22 +101,22 @@ STRCMP_SSE42:
        /* We have to fall back on the C implementation for locales
           with encodings not matching ASCII for single bytes.  */
 # if LOCALE_T___LOCALES != 0 || LC_CTYPE != 0
-       movq    LOCALE_T___LOCALES+LC_CTYPE*8(%rdx), %rax
+       mov     LOCALE_T___LOCALES+LC_CTYPE*LP_SIZE(%rdx), %RAX_LP
 # else
-       movq    (%rdx), %rax
+       mov     (%rdx), %RAX_LP
 # endif
-       testl   $0, LOCALE_DATA_VALUES+_NL_CTYPE_NONASCII_CASE*SIZEOF_VALUES(%rax)
+       testl   $1, LOCALE_DATA_VALUES+_NL_CTYPE_NONASCII_CASE*SIZEOF_VALUES(%rax)
        jne     __strcasecmp_l_nonascii
 #endif
 #ifdef USE_AS_STRNCASECMP_L
        /* We have to fall back on the C implementation for locales
           with encodings not matching ASCII for single bytes.  */
 # if LOCALE_T___LOCALES != 0 || LC_CTYPE != 0
-       movq    LOCALE_T___LOCALES+LC_CTYPE*8(%rcx), %rax
+       mov     LOCALE_T___LOCALES+LC_CTYPE*LP_SIZE(%rcx), %RAX_LP
 # else
-       movq    (%rcx), %rax
+       mov     (%rcx), %RAX_LP
 # endif
-       testl   $0, LOCALE_DATA_VALUES+_NL_CTYPE_NONASCII_CASE*SIZEOF_VALUES(%rax)
+       testl   $1, LOCALE_DATA_VALUES+_NL_CTYPE_NONASCII_CASE*SIZEOF_VALUES(%rax)
        jne     __strncasecmp_l_nonascii
 #endif
 
@@ -205,7 +206,7 @@ LABEL(touppermask):
        jnz     LABEL(less16bytes)/* If not, find different value or null char */
 #if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
        sub     $16, %r11
-       jbe     LABEL(strcmp_exitz)/* finish comparision */
+       jbe     LABEL(strcmp_exitz)/* finish comparison */
 #endif
        add     $16, %rsi               /* prepare to search next 16 bytes */
        add     $16, %rdi               /* prepare to search next 16 bytes */