From: "Cui, Lili" <lili.cui@intel.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "hjl.tools@gmail.com" <hjl.tools@gmail.com>,
"binutils@sourceware.org" <binutils@sourceware.org>
Subject: RE: [PATCH 1/2] [PATCH 1/2] Enable Intel AVX512_FP16 instructions
Date: Fri, 9 Jul 2021 11:47:25 +0000 [thread overview]
Message-ID: <BY5PR11MB400804FAEC62CB0ACAF626DD9E189@BY5PR11MB4008.namprd11.prod.outlook.com> (raw)
In-Reply-To: <9df1a693-f815-6937-a8bc-59030872e37a@suse.com>
> -----Original Message-----
> From: Jan Beulich <jbeulich@suse.com>
> Sent: Monday, July 5, 2021 2:30 PM
> To: Cui, Lili <lili.cui@intel.com>; hjl.tools@gmail.com
> Cc: binutils@sourceware.org
> Subject: Re: [PATCH 1/2] [PATCH 1/2] Enable Intel AVX512_FP16 instructions
>
> On 01.07.2021 09:47, Cui,Lili wrote:
> > opcodes/i386-opc.tbl | 376 +++++++++++++++++++++
>
> A few more observations:
>
> While personally I think what you have is the best way of encoding it
> (allowing 64-bit register use to control EVEX.W in 64-bit bit mode), VMOVW
> is neither consistent with VPEXTRW (using EvexWIG) nor with VMOVD (only
> permitting Reg32). H.J., what are your thoughts here?
>
Removed Reg64 and add VexWIG on VMOVW.
> The VMOVW template needs splitting afaict: By OR-ing Word with
> Reg32 and/or Reg64, git s have separate register and
> memory operand templates, which is for this reason, iirc. (You may recall my
> other remark regarding combining e.g. Reg32 and Dword - there it is merely
> redundant, but having such is liable to suggest to people that combinations
> like
> Reg32 and Word are also okay. I intend to have i386-gen warn about such
> down the road, but obviously only once all prese/vnt redundancies have been
> eliminated.)
>
Done.
> VCVT{,T}SH2{,U}SI should have EvexWIG for their non-64bit encodings.
> But really it's unclear why each of them has three templates when the
> corresponding pre-existing SD and SS insns get away with two. I would have
> expected new templates to have been cloned from similar existing ones,
> rather than introducing new ones (with new inconsistencies). Of course
> there's (again) the possibility that you've spotted a bug with pre-existing
> templates, but then - if you don't want to fix those right away - I'd expect you
> to at least point out why you deviate from what we've got.
>
vcvtss2si has two templates because there is a special judgment in check_long_reg function, then the instruction can encode as EVEX.W = 1 without explicit VexW1.
if (intel_syntax
&& i.tm.opcode_modifier.toqword
&& i.types[0].bitfield.class != RegSIMD)
{
/* Convert to QWORD. We want REX byte. */
i.suffix = QWORD_MNEM_SUFFIX;
}
I add a special judgment in check_word_reg function, then VCVT{,T}SH2{,U}SI can also have two templates. I think that in order to reduce the number of templates and make the code less readable, this is a trade-off. I changed it anyway. Jan, what are your thoughts here?
else if (i.types[op].bitfield.qword
&& (i.tm.operand_types[op].bitfield.class == Reg
|| i.tm.operand_types[op].bitfield.instance == Accum)
&& i.tm.operand_types[op].bitfield.qword)
{
if (intel_syntax
&& i.tm.opcode_modifier.toqword
&& i.types[0].bitfield.class != RegSIMD)
{
/* Convert to QWORD. We want REX byte. */
i.suffix = QWORD_MNEM_SUFFIX;
}
}
> I suppose VCMP{P,S}H should have a large set of pseudos just like
> VCMP{P,S}{S,D} do, even if (for now) the spec doesn't spell those out.
>
> Jan
next prev parent reply other threads:[~2021-07-09 11:47 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-01 7:47 [PATCH 0/2]Enable Intel AVX512_FP16 instructions and add tests for it Cui,Lili
2021-07-01 7:47 ` [PATCH 1/2] [PATCH 1/2] Enable Intel AVX512_FP16 instructions Cui,Lili
2021-07-02 13:42 ` Jan Beulich
2021-07-02 15:46 ` Jan Beulich
2021-07-06 12:42 ` Cui, Lili
2021-07-09 11:52 ` Cui, Lili
2021-07-13 7:25 ` Jan Beulich
2021-07-13 7:35 ` Cui, Lili
2021-07-02 15:08 ` Jan Beulich
2021-07-09 11:50 ` Cui, Lili
2021-07-05 6:30 ` Jan Beulich
2021-07-05 12:38 ` H.J. Lu
2021-07-06 12:48 ` Cui, Lili
2021-07-09 11:47 ` Cui, Lili [this message]
2021-07-09 12:16 ` Jan Beulich
2021-07-13 6:58 ` Cui, Lili
2021-07-13 7:54 ` Jan Beulich
2021-07-13 8:03 ` Cui, Lili
2021-07-13 16:25 ` Jan Beulich
[not found] ` <DM6PR11MB4009305D09B37299FC2F282C9EE39@DM6PR11MB4009.namprd11.prod.outlook.com>
2021-07-21 14:29 ` Jan Beulich
2021-07-22 7:05 ` Cui, Lili
2021-07-14 15:21 ` Jan Beulich
2021-07-20 7:08 ` FW: " Cui, Lili
2021-07-20 8:46 ` Jan Beulich
2021-07-20 11:13 ` Cui, Lili
2021-07-20 11:26 ` Cui, Lili
2021-07-20 13:02 ` Jan Beulich
2021-07-20 13:38 ` Cui, Lili
2021-07-20 14:15 ` Jan Beulich
2021-07-20 14:29 ` Cui, Lili
2021-07-21 10:32 ` Jan Beulich
2021-07-01 15:42 ` [PATCH 0/2]Enable Intel AVX512_FP16 instructions and add tests for it H.J. Lu
2021-07-01 17:46 ` H.J. Lu
2021-07-02 0:13 ` Cui, Lili
[not found] ` <20210701074736.9534-3-lili.cui@intel.com>
2021-07-02 15:44 ` [PATCH 2/2] [PATCH 2/2] Add tests for Intel AVX512_FP16 instructions Jan Beulich
[not found] ` <BY5PR11MB4008FDC77679D0F8FB9E88B39E149@BY5PR11MB4008.namprd11.prod.outlook.com>
2021-07-13 15:59 ` Jan Beulich
2021-07-14 18:01 ` H.J. Lu
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=BY5PR11MB400804FAEC62CB0ACAF626DD9E189@BY5PR11MB4008.namprd11.prod.outlook.com \
--to=lili.cui@intel.com \
--cc=binutils@sourceware.org \
--cc=hjl.tools@gmail.com \
--cc=jbeulich@suse.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).