public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: "binutils@sourceware.org" <binutils@sourceware.org>
Subject: Re: [PATCH] x86: Remove movsx/movzx with 16/32-bit memory operand from AT&T syntax
Date: Wed, 12 Feb 2020 09:19:00 -0000	[thread overview]
Message-ID: <f6e66b2f-f314-ca00-e65c-7c2bd369f159@suse.com> (raw)
In-Reply-To: <20200212031924.GA2551231@gmail.com>

On 12.02.2020 04:19, H.J. Lu wrote:
> AT&T syntax requires suffix to specify memory operand size.  Since
> movsx and movzx can have different memory operand sizes with the same
> destination register, this patch removes movsx and movzx with 16/32-bit
> memory operand from AT&T syntax.  Now movzx and movsx with incorrect
> suffix and register are error in AT&T syntax.

Before we discuss this patch in detail, I think we need to come
to an agreement what is and what is not meant to be permitted.
My position of this is shown by the final shape of the new
tests that the series at the root of this thread first adds and
then adjusts. It was for this very reason why I had asked that
you please point out specifically against the two patches you
put under question what you think is wrong once those patches
would be in place.

What you say above makes no sense to me at all: Why would you
remove support for something that's supposed to work?

You know my underlying thinking - things should be as
consistent as possible. What you do here moves us farther
away from consistency. This is demonstrated by both increasing
the number of templates (whereas my proposed patch shrinks
them) as well as ...

> --- a/gas/config/tc-i386.c
> +++ b/gas/config/tc-i386.c
> @@ -4395,7 +4395,9 @@ md_assemble (char *line)
>  	  && intel_syntax)
>  	as_bad (_("ambiguous operand size for `%s'"), i.tm.name);
>  
> -      i.suffix = 0;
> +      /* movzx and movsx only allow the 'b' suffix in AT&T syntax.  */
> +      if (i.suffix == BYTE_MNEM_SUFFIX || intel_syntax)
> +	i.suffix = 0;
>      }

... a change like this. Recall that mine does away with this
rather arbitrary check here altogether, putting in place
less arbitrary (imo) checks/adjustments elsewhere instead?

While secondary, I also get the impression that, other than
my patch again, and in contrast to the adjustments recently
done for MOVSXD, the (not very useful) form having 16-bit
source and destination doesn't get supported by this change.
Which underlines what I've said initially: There first of
all needs to be a clear (and consistent) picture of what is
or is not supposed to work.

Jan

  reply	other threads:[~2020-02-12  9:19 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-11 10:23 [PATCH v5 0/5] x86: operand size handling improvements Jan Beulich
2020-02-11 10:25 ` [PATCH v5 3/5] x86: replace adhoc (partly wrong) ambiguous operand checking for MOVSX/MOVZX Jan Beulich
2020-02-11 10:25 ` [PATCH v5 1/5] x86: also disallow non-byte/-word registers with byte/word suffix Jan Beulich
2020-02-11 11:27   ` H.J. Lu
2020-02-11 10:25 ` [PATCH v5 2/5] x86: move certain MOVSX/MOVZX tests Jan Beulich
2020-02-11 11:43   ` H.J. Lu
2020-02-11 11:55     ` Jan Beulich
2020-02-11 12:20       ` H.J. Lu
2020-02-11 12:58         ` Jan Beulich
2020-02-11 13:02           ` H.J. Lu
2020-02-11 13:04             ` Jan Beulich
2020-02-11 13:07               ` H.J. Lu
2020-02-11 16:45                 ` Jan Beulich
2020-02-11 17:04                   ` H.J. Lu
2020-02-11 20:12                     ` [PATCH] x86: Remove movsx/movzx with memory operand from AT&T syntax H.J. Lu
2020-02-11 23:34                       ` H.J. Lu
2020-02-11 23:52                         ` H.J. Lu
2020-02-12  3:19                           ` [PATCH] x86: Remove movsx/movzx with 16/32-bit " H.J. Lu
2020-02-12  9:19                             ` Jan Beulich [this message]
2020-02-11 10:26 ` [PATCH v5 4/5] x86: correct VFPCLASSP{S,D} operand size handling Jan Beulich
2020-02-11 11:50   ` H.J. Lu
2020-02-11 12:49     ` Jan Beulich
2020-02-11 12:56       ` H.J. Lu
2020-02-11 10:27 ` [PATCH v5 5/5] x86-64: Intel64 adjustments for insns dealing with far pointers Jan Beulich
2020-02-11 11:53   ` H.J. Lu
2020-02-12  8:11     ` Jan Beulich

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=f6e66b2f-f314-ca00-e65c-7c2bd369f159@suse.com \
    --to=jbeulich@suse.com \
    --cc=binutils@sourceware.org \
    --cc=hjl.tools@gmail.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).