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: "binutils@sourceware.org" <binutils@sourceware.org>,
	"hjl.tools@gmail.com" <hjl.tools@gmail.com>
Subject: Re: [PATCH] Support {evex} pseudo prefix for decode evex promoted insns without egpr32.
Date: Wed, 20 Mar 2024 14:21:15 +0100	[thread overview]
Message-ID: <96e2e203-4778-444a-a13a-e35a48ce12ae@suse.com> (raw)
In-Reply-To: <SJ0PR11MB56009AFB64BDE7A058F009C69E332@SJ0PR11MB5600.namprd11.prod.outlook.com>

On 20.03.2024 14:12, Cui, Lili wrote:
>> On 06.03.2024 10:58, Cui, Lili wrote:
>>> --- /dev/null
>>> +++ b/gas/testsuite/gas/i386/noreg64-evex.s
>>
>> This separate test, not directly fitting with the patch title, wants mentioning in
>> the patch description.
>>
> 
> Ok.
> 
>>> @@ -0,0 +1,67 @@
>>> +# Check 64-bit insns not sizeable through register operands with evex
>>> +	.text
>>> +	{evex} adc	$1, (%rax)
>>> +	{evex} adc	$0x89, (%rax)
>>> +	{evex} adc	$0x1234, (%rax)
>>> +	{evex} adc	$0x12345678, (%rax)
>>> +	{evex} add	$1, (%rax)
>>> +	{evex} add	$0x89, (%rax)
>>> +	{evex} add	$0x1234, (%rax)
>>> +	{evex} add	$0x12345678, (%rax)
>>> +	{evex} and	$1, (%rax)
>>> +	{evex} and	$0x89, (%rax)
>>> +	{evex} and	$0x1234, (%rax)
>>> +	{evex} and	$0x12345678, (%rax)
>>> +	{evex} crc32	(%rax), %eax
>>
>> noreg64.s tests %rax as a destination separately, for a reason.
> 
> I don't know the reason why noreg64.s uses %rax, so it just follows the previous style. Do you know why? Is it not necessary to keep using %rax in the current test file?

It's unclear whether your question is specific to this one line/insn or more
generic. Since my remark was specific to CRC32, I'll assume your question is,
too. In which case: The non-64-bit and 64-bit forms of CRC32 use distinct
insn templates. Both want testing. Hence why two insn forms are needed here.

>>> --- /dev/null
>>> +++ b/gas/testsuite/gas/i386/x86-64-apx_f-evex.s
>>> @@ -0,0 +1,1192 @@
>>> +# Check 64bit APX_F instructions with evex pseudo prefix
>>> +
>>> +	{evex}	imul	%r15
>>> +	{evex}	imul	%r15,%r15
>>> +	{evex}	imul	%r15d
>>> +	{evex}	imul	%r15d,%edx
>>> +	{evex}	imul	%r15w
>>> +	{evex}	imul	%r15w,%ax
>>> +	{evex}	imul	%r8b
>>> +	{evex}	imulb	0x123(%r8,%rax,4)
>>> +	{evex}	imulw	0x123(%r8,%rax,4)
>>> +	{evex}	imull	0x123(%r8,%rax,4)
>>> +	{evex}	imul	0x123(%r8,%rax,4),%r15
>>> +	{evex}	imul	0x123(%r8,%rax,4),%r15d
>>> +	{evex}	imul	0x123(%r8,%rax,4),%r15w
>>> +	{evex}	imulq	0x123(%r8,%rax,4)
>>> +	{evex}	imul	$0x7b, %dx, %ax
>>> +	{evex}	imul	$0x7b, %ecx, %edx
>>> +	{evex}	imul	$0x7b, %r9, %r15
>>> +	{evex}	imul	$0x7b, 291(%r8, %rax, 4), %dx
>>> +	{evex}	imul	$0x7b, 291(%r8, %rax, 4), %ecx
>>> +	{evex}	imul	$0x7b, 291(%r8, %rax, 4), %r9
>>> +	{evex}	imul	$0xff90, %dx, %ax
>>> +	{evex}	imul	$0xff90, %ecx, %edx
>>> +	{evex}	imul	$0xff90, %r9, %r15
>>> +	{evex}	imul	$0xff90, 291(%r8, %rax, 4), %dx
>>> +	{evex}	imul	$0xff90, 291(%r8, %rax, 4), %ecx
>>> +	{evex}	imul	$0xff90, 291(%r8, %rax, 4), %r9
>>
>> Also covering the 2-operand forms of these (srcreg == dstreg) would seem
>> desirable.
> 
> I'm a little confused here, do you suggest adding such a testcase?
> 
> {evex}	imul	$0x7b, %r9, %r9

That's still 3 operands. What I mean is

    {evex} imul $0x7b, %r9

, again for the reason of that being covered by a separate insn template.

Jan

  reply	other threads:[~2024-03-20 13:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-06  9:58 Cui, Lili
2024-03-08 10:37 ` Jan Beulich
2024-03-20 13:12   ` Cui, Lili
2024-03-20 13:21     ` Jan Beulich [this message]
2024-03-21 12:33       ` Cui, Lili
2024-03-22  9:45   ` 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=96e2e203-4778-444a-a13a-e35a48ce12ae@suse.com \
    --to=jbeulich@suse.com \
    --cc=binutils@sourceware.org \
    --cc=hjl.tools@gmail.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).