From: "Cui, Lili" <lili.cui@intel.com>
To: "Beulich, Jan" <JBeulich@suse.com>, "Lu, Hongjiu" <hongjiu.lu@intel.com>
Cc: "binutils@sourceware.org" <binutils@sourceware.org>
Subject: RE: [PATCH v4 4/9] Add tests for APX GPR32 with extend evex prefix
Date: Fri, 5 Jan 2024 06:58:37 +0000 [thread overview]
Message-ID: <SJ0PR11MB560060418B5BA3FAEB76B1969E662@SJ0PR11MB5600.namprd11.prod.outlook.com> (raw)
In-Reply-To: <9c55e272-e775-4b7a-a379-fcef6b5c8388@suse.com>
> >>> + vroundpd $1,(%r24),%xmm6
> >>> + vroundps $2,(%r24),%xmm6
> >>> + vroundsd $3,(%r24),%xmm6,%xmm3
> >>> + vroundss $4,(%r24),%xmm6,%xmm3
> >>
> >> These are still here, when they can be expressed.
> >
> > I think we should keep it until we complete a reasonably equivalent
> replacement.
>
> This replacement should have been introduced in this series, as asked for more
> than once. And, H.J., I think you shouldn't have approved this patch (and
> more generally any one) with unaddressed review comments.
>
We have different opinion for this part. Currently under discussion.
> >>> --- /dev/null
> >>> +++ b/gas/testsuite/gas/i386/x86-64-apx-evex-promoted-bad.s
> >>> @@ -0,0 +1,34 @@
> >>> +# Check Illegal prefix for 64bit EVEX-promoted instructions
> >>> +
> >>> + .allow_index_reg
> >>> + .text
> >>> +_start:
> >>> + #movbe %r23w,%ax set EVEX.pp = f3 (illegal value).
> >>> + .insn EVEX.L0.f3.M12.W0 0x60, %di, %ax
> >>> + #movbe %r23w,%ax set EVEX.pp = f2 (illegal value).
> >>> + .insn EVEX.L0.f2.M12.W0 0x60, %di, %ax
> >>> + #VSIB vpgatherqq (%rbp,%zmm17,8),%zmm16{%k1} set EVEX.P[10]
> >> == 0
> >>> + #(illegal value).
> >>> + .byte 0x62, 0xe2, 0xf9, 0x41, 0x91, 0x84, 0xcd
> >>> + .byte 0xff
> >>
> >> This one's still using .byte and still referencing P[10] in the comment.
> >> If that's really unavoidable, then - as elsewhere - the description
> >> of the patch could (and should) provide the reason. And there
> >> continue to be no separating blank lines, making it as hard as before
> >> to find ones way through all of this.
> >>
> >
> > Copied from the previous comments,
> > ----------------------------------------------------------------------
> > --
> >>>> + #(illegal value).
> >>>> + .byte 0x62, 0xe2, 0xf9, 0x41, 0x91, 0x84, 0xcd, 0x7b, 0x00, 0x00,
> 0x00
> >>>> + .byte 0xff
> >>>
> >>> For the purpose of this test (whatever P[10] again is) you don't
> >>> need a 32-bit displacement, do you? Shorter is (almost always) better in
> such tests.
> >>>
> >>
> >> P[10] is a fixed value, in normal EVEX format we don't use this bit. Dropped
> 0x7b.
> > ----------------------------------------------------------------------
> > --
>
> This is not addressing my comment. Iirc all bit in the EVEX prefix have names
> now in SDM plus APX spec, and hence they should preferably be referred to by
> their names rather than their bit positions. Plus there's still no justification for
> using .byte instead of .insn.
>
I will add EVEX.X4 to it, but for using .insn instead of .byte, I think the current .insn does not support the new EVEX format, I don't know how to express the fixed value P[10] with .insn, maybe you have some good suggestions.f
(insn is really hard to use, I admit it has advantages for some test expressions, but I don't think it works for all).
> >>> + .insn EVEX.L0.66.M12.W0 0x60, %di, %ax{%k1}
> >>> + #EVEX_MAP4 movbe %r18w,%ax set EVEX.L'L == 0b01 (illegal value).
> >>> + .insn EVEX.L1.66.M12.W0 0x60, %di, %ax
> >>> + #EVEX_MAP4 movbe %r18w,%ax set EVEX.z == 0b1 (illegal value).
> >>> + .insn EVEX.L0.66.M12.W0 0x60, %di, %ax {%k7}{z}
> >>> + #EVEX from VEX bzhi %rax,(%rax,%rbx),%rcx EVEX.P[17:16](EVEX.aa)
> >> == 0b01
> >>> + #(illegal value).
> >>> + .insn EVEX.L0.NP.0f38.W0 0xf5, %rax, (%rax,%rbx), %rcx{%k1}
> >>> + #EVEX from VEX bzhi %rax,(%rax,%rbx),%ecx EVEX.P[22:21](EVEX.L’L)
> >> == 0b01
> >>> + #(illegal value).
> >>> + .insn EVEX.L1.NP.0f38.W0 0xf5, %rax, (%rax,%rbx), %rcx
> >>> + #EVEX from VEX bzhi %rax,(%rax,%rbx),%rcx EVEX.P[23](EVEX.z) ==
> >> 0b1
> >>> + #(illegal value).
> >>> + .insn EVEX.L0.NP.0f38.W0 0xf5, %rax, (%rax,%rbx), %rcx
> >>> +{%k7}{z}
> >>
> >> Isn't {%k7} alone rendering the encoding invalid, which was checked
> >> for above already? Also - bogus indentation again.
> >>
> >
> > That is for legacy, this is for vex.
>
> What is "that" here? And how can anything with operand mask applied be
> VEX? The more that .insn's operand says EVEX? Here you want to set _only_
> EVEX.z, without EVEX.aaa being non-zero.
>
These two test cases, one is for evex form legacy, another is for evex from vex.
#EVEX_MAP4 movbe %r18w,%ax set EVEX.z == 0b1.
.insn EVEX.L0.66.M12.W0 0x60, %di, %ax{k7}{z}
#EVEX from VEX bzhi %rax,(%rax,%rbx),%rcx EVEX.P[23](EVEX.z) == 0b1
.insn EVEX.L0.NP.0f38.W1 0xf5, %rax, (%rax,%rbx), %rcx {%k7}{z}
If I just put {z} here, I will get the error: "Only write masking is allowed for clear masking.". So, I had to add {k7}
Lili.
next prev parent reply other threads:[~2024-01-05 6:58 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-19 12:12 [PATCH v4 0/9] Support Intel APX EGPR Cui, Lili
2023-12-19 12:12 ` [PATCH v4 1/9] Support APX GPR32 with rex2 prefix Cui, Lili
2023-12-22 13:08 ` Jan Beulich
2023-12-25 6:14 ` Cui, Lili
2024-01-04 8:57 ` Jan Beulich
2023-12-19 12:12 ` [PATCH v4 2/9] Created an empty EVEX_MAP4_ sub-table for EVEX instructions Cui, Lili
2023-12-19 12:12 ` [PATCH v4 3/9] Support APX GPR32 with extend evex prefix Cui, Lili
2023-12-22 13:49 ` Jan Beulich
2023-12-25 12:23 ` Cui, Lili
2024-01-04 9:08 ` Jan Beulich
2024-01-04 12:32 ` Cui, Lili
2024-01-04 12:55 ` Jan Beulich
2023-12-22 14:19 ` Jan Beulich
2023-12-26 7:00 ` Cui, Lili
2024-01-04 9:01 ` Jan Beulich
2024-01-04 12:47 ` Cui, Lili
2023-12-19 12:12 ` [PATCH v4 4/9] Add tests for " Cui, Lili
2023-12-22 14:41 ` Jan Beulich
2023-12-25 13:40 ` Cui, Lili
2024-01-04 9:16 ` Jan Beulich
2024-01-05 6:58 ` Cui, Lili [this message]
2023-12-19 12:12 ` [PATCH v4 5/9] Support APX NDD Cui, Lili
2023-12-19 12:12 ` [PATCH v4 6/9] Support APX Push2/Pop2 Cui, Lili
2023-12-19 12:12 ` [PATCH v4 7/9] Support APX PUSHP/POPP Cui, Lili
2023-12-19 12:12 ` [PATCH v4 `8/9] Support APX NDD optimized encoding Cui, Lili
2023-12-19 12:12 ` [PATCH v4 9/9] Support APX JMPABS for disassembler Cui, Lili
2023-12-19 12:35 ` [PATCH v4 0/9] Support Intel APX EGPR Jan Beulich
2023-12-20 8:50 ` Cui, Lili
2023-12-20 8:57 ` Jan Beulich
2023-12-20 10:42 ` Cui, Lili
2023-12-20 11:00 ` Jan Beulich
2023-12-20 11:50 ` Cui, Lili
2023-12-20 12:01 ` Jan Beulich
2023-12-20 12:16 ` 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=SJ0PR11MB560060418B5BA3FAEB76B1969E662@SJ0PR11MB5600.namprd11.prod.outlook.com \
--to=lili.cui@intel.com \
--cc=JBeulich@suse.com \
--cc=binutils@sourceware.org \
--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).