]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
x86-64: Replace movzx with movzbl
authorFangrui Song <maskray@google.com>
Wed, 3 Nov 2021 03:59:52 +0000 (20:59 -0700)
committerSunil K Pandey <skpgkp2@gmail.com>
Mon, 2 May 2022 20:01:38 +0000 (13:01 -0700)
Clang cannot assemble movzx in the AT&T dialect mode.

../sysdeps/x86_64/strcmp.S:2232:16: error: invalid operand for instruction
 movzx (%rsi), %ecx
               ^~~~

Change movzx to movzbl, which follows the AT&T dialect and is used
elsewhere in the file.

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
(cherry picked from commit 6720d36b6623c5e48c070d86acf61198b33e144e)

sysdeps/x86_64/multiarch/strcmp-sse42.S
sysdeps/x86_64/strcmp.S

index bc19547b09639071cbedb803908ad89bca79c5ce..6197a723b9e0606e93dc0c794d3c9a3be3b29a17 100644 (file)
@@ -1771,8 +1771,8 @@ LABEL(strcmp_exitz):
        .p2align 4
        // XXX Same as code above
 LABEL(Byte0):
-       movz  (%rsi), %ecx
-       movz  (%rdi), %eax
+       movzbl  (%rsi), %ecx
+       movzbl  (%rdi), %eax
 
 #if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
        leaq    _nl_C_LC_CTYPE_tolower+128*4(%rip), %rdx
index 824e648230a157397b09737761b650f11d9c69b8..7f8a1bc756f86aee707f330a5e1a006f60e20651 100644 (file)
@@ -2232,8 +2232,8 @@ LABEL(strcmp_exitz):
 
        .p2align 4
 LABEL(Byte0):
-       movz  (%rsi), %ecx
-       movz  (%rdi), %eax
+       movzbl  (%rsi), %ecx
+       movzbl  (%rdi), %eax
 
 #if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
        leaq    _nl_C_LC_CTYPE_tolower+128*4(%rip), %rdx