public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: "Cui, Lili" <lili.cui@intel.com>
Cc: Binutils <binutils@sourceware.org>, "Beulich, Jan" <JBeulich@suse.com>
Subject: Re: [PATCH] x86: Add {load}/{store} tests for apx instructions.
Date: Wed, 3 Jul 2024 12:01:40 +0800	[thread overview]
Message-ID: <CAMe9rOpAHNmdPhgDREYSgB+hO1E5_VsZFRqo-T-qPHSh6WJGTQ@mail.gmail.com> (raw)
In-Reply-To: <SJ0PR11MB5600251AF142A52F500123159EDD2@SJ0PR11MB5600.namprd11.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 2507 bytes --]

On Wed, Jul 3, 2024, 10:41 AM Cui, Lili <lili.cui@intel.com> wrote:

> > > On 02.07.2024 12:29, Cui, Lili wrote:
> > > >>>>>> Having reached the end of the file: What about CTESTcc and
> > CCMPcc?
> > > >>>>>>
> > > >>>>>
> > > >>>
> > > >>> When adding swap test cases for CTESTcc, I found that it does not
> > > >>> support
> > > >> swapping operands, but test, {evex} test and ctest template insns
> > > >> all have D, which does not match the SDM/APX spec, I want to remove
> > > >> D for them. I'm a bit unsure if there's any particular reason why
> > > >> the legacy test
> > > added D ?
> > > >>
> > > >> Did you look at the commit doing so?
> > > >>
> > > >
> > > > Ok, I found the commit this time, but I'm even more confused because
> > > > I
> > > didn't find the basis for the second test from SDM.
> > > >
> > > > -test, 0x84, None, 0, W|CheckRegSize|Modrm|No_sSuf, {
> > > > Reg8|Reg16|Reg32|Reg64,
> > > >
> > >
> > Reg8|Reg16|Reg32|Reg64|Unspecified|Byte|Word|Dword|Qword|BaseInde
> > > x }
> > > > -test, 0x84, None, 0, W|CheckRegSize|Modrm|No_sSuf, {
> > > > Byte|Word|Dword|Qword|Unspecified|BaseIndex,
> > > Reg8|Reg16|Reg32|Reg64 }
> > > > +test, 0x84, None, 0, D|W|C|CheckRegSize|Modrm|No_sSuf, {
> > > > +Reg8|Reg16|Reg32|Reg64,
> > > Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex
> > > > +}
> > >
> > > "basis for the second test"? What do you mean? Are you referring to
> > > the SDM spelling out only one operand order? That's surely a (very
> > > minor) shortcoming there. TEST is commutative, and hence whatever
> > > order the programmer likes should be accepted by an assembler.
> >
> > Yes, I only found "test %ax, (%bx)" and didn't find "test (%bx), %ax" in
> the
> > SDM. And APX spec also doesn’t say " ctest {def=} (%bx), %ax " is
> supported.
> > Anyway, their assemblers are same.
> > I will support "ctestb(%rax),%ecx" and "{evex} test(%rax),%ecx" in
> assembler,
> > currently "ctestb(%rax),%ecx" does not work, I need to fix it first.
> >
> $ cat test.s
> test (%edx), %eax
> test %eax, (%edx)
>
> $ as --64  test.s -o test.o
> $ objdump  -dw -Msuffix test.o
> 0000000000000000 <_start>:
>    0:   67 85 02                testl  %eax,(%edx)
>    3:   67 85 02                testl  %eax,(%edx)
>
> Hi HJ,
>
> Do you remember why we supported "test (%edx), %eax" in the original
> version? I'm curious about it.


I don't remember why.  I think we should follow SDM.


>
> Thanks,
> Lili.
>

  reply	other threads:[~2024-07-03  4:01 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-26 11:26 Cui, Lili
2024-06-28  6:31 ` Jan Beulich
2024-07-01 13:42   ` Cui, Lili
2024-07-01 14:25     ` Jan Beulich
2024-07-02  7:09       ` Cui, Lili
2024-07-02  8:22         ` Jan Beulich
2024-07-02 10:29           ` Cui, Lili
2024-07-02 12:15             ` Jan Beulich
2024-07-02 13:27               ` Cui, Lili
2024-07-03  2:41                 ` Cui, Lili
2024-07-03  4:01                   ` H.J. Lu [this message]
2024-07-03  6:52                     ` Jan Beulich
2024-07-03 12:17                       ` Cui, Lili
2024-07-03 12:24                         ` Jan Beulich
2024-07-03 12:40                           ` Cui, Lili
2024-07-02 11:55           ` Jan Beulich
2024-07-02 13:49             ` Cui, Lili
2024-07-02 14:24               ` Jan Beulich
2024-07-03  1:10                 ` Cui, Lili
2024-07-03  6:55                   ` Jan Beulich

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=CAMe9rOpAHNmdPhgDREYSgB+hO1E5_VsZFRqo-T-qPHSh6WJGTQ@mail.gmail.com \
    --to=hjl.tools@gmail.com \
    --cc=JBeulich@suse.com \
    --cc=binutils@sourceware.org \
    --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).