From: "H.J. Lu" <hjl.tools@gmail.com>
To: Fangrui Song <maskray@google.com>
Cc: GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH] i386: Replace movzx with movzbl
Date: Thu, 4 Aug 2022 14:27:09 -0700 [thread overview]
Message-ID: <CAMe9rOqQxCfW6UGs=ytaWex_=pXofBHMHzCRSBhPC2Xr6_UWtg@mail.gmail.com> (raw)
In-Reply-To: <20220804060432.2200849-1-maskray@google.com>
On Wed, Aug 3, 2022 at 11:04 PM Fangrui Song <maskray@google.com> wrote:
>
> Similar to 6720d36b6623c5e48c070d86acf61198b33e144e for x86-64.
>
> Clang cannot assemble movzx in the AT&T dialect mode. Change movzx to
> movzbl, which follows the AT&T dialect and is used elsewhere in the
> file.
> ---
> sysdeps/i386/i686/multiarch/strcmp-ssse3.S | 36 +++++++++++-----------
> 1 file changed, 18 insertions(+), 18 deletions(-)
>
> diff --git a/sysdeps/i386/i686/multiarch/strcmp-ssse3.S b/sysdeps/i386/i686/multiarch/strcmp-ssse3.S
> index ac5096f68d..3435691f23 100644
> --- a/sysdeps/i386/i686/multiarch/strcmp-ssse3.S
> +++ b/sysdeps/i386/i686/multiarch/strcmp-ssse3.S
> @@ -2141,8 +2141,8 @@ L(less16bytes):
> jbe L(eq)
> #endif
>
> - movzx 7(%eax), %ecx
> - movzx 7(%edx), %eax
> + movzbl 7(%eax), %ecx
> + movzbl 7(%edx), %eax
> #if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
> # ifdef PIC
> movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
> @@ -2161,8 +2161,8 @@ L(Byte0):
> cmp $0, REM
> jbe L(eq)
> #endif
> - movzx (%eax), %ecx
> - movzx (%edx), %eax
> + movzbl (%eax), %ecx
> + movzbl (%edx), %eax
>
> #if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
> # ifdef PIC
> @@ -2182,8 +2182,8 @@ L(Byte1):
> cmp $1, REM
> jbe L(eq)
> #endif
> - movzx 1(%eax), %ecx
> - movzx 1(%edx), %eax
> + movzbl 1(%eax), %ecx
> + movzbl 1(%edx), %eax
>
> #if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
> # ifdef PIC
> @@ -2203,8 +2203,8 @@ L(Byte2):
> cmp $2, REM
> jbe L(eq)
> #endif
> - movzx 2(%eax), %ecx
> - movzx 2(%edx), %eax
> + movzbl 2(%eax), %ecx
> + movzbl 2(%edx), %eax
>
> #if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
> # ifdef PIC
> @@ -2224,8 +2224,8 @@ L(Byte3):
> cmp $3, REM
> jbe L(eq)
> #endif
> - movzx 3(%eax), %ecx
> - movzx 3(%edx), %eax
> + movzbl 3(%eax), %ecx
> + movzbl 3(%edx), %eax
>
> #if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
> # ifdef PIC
> @@ -2245,8 +2245,8 @@ L(Byte4):
> cmp $4, REM
> jbe L(eq)
> #endif
> - movzx 4(%eax), %ecx
> - movzx 4(%edx), %eax
> + movzbl 4(%eax), %ecx
> + movzbl 4(%edx), %eax
>
> #if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
> # ifdef PIC
> @@ -2266,8 +2266,8 @@ L(Byte5):
> cmp $5, REM
> jbe L(eq)
> #endif
> - movzx 5(%eax), %ecx
> - movzx 5(%edx), %eax
> + movzbl 5(%eax), %ecx
> + movzbl 5(%edx), %eax
>
> #if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
> # ifdef PIC
> @@ -2287,8 +2287,8 @@ L(Byte6):
> cmp $6, REM
> jbe L(eq)
> #endif
> - movzx 6(%eax), %ecx
> - movzx 6(%edx), %eax
> + movzbl 6(%eax), %ecx
> + movzbl 6(%edx), %eax
>
> #if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
> # ifdef PIC
> @@ -2337,8 +2337,8 @@ L(2next_8_bytes):
> cmp $7, REM
> jbe L(eq)
> #endif
> - movzx 7(%eax), %ecx
> - movzx 7(%edx), %eax
> + movzbl 7(%eax), %ecx
> + movzbl 7(%edx), %eax
>
> #if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
> # ifdef PIC
> --
> 2.37.1.559.g78731f0fdb-goog
>
LGTM.
Thanks.
--
H.J.
prev parent reply other threads:[~2022-08-04 21:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-04 6:04 Fangrui Song
2022-08-04 8:13 ` Noah Goldstein
2022-08-04 21:27 ` H.J. Lu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMe9rOqQxCfW6UGs=ytaWex_=pXofBHMHzCRSBhPC2Xr6_UWtg@mail.gmail.com' \
--to=hjl.tools@gmail.com \
--cc=libc-alpha@sourceware.org \
--cc=maskray@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).