public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
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: FW: [PATCH 3/8] Add tests for APX GPR32 with extend evex prefix
Date: Wed, 18 Oct 2023 14:06:05 +0200	[thread overview]
Message-ID: <a14cf29d-5cdc-9070-c4ee-80c3aa4fa403@suse.com> (raw)
In-Reply-To: <SJ0PR11MB560005F1565A9CD37FA7201A9ED5A@SJ0PR11MB5600.namprd11.prod.outlook.com>

On 18.10.2023 13:26, Cui, Lili wrote:
>> From: Jan Beulich <jbeulich@suse.com>
>> Sent: Wednesday, October 18, 2023 4:06 PM
>>
>> On 18.10.2023 09:16, Cui, Lili wrote:
>>>> On 18.10.2023 04:32, Cui, Lili wrote:
>>>>>>>>> --- a/gas/testsuite/gas/i386/x86-64-inval-movbe.s
>>>>>>>>> +++ b/gas/testsuite/gas/i386/x86-64-inval-movbe.s
>>>>>>>>> @@ -1,5 +1,6 @@
>>>>>>>>>  # Check illegal movbe in 64bit mode.
>>>>>>>>>  	.text
>>>>>>>>> +	.arch .noapx_f
>>>>>>>>>  foo:
>>>>>>>>>  	movbe	(%rcx),%bl
>>>>>>>>>  	movbe	%ecx,%ebx
>>>>>>>>
>>>>>>>> I don't understand the need for this addition (and hence for the
>>>>>>>> need to change the test's expecations). Like was mentioned on the
>>>>>>>> original
>>>>>>>> AVX10 series, tests like this shall not need modification, or
>>>>>>>> else it indicates people's code also may need ".arch .noapx_f"
>>>>>>>> additions, which I'm sure you agree may not be required. Finally,
>>>>>>>> if testcase expecations like the above would be needed anywhere,
>>>>>>>> please generalize them such that a similar mere addition of a
>>>>>>>> line doesn't require the entire test to be touched. Here this
>>>>>>>> means that while for the diagnostics you of course want exact
>>>>>>>> line number matches, for the actual listing line numbers don't
>>>>>>>> don't need matching
>>>> individually.
>>>>>>>>
>>>>>>>
>>>>>>> Agree with you, but movbe is special, movbe didn't support reg to
>>>>>>> reg
>>>>>> before, but APX enable it. so I added .arch .noapx_f for this invalid test.
>>>>>>
>>>>>> To be honest I didn't really notice this difference so far. That's
>>>>>> somewhat ugly, because people mistakenly using a reg->reg form
>>>>>> would suddenly get an EVEX encoding rather than an error. This will
>>>>>> need some further thought; please mention the "anomaly" explicitly
>>>>>> in the
>>>> description of the respective patch.
>>>>>>
>>>>> SPEC:
>>>>> Note: The promoted versions of MOVBE will be extended to include the
>>>>> “MOVBE reg1, reg2” form (namely, the ModRM.Mod = 3 case) for both
>>>>> opcodes 0xF0 and 0xF1. This extension makes the promotion of BSWAP
>>>>> for
>>>> NDD support unnecessary.
>>>>>
>>>>> I'll add a description of movbe to the patch 2/8 changelog.
>>>>
>>>> Thanks. I did deduce the connection to BSWAP on the way home yesterday.
>>>> Which made me come up with a (spec) question: Wouldn't it make sense
>>>> to name these
>>>> reg->reg forms BSWAP, not MOVBE? It doesn't really matter that they
>>>> reg->use the
>>>> same encoding as the MOVBE (then mem-only) forms. That would then
>>>> eliminate the concern I raised.
>>>>
>>>
>>> If we extend BSWAP, it needs to add the operation of reading ModRM.Mod. I
>> think this is the benefit of this solution now.
>>
>> I'm afraid I don't follow: I don't propose extending the original BSWAP.
>> I merely propose to use the BSWAP mnemonic with the reg->reg form of
>> what's presently called MOVBE. (As an aside, in principle no ModR/M byte
>> would be needed to extend the original BSWAP: One operand is encoded in
>> the base opcode, and the other could be encoded in VVVV. But that would of
>> course needlessly consume an entire row in the opcode table. Hence why I
>> fully understand that the opcode wants sharing with MOVBE.)
>>
> 
> I think it's a trade-off between functionality closer to BSWAP and opcode closer to MOVBE. Since the spec was published and gcc has committed the patch to the community, I think it would be hard to push it to change.

In which case I wonder how one could influence such decisions, when the first
publication of such a spec already means things are set in stone. I was hoping
that only inclusion in the SDM would mean no (easy) changes anymore.

