From: "Cui, Lili" <lili.cui@intel.com>
To: "Beulich, Jan" <JBeulich@suse.com>
Cc: "hjl.tools@gmail.com" <hjl.tools@gmail.com>,
"binutils@sourceware.org" <binutils@sourceware.org>
Subject: RE: [PATCH] x86: Optimize the encoder of the vvvv register
Date: Mon, 22 Apr 2024 10:07:06 +0000 [thread overview]
Message-ID: <SJ0PR11MB56009E039386411BF76815FA9E122@SJ0PR11MB5600.namprd11.prod.outlook.com> (raw)
In-Reply-To: <c83302e0-e923-4f3b-89c1-e8177321be6c@suse.com>
> >>> +psllw<mmx>, 0x<mmx:pfx>0f71/6, <mmx:cpu>,
> >> Modrm|<mmx:scal>|NoSuf, {
> >>> +Imm8, <mmx:reg> }
> >>
> >> This is not a scalar instruction, hence "scal" as a template
> >> parameter name is misleading. It's not really clear to me anyway why
> >> this needs fiddling with - there was no SwapSources here, and none of
> >> its siblings are being touched either.
> >>
> >
> > 'psllw' has an extended opcode and two non-immediate operands, to
> delete the corresponding code below.
> >
> > - if (i.tm.extension_opcode != None)
> > - {
> > - if (dest != source)
> > - v = dest;
> > - dest = ~0;
> > - }
>
> Yet how's psllw different from, say, psraw or pslld?
>
Good question, psllw, psll<dq>, psraw, psrad, psrlw, psrl and psrl<dq> all require DstVVVV and I'll add test cases for them.
> >> To help recognizing such anomalies (possible problems), could I talk
> >> you into splitting the patch in two pieces? First a purely mechanical
> >> one introducing (perhaps simply as an alias of VexVVVV) / using
> >> Src1VVVV wherever it is meant to be used. Then the remaining changes,
> >> with a much smaller diff on the actual opcode templates, in the 2nd one.
> >>
> >
> > How about splitting into 3 patches:
> > 1. Introduce VexVVVV , Src1VVVV and Src2VVVV.
> > 2. Replace SwapSources.
> > 3. Replace extension_opcode part.
>
> Fundamentally fine with me, just that it would seem to me that in such a 1st
> patch Src2VVVV would end up unused. Hence it would appear more logical
> to me to introduce that only when needed, i.e. in patch 2.
>
Ok.
Thanks,
Lili.
prev parent reply other threads:[~2024-04-22 10:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-19 7:36 Cui, Lili
2024-04-19 10:05 ` Jan Beulich
2024-04-22 8:42 ` Cui, Lili
2024-04-22 8:48 ` Jan Beulich
2024-04-22 10:07 ` Cui, Lili [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=SJ0PR11MB56009E039386411BF76815FA9E122@SJ0PR11MB5600.namprd11.prod.outlook.com \
--to=lili.cui@intel.com \
--cc=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).