From: "Cui, Lili" <lili.cui@intel.com>
To: "Beulich, Jan" <JBeulich@suse.com>
Cc: "Lu, Hongjiu" <hongjiu.lu@intel.com>,
"ccoutant@gmail.com" <ccoutant@gmail.com>,
"binutils@sourceware.org" <binutils@sourceware.org>
Subject: RE: [PATCH 4/8] Add tests for APX GPR32 with extend evex prefix
Date: Thu, 16 Nov 2023 15:34:49 +0000 [thread overview]
Message-ID: <SJ0PR11MB56003BCEF7BD7A4F641CA8959EB0A@SJ0PR11MB5600.namprd11.prod.outlook.com> (raw)
In-Reply-To: <1df008d3-e651-4345-4a55-9486207b0a39@suse.com>
> > + vpcmpistri $100,(%r25),%xmm6
> > + vpcmpistrm $100,(%r25),%xmm6
> > + vpcmpeqb (%r26),%ymm6,%ymm2
> > + vpcmpeqw (%r16),%ymm6,%ymm2
> > + vpcmpeqd (%r26),%ymm6,%ymm2
> > + vpcmpeqq (%r16),%ymm6,%ymm2
> > + vpcmpgtb (%r26),%ymm6,%ymm2
> > + vpcmpgtw (%r16),%ymm6,%ymm2
> > + vpcmpgtd (%r26),%ymm6,%ymm2
> > + vpcmpgtq (%r16),%ymm6,%ymm2
>
> As an overall remark to this (and perhaps similar) test(s): It would be nice if
> there was some consistent sorting criteria applied throughout the test as
> whole or (here) the sub-sections (validly grouped by category). Without that
> it's needlessly hard to spot any omissions.
>
Re-sorted for each group.
> > --- /dev/null
> > +++ b/gas/testsuite/gas/i386/x86-64-apx-egpr-promote-inval.l
> > @@ -0,0 +1,16 @@
> > +.*: Assembler messages:
> > +.*:4: Error: `movbe' is not supported on `x86_64.nomovbe'
> > +.*:5: Error: `movbe' is not supported on `x86_64.nomovbe'
> > +.*:7: Error: `invept' is not supported on `x86_64.nomovbe.noept'
> > +.*:8: Error: `invept' is not supported on `x86_64.nomovbe.noept'
> > +.*:10: Error: `kmovq' is not supported on
> `x86_64.nomovbe.noept.noavx512bw'
> > +.*:11: Error: `kmovq' is not supported on
> `x86_64.nomovbe.noept.noavx512bw'
> > +.*:13: Error: `kmovb' is not supported on
> `x86_64.nomovbe.noept.noavx512bw.noavx512dq'
> > +.*:14: Error: `kmovb' is not supported on
> `x86_64.nomovbe.noept.noavx512bw.noavx512dq'
> > +.*:16: Error: `kmovw' is not supported on
> `x86_64.nomovbe.noept.noavx512bw.noavx512dq.noavx512f'
> > +.*:17: Error: `kmovw' is not supported on
> `x86_64.nomovbe.noept.noavx512bw.noavx512dq.noavx512f'
>
> Can the irrelevant middle parts of these .no* expecations please be omitted?
> The construction of these strings is in need of improvement, and it would be
> nice if testcases where the precise string doesn't matter would then not need
> touching. (This is a more general principle: Testcase expectations would
> better be only as specific as needed for what is under test. Certainly multiple
> aspects may be tested in one go, but quite commonly expecations are
> needlessly strict, and hence needlessly prone to breaking when unrelated
> changes are made somewhere in the code.)
>
Done.
> > --- /dev/null
> > +++ b/gas/testsuite/gas/i386/x86-64-apx-egpr-promote-inval.s
> > @@ -0,0 +1,17 @@
> > +# Check illegal 64bit APX EVEX promoted instructions
> > + .text
> > + .arch .nomovbe
> > + movbe (%r16), %r17
> > + movbe (%rax), %rcx
> > + .arch .noept
> > + invept (%r16), %r17
> > + invept (%rax), %rcx
> > + .arch .noavx512bw
> > + kmovq %k1, (%r16)
> > + kmovq %k1, (%r8)
> > + .arch .noavx512dq
> > + kmovb %k1, %r16d
> > + kmovb %k1, %r8d
> > + .arch .noavx512f
> > + kmovw %k1, %r16d
> > + kmovw %k1, %r8d
>
> What about BMI/BMI2 insns? Or AMX ones? (I surely missed further groups.)
>
We don’t want to list all the instructions here, just a few representatives.
> > --- /dev/null
> > +++ b/gas/testsuite/gas/i386/x86-64-apx-evex-promoted-bad.s
> > @@ -0,0 +1,29 @@
# Check Illegal prefix for 64bit EVEX-promoted instructions
.allow_index_reg
.text
_start:
#movbe %r18w,%ax set EVEX.pp = f3 (illegal value).
.byte 0x62, 0xfc, 0x7e, 0x08, 0x60, 0xc2
.byte 0xff, 0xff
#movbe %r18w,%ax set EVEX.pp = f2 (illegal value).
.byte 0x62, 0xfc, 0x7f, 0x08, 0x60, 0xc2
.byte 0xff, 0xff
#VSIB vpgatherqq 0x7b(%rbp,%zmm17,8),%zmm16{%k1} set EVEX.P[10] == 0
#(illegal value).
.byte 0x62, 0xe2, 0xf9, 0x41, 0x91, 0x84, 0xcd, 0x7b, 0x00, 0x00, 0x00
.byte 0xff
#EVEX_MAP4 movbe %r18w,%ax set EVEX.mm == b01 (illegal value).
.byte 0x62, 0xfd, 0x7d, 0x08, 0x60, 0xc2
.byte 0xff, 0xff
#EVEX_MAP4 movbe %r18w,%ax set EVEX.aa(P[17:16]) == b01 (illegal value).
.byte 0x62, 0xfd, 0x7d, 0x09, 0x60, 0xc2
.byte 0xff, 0xff
#EVEX_MAP4 movbe %r18w,%ax set EVEX.zL'L == b001 (illegal value).
.byte 0x62, 0xfd, 0x7d, 0x28, 0x60, 0xc2
.byte 0xff, 0xff
#EVEX from VEX ldtilecfg 0x123(%r31,%rax,4),%r31 EVEX.P[17:16](EVEX.aa) == 1 (illegal value).
.byte 0x62, 0xda, 0x7c, 0x09, 0x49, 0x84, 0x87, 0x23, 0x01, 0x00, 0x00
#EVEX from VEX ldtilecfg 0x123(%r31,%rax,4),%r31 EVEX.P[22:21](EVEX.L’L) == 1 (illegal value).
.byte 0x62, 0xda, 0x7c, 0x28, 0x49, 0x84, 0x87, 0x23, 0x01, 0x00, 0x00
#EVEX from VEX ldtilecfg 0x123(%r31,%rax,4),%r31 EVEX.P[20](EVEX.b) == 1 (illegal value).
.byte 0x62, 0xda, 0x7c, 0x18, 0x49, 0x84, 0x87, 0x23, 0x01, 0x00, 0x00
> I suspect at least some of these can be expressed via .insn, which would
> greatly help readability (i.e. recognizing what is actually being done, and
> what's expected-wrong about it).
>
Update test cases.
I try to express the first case using .insn. I can't find a way to express EVEX.P[3:2] == 11, do you have any ideas?
0x62, 0xfc ---> EVEX.P[3:2] of normal EVEX must be 00.
> Also - nit - there are again indentation inconsistencies here.
Done.
> > --- /dev/null
> > +++ b/gas/testsuite/gas/i386/x86-64-apx-evex-promoted.s
> > @@ -0,0 +1,322 @@
> > +# Check 64bit APX_F EVEX-Promoted instructions.
> > +
> > + .text
> > +_start:
> >[...]
> > +.intel_syntax noprefix
>
> Didn't you say you corrected directive indentation throughout the series?
>
Done.
> > + aadd DWORD PTR [r31+rax*4+0x123],r25d
> > + aadd QWORD PTR [r31+rax*4+0x123],r31
> > + aand DWORD PTR [r31+rax*4+0x123],r25d
> > + aand QWORD PTR [r31+rax*4+0x123],r31
> > + aesdec128kl xmm22,[r31+rax*4+0x123]
> > + aesdec256kl xmm22,[r31+rax*4+0x123]
> > + aesdecwide128kl [r31+rax*4+0x123]
> > + aesdecwide256kl [r31+rax*4+0x123]
> > + aesenc128kl xmm22,[r31+rax*4+0x123]
> > + aesenc256kl xmm22,[r31+rax*4+0x123]
> > + aesencwide128kl [r31+rax*4+0x123]
> > + aesencwide256kl [r31+rax*4+0x123]
> > + aor DWORD PTR [r31+rax*4+0x123],r25d
> > + aor QWORD PTR [r31+rax*4+0x123],r31
> > + axor DWORD PTR [r31+rax*4+0x123],r25d
> > + axor QWORD PTR [r31+rax*4+0x123],r31
> > + bextr r10d,edx,r25d
> > + bextr edx,DWORD PTR [r31+rax*4+0x123],r25d
> > + bextr r11,r15,r31
> > + bextr r15,QWORD PTR [r31+rax*4+0x123],r31
>
> Going just down to here (it extends throughout the Intel syntax part):
> Can there please also be cases where the xxx PTR is omitted from the
> memory operands? That doesn't mean there always need to be both forms,
> but there should be a fair mix. (I notice you have one such example with
> INVPCID below.)
>
Changed.
> >[...]
> > + crc32 r22,r31
> > + crc32 r22,QWORD PTR [r31]
> > + crc32 r17,r19b
> > + crc32 r21d,r19b
> > + crc32 ebx,BYTE PTR [r19]
> > + crc32 r23d,r31d
> > + crc32 r23d,DWORD PTR [r31]
> > + crc32 r21d,r31w
> > + crc32 r21d,WORD PTR [r31]
> > + crc32 r18,rax
>
> These could do with moving up, since otherwise things look to be sorted
> alphabetically here. But seeing these also reminds me that the noreg64 test
> also needs extending, to cover these new forms (handled by separate
> templates).
>
I'm confused here about adding crc test case in noreg64.s, could you elaborate on what testcase you want to add?
pfx crc32 (%rax), %eax
pfx16 crc32 (%rax), %rax
+ pfx crc32 (%r31),%r21d ---> data size prefix invalid with `crc32'
+ pfx crc32 (%r31),%r21 ---> data size prefix invalid with `crc32'
> > + kmovb k5,k3
>
> This (and its siblings) doesn't belong, here, does it? It continues to be VEX-
> encoded.
>
Done.
> > --- a/gas/testsuite/gas/i386/x86-64.exp
> > +++ b/gas/testsuite/gas/i386/x86-64.exp
> > @@ -360,8 +360,13 @@ run_dump_test "x86-64-avx512f-rcigrne-intel"
> > run_dump_test "x86-64-avx512f-rcigrne"
> > run_dump_test "x86-64-avx512f-rcigru-intel"
> > run_dump_test "x86-64-avx512f-rcigru"
> > -run_list_test "x86-64-apx-egpr-inval" "-al"
> > +run_list_test "x86-64-apx-egpr-inval"
>
> This should be put in its final shape right in patch 1; no need to touch it here
> again. (Else you'd need to mention the change in the ChangeLog
> entry.)
>
Done.
Thanks,
Lili.
next prev parent reply other threads:[~2023-11-16 15:35 UTC|newest]
Thread overview: 113+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-02 11:29 [PATCH v2 0/8] Support Intel APX EGPR Cui, Lili
2023-11-02 11:29 ` [PATCH 1/8] Support APX GPR32 with rex2 prefix Cui, Lili
2023-11-02 17:05 ` Jan Beulich
2023-11-03 6:20 ` Cui, Lili
2023-11-03 13:05 ` Jan Beulich
2023-11-03 14:19 ` Jan Beulich
2023-11-06 15:20 ` Cui, Lili
2023-11-06 16:08 ` Jan Beulich
2023-11-07 8:16 ` Cui, Lili
2023-11-07 10:43 ` Jan Beulich
2023-11-07 15:31 ` Cui, Lili
2023-11-07 15:43 ` Jan Beulich
2023-11-07 15:53 ` Cui, Lili
2023-11-06 15:02 ` Jan Beulich
2023-11-07 8:06 ` Cui, Lili
2023-11-07 10:20 ` Jan Beulich
2023-11-07 14:32 ` Cui, Lili
2023-11-07 15:08 ` Jan Beulich
2023-11-06 15:39 ` Jan Beulich
2023-11-09 8:02 ` Cui, Lili
2023-11-09 10:52 ` Jan Beulich
2023-11-09 13:27 ` Cui, Lili
2023-11-09 15:22 ` Jan Beulich
2023-11-10 7:11 ` Cui, Lili
2023-11-10 9:14 ` Jan Beulich
2023-11-10 9:21 ` Jan Beulich
2023-11-10 12:38 ` Cui, Lili
2023-12-14 10:13 ` Cui, Lili
2023-12-18 15:24 ` Jan Beulich
2023-12-18 16:23 ` H.J. Lu
2023-11-10 9:47 ` Cui, Lili
2023-11-10 9:57 ` Jan Beulich
2023-11-10 12:05 ` Cui, Lili
2023-11-10 12:35 ` Jan Beulich
2023-11-13 0:18 ` Cui, Lili
2023-11-02 11:29 ` [PATCH 2/8] Created an empty EVEX_MAP4_ sub-table for EVEX instructions Cui, Lili
2023-11-02 11:29 ` [PATCH 3/8] Support APX GPR32 with extend evex prefix Cui, Lili
2023-11-02 11:29 ` [PATCH 4/8] Add tests for " Cui, Lili
2023-11-08 9:11 ` Jan Beulich
2023-11-15 14:56 ` Cui, Lili
2023-11-16 9:17 ` Jan Beulich
2023-11-16 15:34 ` Cui, Lili [this message]
2023-11-16 16:50 ` Jan Beulich
2023-11-17 12:42 ` Cui, Lili
2023-11-17 14:38 ` Jan Beulich
2023-11-22 13:40 ` Cui, Lili
2023-11-02 11:29 ` [PATCH 5/8] Support APX NDD Cui, Lili
2023-11-08 10:39 ` Jan Beulich
2023-11-20 1:19 ` Cui, Lili
2023-11-08 11:13 ` Jan Beulich
2023-11-20 12:36 ` Cui, Lili
2023-11-20 16:33 ` Jan Beulich
2023-11-22 7:46 ` Cui, Lili
2023-11-22 8:47 ` Jan Beulich
2023-11-22 10:45 ` Cui, Lili
2023-11-23 10:57 ` Jan Beulich
2023-11-23 12:14 ` Cui, Lili
2023-11-24 6:56 ` [PATCH v3 0/9] Support Intel APX EGPR Cui, Lili
2023-12-07 8:17 ` Cui, Lili
2023-12-07 8:33 ` Cui, Lili
2023-11-09 9:37 ` [PATCH 5/8] Support APX NDD Jan Beulich
2023-11-20 1:33 ` Cui, Lili
2023-11-20 8:19 ` Jan Beulich
2023-11-20 12:54 ` Cui, Lili
2023-11-20 16:43 ` Jan Beulich
2023-11-02 11:29 ` [PATCH 6/8] Support APX Push2/Pop2 Cui, Lili
2023-11-08 11:44 ` Jan Beulich
2023-11-08 12:52 ` Jan Beulich
2023-11-22 5:48 ` Cui, Lili
2023-11-22 8:53 ` Jan Beulich
2023-11-22 12:26 ` Cui, Lili
2023-11-09 9:57 ` Jan Beulich
2023-11-02 11:29 ` [PATCH 7/8] Support APX NDD optimized encoding Cui, Lili
2023-11-09 10:36 ` Jan Beulich
2023-11-10 5:43 ` Hu, Lin1
2023-11-10 9:54 ` Jan Beulich
2023-11-14 2:28 ` Hu, Lin1
2023-11-14 10:50 ` Jan Beulich
2023-11-15 2:52 ` Hu, Lin1
2023-11-15 8:57 ` Jan Beulich
2023-11-15 2:59 ` [PATCH][v3] " Hu, Lin1
2023-11-15 9:34 ` Jan Beulich
2023-11-17 7:24 ` Hu, Lin1
2023-11-17 9:47 ` Jan Beulich
2023-11-20 3:28 ` Hu, Lin1
2023-11-20 8:34 ` Jan Beulich
2023-11-14 2:58 ` [PATCH 1/2] Reorder APX insns in i386.tbl Hu, Lin1
2023-11-14 11:20 ` Jan Beulich
2023-11-15 1:49 ` Hu, Lin1
2023-11-15 8:52 ` Jan Beulich
2023-11-17 3:27 ` Hu, Lin1
2023-11-02 11:29 ` [PATCH 8/8] Support APX JMPABS Cui, Lili
2023-11-09 12:59 ` Jan Beulich
2023-11-14 3:26 ` Hu, Lin1
2023-11-14 11:15 ` Jan Beulich
2023-11-24 5:40 ` Hu, Lin1
2023-11-24 7:21 ` Jan Beulich
2023-11-27 2:16 ` Hu, Lin1
2023-11-27 8:03 ` Jan Beulich
2023-11-27 8:46 ` Hu, Lin1
2023-11-27 8:54 ` Jan Beulich
2023-11-27 9:03 ` Hu, Lin1
2023-11-27 10:32 ` Jan Beulich
2023-12-04 7:33 ` Hu, Lin1
2023-11-02 13:22 ` [PATCH v2 0/8] Support Intel APX EGPR Jan Beulich
2023-11-03 16:42 ` Cui, Lili
2023-11-06 7:30 ` Jan Beulich
2023-11-06 14:20 ` Cui, Lili
2023-11-06 14:44 ` Jan Beulich
2023-11-06 16:03 ` Cui, Lili
2023-11-06 16:10 ` Jan Beulich
2023-11-07 1:53 ` Cui, Lili
2023-11-07 10:11 ` 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=SJ0PR11MB56003BCEF7BD7A4F641CA8959EB0A@SJ0PR11MB5600.namprd11.prod.outlook.com \
--to=lili.cui@intel.com \
--cc=JBeulich@suse.com \
--cc=binutils@sourceware.org \
--cc=ccoutant@gmail.com \
--cc=hongjiu.lu@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).