Jan

  reply	other threads:[~2023-10-18 12:06 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-19 15:25 [PATCH 0/8] [RFC] Support Intel APX EGPR Cui, Lili
2023-09-19 15:25 ` [PATCH 1/8] Support APX GPR32 with rex2 prefix Cui, Lili
2023-09-21 15:27   ` Jan Beulich
2023-09-27 15:57     ` Cui, Lili
2023-09-21 15:51   ` Jan Beulich
2023-09-27 15:59     ` Cui, Lili
2023-09-28  8:02       ` Jan Beulich
2023-10-07  3:27         ` Cui, Lili
2023-09-19 15:25 ` [PATCH 2/8] Support APX GPR32 with extend evex prefix Cui, Lili
2023-09-22 10:12   ` Jan Beulich
2023-10-17 15:48     ` Cui, Lili
2023-10-18  6:40       ` Jan Beulich
2023-10-18 10:44         ` Cui, Lili
2023-10-18 10:50           ` Jan Beulich
2023-09-22 10:50   ` Jan Beulich
2023-10-17 15:50     ` Cui, Lili
2023-10-17 16:11       ` Jan Beulich
2023-10-18  2:02         ` Cui, Lili
2023-10-18  6:10           ` Jan Beulich
2023-09-25  6:03   ` Jan Beulich
2023-10-17 15:52     ` Cui, Lili
2023-10-17 16:12       ` Jan Beulich
2023-10-18  6:31         ` Cui, Lili
2023-10-18  6:47           ` Jan Beulich
2023-10-18  7:52             ` Cui, Lili
2023-10-18  8:21               ` Jan Beulich
2023-10-18 11:30                 ` Cui, Lili
2023-10-19 11:58                   ` Cui, Lili
2023-10-19 15:24                     ` Jan Beulich
2023-10-19 16:38                       ` Cui, Lili
2023-10-20  6:25                         ` Jan Beulich
2023-10-22 14:33                           ` Cui, Lili
2023-09-19 15:25 ` [PATCH 3/8] Add tests for " Cui, Lili
2023-09-27 13:11   ` Jan Beulich
2023-10-17 15:53     ` FW: " Cui, Lili
2023-10-17 16:19       ` Jan Beulich
2023-10-18  2:32         ` Cui, Lili
2023-10-18  6:05           ` Jan Beulich
2023-10-18  7:16             ` Cui, Lili
2023-10-18  8:05               ` Jan Beulich
2023-10-18 11:26                 ` Cui, Lili
2023-10-18 12:06                   ` Jan Beulich [this message]
2023-10-25 16:03                     ` Cui, Lili
2023-09-27 13:19   ` Jan Beulich
2023-09-19 15:25 ` [PATCH 4/8] Support APX NDD Cui, Lili
2023-09-27 14:44   ` Jan Beulich
2023-10-22 14:05     ` Cui, Lili
2023-10-23  7:12       ` Jan Beulich
2023-10-25  8:10         ` Cui, Lili
2023-10-25  8:47           ` Jan Beulich
2023-10-25 15:49             ` Cui, Lili
2023-10-25 15:59               ` Jan Beulich
2023-09-28  7:57   ` Jan Beulich
2023-10-22 14:57     ` Cui, Lili
2023-10-24 11:39     ` Cui, Lili
2023-10-24 11:58       ` Jan Beulich
2023-10-25 15:29         ` Cui, Lili
2023-09-19 15:25 ` [PATCH 5/8] Support APX NDD optimized encoding Cui, Lili
2023-09-28  9:29   ` Jan Beulich
2023-10-23  2:57     ` Hu, Lin1
2023-10-23  7:23       ` Jan Beulich
2023-10-23  7:50         ` Hu, Lin1
2023-10-23  8:15           ` Jan Beulich
2023-10-24  1:40             ` Hu, Lin1
2023-10-24  6:03               ` Jan Beulich
2023-10-24  6:08                 ` Hu, Lin1
2023-10-23  3:07     ` [PATCH-V2] " Hu, Lin1
2023-10-23  3:30     ` [PATCH 5/8] [v2] " Hu, Lin1
2023-10-23  7:26       ` Jan Beulich
2023-09-19 15:25 ` [PATCH 6/8] Support APX Push2/Pop2 Cui, Lili
2023-09-28 11:37   ` Jan Beulich
2023-10-30 15:21     ` Cui, Lili
2023-10-30 15:31       ` Jan Beulich
2023-11-20 13:05         ` Cui, Lili
2023-09-19 15:25 ` [PATCH 7/8] Support APX NF Cui, Lili
2023-09-25  6:07   ` Jan Beulich
2023-09-28 12:42   ` Jan Beulich
2023-11-02 10:15     ` Cui, Lili
2023-11-02 10:23       ` Jan Beulich
2023-11-02 10:46         ` Cui, Lili
2023-12-12  2:59           ` H.J. Lu
2023-09-19 15:25 ` [PATCH 8/8] Support APX JMPABS Cui, Lili
2023-09-28 13:11   ` Jan Beulich
2023-11-02  2:32     ` Hu, Lin1

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=a14cf29d-5cdc-9070-c4ee-80c3aa4fa403@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).