public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Hu, Lin1" <lin1.hu@intel.com>
To: "Beulich, Jan" <JBeulich@suse.com>, Binutils <binutils@sourceware.org>
Cc: "H.J. Lu" <hjl.tools@gmail.com>
Subject: RE: [PATCH] x86/APX: optimize MOVBE
Date: Tue, 16 Jan 2024 02:01:10 +0000	[thread overview]
Message-ID: <SJ0PR11MB5940F4B0D489306640992E5CA6732@SJ0PR11MB5940.namprd11.prod.outlook.com> (raw)
In-Reply-To: <41dbd367-36ed-4d36-a90b-703857d9ca28@suse.com>

> -----Original Message-----
> From: Jan Beulich <jbeulich@suse.com>
> Sent: Friday, January 12, 2024 8:28 PM
> To: Binutils <binutils@sourceware.org>
> Cc: H.J. Lu <hjl.tools@gmail.com>; Hu, Lin1 <lin1.hu@intel.com>
> Subject: Re: [PATCH] x86/APX: optimize MOVBE
> 
> On 12.01.2024 13:00, Jan Beulich wrote:
> > --- a/opcodes/i386-opc.tbl
> > +++ b/opcodes/i386-opc.tbl
> > @@ -210,6 +210,9 @@ mov, 0xf24, i386&No64, D|RegMem|IgnoreSi  //
> Move
> > after swapping the bytes  movbe, 0x0f38f0, Movbe,
> > D|Modrm|CheckOperandSize|No_bSuf|No_sSuf, {
> > Word|Dword|Qword|Unspecified|BaseIndex, Reg16|Reg32|Reg64 }  movbe,
> > 0x60, Movbe&APX_F,
> D|Modrm|CheckOperandSize|No_bSuf|No_sSuf|EVexMap4,
> > { Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg16|Reg32|Reg64 }
> > +// This really is BSWAP, but wants "duplicating" here for easy EVEX
> > +-> REX2 // conversion, restarting with the next sequential template.
> > +movbe, 0xfc8, Movbe&APX_F, No_bSuf|No_wSuf|No_sSuf, { Reg32|Reg64 }
> 
> Thinking of it - while not the end of the world, it would certainly be nice if this
> new template wasn't available for "ordinary" use. I'll see if I can come up with
> something.
> 

Maybe just put a flag in _i386_insn and add a new attribute in .tbl can solve the problem. Or add an already existing attribute which can disturb the "ordinary" use, and we change some value after optimization to match the template. Others are OK.

BRs,
Lin

      reply	other threads:[~2024-01-16  2:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-12 12:00 Jan Beulich
2024-01-12 12:28 ` Jan Beulich
2024-01-16  2:01   ` Hu, Lin1 [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=SJ0PR11MB5940F4B0D489306640992E5CA6732@SJ0PR11MB5940.namprd11.prod.outlook.com \
    --to=lin1.hu@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).