From: Jan Beulich <jbeulich@suse.com>
To: "Cui, Lili" <lili.cui@intel.com>
Cc: "Lu, Hongjiu" <hongjiu.lu@intel.com>,
"binutils@sourceware.org" <binutils@sourceware.org>
Subject: Re: [PATCH V2 3/8] Support APX GPR32 with extend evex prefix
Date: Thu, 9 Nov 2023 12:12:17 +0100 [thread overview]
Message-ID: <b587c630-42ff-3f38-1e1d-918590c9a563@suse.com> (raw)
In-Reply-To: <SJ0PR11MB5600B3BBB6657336F19557559EAFA@SJ0PR11MB5600.namprd11.prod.outlook.com>
On 09.11.2023 09:38, Cui, Lili wrote:
>> Subject: Re: [PATCH V2 3/8] Support APX GPR32 with extend evex prefix
>>
>> On 03.11.2023 17:50, Cui, Lili wrote:
>>> --- a/gas/config/tc-i386.c
>>> +++ b/gas/config/tc-i386.c
>>> @@ -3672,9 +3672,10 @@ install_template (const insn_template *t)
>>
>> What I'm surprised by is that you don't have any change to
>> cpu_flags_match().
>> I don't think you can get away without for dual VEX/EVEX templates. I hope
>> further down you'll find a sufficient explanation of what I think is going to be
>> needed.
>>
>
> I think it is ok. Or am I missing something?
>
> $ cat a.s
> .allow_index_reg
> .text
> _start:
> .text
> .arch .noapx_f
> ldtilecfg (%r31,%rdx,2)
> .arch .noamx_tile
> ldtilecfg (%rax,%rdx,2)
>
> $ as --64 a.s -o a.o
> a.s: Assembler messages:
> a.s:9: Error: `ldtilecfg' is not supported on `x86_64.noapx_f'
> a.s:11: Error: `ldtilecfg' is not supported on `x86_64.noapx_f.noamx_tile'
Oh, in case my earlier reply to this turns out incorrect (for me
overlooking something), ...
>>> @@ -3126,8 +3170,8 @@ xresldtrk, 0xf20f01e9, TSXLDTRK, NoSuf, {}
>>>
>>> // AMX instructions.
>>>
>>> -ldtilecfg, 0x49/0, AMX_TILE&x64,
>> Modrm|Vex128|Space0F38|VexW0|NoSuf,
>>> { Unspecified|BaseIndex } -sttilecfg, 0x6649/0, AMX_TILE&x64,
>>> Modrm|Vex128|Space0F38|VexW0|NoSuf, { Unspecified|BaseIndex }
>>> +ldtilecfg, 0x49/0, AMX_TILE&x64&(AMX_TILE|APX_F),
>>> +Modrm|Vex128|EVex128|Space0F38|VexW0|NoSuf,
>> { Unspecified|BaseIndex }
>>> +sttilecfg, 0x6649/0, AMX_TILE&x64&(AMX_TILE|APX_F),
>>> +Modrm|Vex128|EVex128|Space0F38|VexW0|NoSuf,
>> { Unspecified|BaseIndex }
>>
>> ... here, simplified to <feat>&(<feat>|APF_F). I would strongly recommend
>> putting this in a macro, accompanied by a clarifying comment (not the least
>> because (a && (a || b)) == a):
>>
>> /* Many APX_F instructions require a 2nd feature to also be available. When
>> the respective instructions were originally VEX-encoded, a single template
>> can cover both encodings. While the expression below may look odd on
>> the
>> surface (first of all we really mean "feat || (feat && APX_F)", but that is
>> nothing else than just "feat", and in turn the same as the expression below,
>> which is what i386-gen can grok), gas/config/tc-i386.c:cpu_flags_match()
>> will zap either of the inner two features depending on whether EVEX
>> encoding was determined to be necessary. Only then will the actual feature
>> checking be carried out. */
>> #define APX_F(feat) feat&(feat|APF_F)
>>
> Ok , I'll put them in opcodes/i386-opc.tbl.
... the comment here may need adapting: Depending on where such clearing
happens, one or both of cpu_flags_match() and install_template() will want
referring to.
Jan
next prev parent reply other threads:[~2023-11-09 11:12 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-03 16:50 Cui, Lili
2023-11-06 17:07 ` Jan Beulich
2023-11-13 5:53 ` Cui, Lili
2023-11-13 8:34 ` Jan Beulich
2023-11-14 3:12 ` Cui, Lili
2023-11-14 10:29 ` Jan Beulich
2023-11-15 8:39 ` Cui, Lili
2023-11-07 13:29 ` Jan Beulich
2023-11-09 8:38 ` Cui, Lili
2023-11-09 11:07 ` Jan Beulich
2023-11-09 11:12 ` Jan Beulich [this message]
2023-11-07 14:53 ` Jan Beulich
2023-11-09 12:31 ` Cui, Lili
2023-11-09 13:05 ` Jan Beulich
2023-11-09 14:57 ` Cui, Lili
2023-11-09 15:39 ` Jan Beulich
2023-11-14 7:42 ` Cui, Lili
2023-11-14 10:40 ` Jan Beulich
2023-11-14 14:46 ` Cui, Lili
2023-11-15 6:03 ` Cui, Lili
2023-11-15 9:11 ` Jan Beulich
2023-11-15 11:43 ` Cui, Lili
2023-11-16 13:57 ` Jan Beulich
2023-11-16 15:10 ` Cui, Lili
2023-11-16 15:15 ` Jan Beulich
2023-11-16 16:12 ` Cui, Lili
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=b587c630-42ff-3f38-1e1d-918590c9a563@suse.com \
--to=jbeulich@suse.com \
--cc=binutils@sourceware.org \
--cc=hongjiu.lu@intel.com \
--cc=lili.cui@intel.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).