[PATCH] x86/APX: INV{EPT,PCID,VPID} are WIG

Cui, Lili lili.cui@intel.com
Tue Feb 20 07:46:30 GMT 2024


> On 18.02.2024 05:06, Cui, Lili wrote:
> >> While various other entries in version 003 of the spec aren't quite
> >> as explicit (due to simply leaving the respective field blank), all
> >> three have a clear IGNORED there. IOW they ought to be emitted with
> >> EVEX.W=0 by default (and respect -mevexwig=).
> >> ---
> >> For those other insns (at least SHA* and KeyLocker ones) likely
> >> VexWIG is also missing. But the spec needs clarifying first;
> >> respective testcase expectations are added here with '.' instead of a
> >> specific digit. Yet more issues exist, but those cannot simply be dealt with by
> adding VexWIG in the opcode table.
> >>
> >
> > Jan, I have a question, are these valid test cases? After adding "-
> mevexwig=1", all test results look the same as x86-64-apx-evex-promoted.d
> without any changes.
> 
> Did you look at merely the decoded insns and their operands? They ought to
> be identifcal. The difference is only visible in the hex encodings, e.g. ...
> 
> >> --- /dev/null
> >> +++ b/gas/testsuite/gas/i386/x86-64-apx-evex-promoted-wig.d
> >> @@ -0,0 +1,329 @@
> >> +#as: -mevexwig=1
> >> +#objdump: -dw
> >> +#name: x86_64 APX_F EVEX-Promoted insns w/ -mevexwig=1
> >> +#source: x86-64-apx-evex-promoted.s
> >> +
> >> +.*: +file format .*
> >> +
> >> +Disassembly of section \.text:
> >> +
> >> +[	 ]*[a-f0-9]+:[	 ]*62 4c fe 08 f0 bc 87 23 01 00 00[	 ]+invept[
> >> 	 ]+0x123\(%r31,%rax,4\),%r31
> >> +[	 ]*[a-f0-9]+:[	 ]*62 4c fe 08 f2 bc 87 23 01 00 00[	 ]+invpcid[
> >> 	 ]+0x123\(%r31,%rax,4\),%r31
> >> +[	 ]*[a-f0-9]+:[	 ]*62 4c fe 08 f1 bc 87 23 01 00 00[	 ]+invvpid[
> >> 	 ]+0x123\(%r31,%rax,4\),%r31
> 
> ... for these three: EVEX.W is now set, when it's clear in the test without the -
> mevexwig=1. As said in the remark, the use of . where the spec doesn't clearly
> state how EVEX.W is treated is intentional.
> 

Well, you also changed the .d files of these three instructions. I used the current trunk for comparison, so missed the difference in this place. Although I think most of the test cases are not very targeted, there are still three testcases with different results that can see the effect of -mevexwig=1. Thanks.

Lili.


More information about the Binutils mailing list