From: "Cui, Lili" <lili.cui@intel.com>
To: "Beulich, Jan" <JBeulich@suse.com>, Hongtao Liu <crazylht@gmail.com>
Cc: Binutils <binutils@sourceware.org>, "H.J. Lu" <hjl.tools@gmail.com>
Subject: RE: [PATCH] x86/Intel: SHLD/SHRD have dual meaning
Date: Mon, 22 Apr 2024 07:43:29 +0000 [thread overview]
Message-ID: <SJ0PR11MB560099E06545D2591C9B56CE9E122@SJ0PR11MB5600.namprd11.prod.outlook.com> (raw)
In-Reply-To: <563b29cc-d3b5-45b7-b354-1ca8f3a2dcf4@suse.com>
> On 22.04.2024 06:09, Hongtao Liu wrote:
> > On Fri, Apr 19, 2024 at 5:29 PM Jan Beulich <jbeulich@suse.com> wrote:
> >>
> >> Since we uniformly permit D suffixes in Intel mode whenever in AT&T
> >> mode an L suffix may be used, we need to be consistent with this.
> > I think we need to forbid the D suffix for APX NDD SHL/SHR under Intel
> > mode to avoid ambiguity.
>
> Hmm. Special casing just two insns is out of question imo (in fact that's what
> is - unintentionally - partly happening prior to the change here).
>
> > Neither SHL (always SAL), nor SHR with a D suffix (Intel mode) is
> > generated by GCC.
>
> While this may be deemed helpful, I actually view it as a mistake, even if only
> from a cosmetic perspective: SHL is the main insn; SAL is merely an alias
> (questionably using extension opcode 4 rather than 6 in gas).
>
> Still extending what you suggest - limiting the restriction to APX - may be an
> option, albeit ...
>
> >> ---
> >> The alternative, more intrusive and more risky (in terms of perceived
> >> or even real regressions) route would be to mark the few insns which
> >> permit suffixes even in Intel syntax, and reject suffix uses when
> >> that indicator isn't set.
>
> ... as implied here I'd still consider this inconsistent.
>
> Furthermore the point in time when suffixes are processed off of the
> incoming mnemonic is too early to know whether an insn is having an APX
> representation. Hence doing said extension of what you suggest would likely
> end up quite hacky.
>
If the user messes them up, we can't figure out the original intention because the input is exactly the same, maybe we can find a suitable place to inform the user that shl + apx ndd does not support suffix?
Lili.
next prev parent reply other threads:[~2024-04-22 7:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-19 9:28 Jan Beulich
2024-04-22 4:09 ` Hongtao Liu
2024-04-22 6:51 ` Jan Beulich
2024-04-22 7:43 ` Cui, Lili [this message]
2024-04-22 7:47 ` Hongtao Liu
2024-04-22 8:42 ` Jan Beulich
2024-04-22 11:36 ` Hongtao Liu
2024-04-22 8:45 ` 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=SJ0PR11MB560099E06545D2591C9B56CE9E122@SJ0PR11MB5600.namprd11.prod.outlook.com \
--to=lili.cui@intel.com \
--cc=JBeulich@suse.com \
--cc=binutils@sourceware.org \
--cc=crazylht@gmail.com \
--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).