public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Fangrui Song <maskray@google.com>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Cc: libc-alpha@sourceware.org, "H . J . Lu" <hjl.tools@gmail.com>
Subject: Re: [PATCH] i386: Use cmpl instead of cmp
Date: Thu, 4 Aug 2022 14:09:55 -0700	[thread overview]
Message-ID: <20220804210955.t5euae6wwgawjox2@google.com> (raw)
In-Reply-To: <20220804210037.2613528-1-adhemerval.zanella@linaro.org>

On 2022-08-04, Adhemerval Zanella wrote:
>Clang cannot assemble cmp in the AT&T dialect mode.
>---
> sysdeps/i386/i686/multiarch/wcscpy-ssse3.S |  8 ++++----
> sysdeps/i386/i686/multiarch/wcslen-sse2.S  | 16 ++++++++--------
> 2 files changed, 12 insertions(+), 12 deletions(-)
>
>diff --git a/sysdeps/i386/i686/multiarch/wcscpy-ssse3.S b/sysdeps/i386/i686/multiarch/wcscpy-ssse3.S
>index 601e0f0138..fa6598c54d 100644
>--- a/sysdeps/i386/i686/multiarch/wcscpy-ssse3.S
>+++ b/sysdeps/i386/i686/multiarch/wcscpy-ssse3.S
>@@ -41,13 +41,13 @@ ENTRY (__wcscpy_ssse3)
> 	mov	STR1(%esp), %edx
> 	mov	STR2(%esp), %ecx
>
>-	cmp	$0, (%ecx)
>+	cmpl	$0, (%ecx)
> 	jz	L(ExitTail4)
>-	cmp	$0, 4(%ecx)
>+	cmpl	$0, 4(%ecx)
> 	jz	L(ExitTail8)
>-	cmp	$0, 8(%ecx)
>+	cmpl	$0, 8(%ecx)
> 	jz	L(ExitTail12)
>-	cmp	$0, 12(%ecx)
>+	cmpl	$0, 12(%ecx)
> 	jz	L(ExitTail16)
>
> 	PUSH	(%edi)
>diff --git a/sysdeps/i386/i686/multiarch/wcslen-sse2.S b/sysdeps/i386/i686/multiarch/wcslen-sse2.S
>index 5337286d41..d49a7ce355 100644
>--- a/sysdeps/i386/i686/multiarch/wcslen-sse2.S
>+++ b/sysdeps/i386/i686/multiarch/wcslen-sse2.S
>@@ -24,21 +24,21 @@
> ENTRY (__wcslen_sse2)
> 	mov	STR(%esp), %edx
>
>-	cmp	$0, (%edx)
>+	cmpl	$0, (%edx)
> 	jz	L(exit_tail0)
>-	cmp	$0, 4(%edx)
>+	cmpl	$0, 4(%edx)
> 	jz	L(exit_tail1)
>-	cmp	$0, 8(%edx)
>+	cmpl	$0, 8(%edx)
> 	jz	L(exit_tail2)
>-	cmp	$0, 12(%edx)
>+	cmpl	$0, 12(%edx)
> 	jz	L(exit_tail3)
>-	cmp	$0, 16(%edx)
>+	cmpl	$0, 16(%edx)
> 	jz	L(exit_tail4)
>-	cmp	$0, 20(%edx)
>+	cmpl	$0, 20(%edx)
> 	jz	L(exit_tail5)
>-	cmp	$0, 24(%edx)
>+	cmpl	$0, 24(%edx)
> 	jz	L(exit_tail6)
>-	cmp	$0, 28(%edx)
>+	cmpl	$0, 28(%edx)
> 	jz	L(exit_tail7)
>
> 	pxor	%xmm0, %xmm0
>-- 
>2.34.1
>
This also fixes GNU assembler warnings:

../sysdeps/i386/i686/multiarch/wcscpy-ssse3.S: Assembler messages:
../sysdeps/i386/i686/multiarch/wcscpy-ssse3.S:44: Warning: no instruction mnemonic suffix given and no register operands; using default for `cmp'
../sysdeps/i386/i686/multiarch/wcscpy-ssse3.S:46: Warning: no instruction mnemonic suffix given and no register operands; using default for `cmp'
../sysdeps/i386/i686/multiarch/wcscpy-ssse3.S:48: Warning: no instruction mnemonic suffix given and no register operands; using default for `cmp'
../sysdeps/i386/i686/multiarch/wcscpy-ssse3.S:50: Warning: no instruction mnemonic suffix given and no register operands; using default for `cmp'


BTW: I suspect you used git send-email --to='... H.J. Lu <hjl.tools@gmail.com>' instead of --to='... "H.J. Lu" <hjl.tools@gmail.com>' (quotes) :)

Reviewed-by: Fangrui Song <maskray@google.com>

  reply	other threads:[~2022-08-04 21:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-04 21:00 Adhemerval Zanella
2022-08-04 21:09 ` Fangrui Song [this message]
2022-08-04 21:25 ` H.J. Lu

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=20220804210955.t5euae6wwgawjox2@google.com \
    --to=maskray@google.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=hjl.tools@gmail.com \
    --cc=libc-alpha@sourceware.org \
    /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).