]> 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)
committerFangrui Song <maskray@google.com>
Wed, 3 Nov 2021 03:59:52 +0000 (20:59 -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>
sysdeps/x86_64/multiarch/strcmp-sse42.S
sysdeps/x86_64/strcmp.S

index 617d3a3946ffe0ed5d72b5142e0b4a1bd9be7d45..be1ddb3f9202b854435885bb9f962d272b367d57 100644 (file)
@@ -1770,8 +1770,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 c7cbe4042a487cb4ac9f60c513bfc9f85cbffc00..bfe83abede22aa68f92919849f4340753986c405 100644 (file)
@@ -2229,8 +2229,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