public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Binutils <binutils@sourceware.org>, Nick Clifton <nickc@redhat.com>
Subject: Re: [PATCH 5/7] x86: re-work insn/suffix recognition
Date: Tue, 6 Sep 2022 14:53:07 -0700	[thread overview]
Message-ID: <CAMe9rOo=hJf2WPu6LSQ7eOwf7GQha_QzAJq4enUDSR-hEv_cUA@mail.gmail.com> (raw)
In-Reply-To: <bc151c64-79b3-1d44-7069-72eb43481299@suse.com>

On Mon, Sep 5, 2022 at 11:40 PM Jan Beulich <jbeulich@suse.com> wrote:
>
> On 26.08.2022 20:46, H.J. Lu wrote:
> > On Fri, Aug 26, 2022 at 2:26 AM Jan Beulich <jbeulich@suse.com> wrote:
> >>
> >> On 23.08.2022 04:00, H.J. Lu wrote:
> >>> On Fri, Aug 19, 2022 at 1:28 AM Jan Beulich <jbeulich@suse.com> wrote:
> >>>>
> >>>> On 18.08.2022 17:14, H.J. Lu wrote:
> >>>>> On Wed, Aug 17, 2022 at 11:24 PM Jan Beulich <jbeulich@suse.com> wrote:
> >>>>>>
> >>>>>> On 17.08.2022 22:29, H.J. Lu wrote:
> >>>>>>> On Tue, Aug 16, 2022 at 12:32 AM Jan Beulich <jbeulich@suse.com> wrote:
> >>>>>>>>
> >>>>>>>> x86: re-work insn/suffix recognition
> >>>>>>>>
> >>>>>>>> Having templates with a suffix explicitly present has always been
> >>>>>>>> quirky. Introduce a 2nd matching pass in case the 1st one couldn't find
> >>>>>>>
> >>>>>>> I don't like the second pass.   What problem does it solve?
> >>>>>>
> >>>>>> It addresses the reasons we have various pretty odd (and confusing by
> >>>>>> their mere presence) insn templates which better would never have been
> >>>>>> there. If you have a better suggestion to eliminate those, I'm all ears.
> >>>>>>
> >>>>>> You can also easily see the issues this solves by looking at the
> >>>>>> testsuite changes. Among other things this once again is a matter of
> >>>>>> providing consistent and hence predictable behavior.
> >>>>>
> >>>>> Did you mean the error reporting behavior?  I don't think we should add
> >>>>> a second pass just for it.
> >>>>
> >>>> No. Certain insns simply were not accepted previously (this is actually
> >>>> what finally made me think of a solution here; prior observations
> >>>> weren't severe enough to try to get past your possible opposition which
> >>>> was to be expected based on past discussions). And certain other ones
> >>>> were wrongly accepted.
> >>>
> >>> Please open bug reports for these cases.
> >>
> >> PR gas/29524
> >> PR gas/29525
> >> PR gas/29526
> >>
> >> But really - what's the point of making me waste time on creating bug
> >> reports when fixes are already available?
> >
> > I don't see them as real issues and we shouldn't make assembler
> > more complex because of them.
>
> I sincerely disagree. As said many times - first and foremost the assembler
> should behave _consistently_. People should be able to predict behavior for
> one insn by knowing what the behavior is for sufficiently similar insns,
> without - as is the case twice here - having to further consider anomalies
> resulting from _dissimilar_ insns.

Assembler should be consistent with x86 SDM and the existing usage.
Due to the history/nature of AT&T syntax and x86 instructions, there are
existing inconsistencies.  I don't think we should issue a warning for cmpsd.
It is inconsistent with the 'd' suffix instead of 'l'.  But it is
consistent with SDM.
What I'd like to see in mnemonics:

1. They are as close to SDM as possible.
2. Allow prefix when there is an ambiguity.
3. Intel syntax shouldn't depend on prefixes

BTW, there is one inconsistency:

https://sourceware.org/bugzilla/show_bug.cgi?id=29551

I'd like to resolve.

>
> I therefore also disagree with you having closed some of the entered bugs
> as WONTFIX. I have to admit that I really wonder in how far binutils is an
> open source project if (for x86) you alone take such decisions.
>
> Jan



-- 
H.J.

  reply	other threads:[~2022-09-06 21:53 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-16  7:27 [PATCH 0/7] x86: suffix handling changes Jan Beulich
2022-08-16  7:30 ` [PATCH 1/7] x86/Intel: restrict suffix derivation Jan Beulich
2022-08-17 19:19   ` H.J. Lu
2022-08-18  6:07     ` Jan Beulich
2022-08-18 14:46       ` H.J. Lu
2022-08-19  8:19         ` Jan Beulich
2022-08-19 14:23           ` H.J. Lu
2022-08-19 14:49             ` Jan Beulich
2022-08-19 17:00               ` H.J. Lu
2022-08-22  9:34                 ` Jan Beulich
2022-08-22 14:38                   ` H.J. Lu
2022-08-16  7:30 ` [PATCH 2/7] x86: insert "no error" enumerator in i386_error enumeration Jan Beulich
2022-08-17 19:19   ` H.J. Lu
2022-08-16  7:31 ` [PATCH 3/7] x86: move / quiesce pre-386 non-16-bit warning Jan Beulich
2022-08-17 19:21   ` H.J. Lu
2022-08-18  7:21     ` Jan Beulich
2022-08-18 15:30       ` H.J. Lu
2022-08-19  6:13         ` Jan Beulich
2022-08-19 14:18           ` H.J. Lu
2022-08-16  7:32 ` [PATCH 4/7] x86: improve match_template()'s diagnostics Jan Beulich
2022-08-17 20:24   ` H.J. Lu
2022-08-18  6:14     ` Jan Beulich
2022-08-18 14:51       ` H.J. Lu
2022-08-16  7:32 ` [PATCH 5/7] x86: re-work insn/suffix recognition Jan Beulich
2022-08-17 20:29   ` H.J. Lu
2022-08-18  6:24     ` Jan Beulich
2022-08-18 15:14       ` H.J. Lu
2022-08-19  8:28         ` Jan Beulich
2022-08-23  2:00           ` H.J. Lu
2022-08-26  9:26             ` Jan Beulich
2022-08-26 18:46               ` H.J. Lu
2022-09-06  6:40                 ` Jan Beulich
2022-09-06 21:53                   ` H.J. Lu [this message]
2022-09-07  7:17                     ` Jan Beulich
2022-09-26 23:52                       ` H.J. Lu
2022-09-28 12:49                         ` Jan Beulich
2022-09-28 19:33                           ` H.J. Lu
2022-09-29  8:08                             ` Jan Beulich
2022-09-29 16:00                               ` H.J. Lu
2022-09-29 16:06                                 ` Jan Beulich
2022-09-29 16:20                                   ` H.J. Lu
2022-08-16  7:33 ` [PATCH 6/7] x86-64: further re-work insn/suffix recognition to also cover MOVSL Jan Beulich
2022-08-16  7:34 ` [PATCH 7/7] ix86: don't recognize/derive Q suffix in the common case Jan Beulich
2022-08-17 20:36   ` H.J. Lu
2022-08-18  6:29     ` 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='CAMe9rOo=hJf2WPu6LSQ7eOwf7GQha_QzAJq4enUDSR-hEv_cUA@mail.gmail.com' \
    --to=hjl.tools@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=jbeulich@suse.com \
    --cc=nickc@redhat.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).