public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Cui, Lili" <lili.cui@intel.com>
To: "Beulich, Jan" <JBeulich@suse.com>
Cc: "Lu, Hongjiu" <hongjiu.lu@intel.com>,
	"binutils@sourceware.org" <binutils@sourceware.org>
Subject: RE: [PATCH V2 3/8] Support APX GPR32 with extend evex prefix
Date: Thu, 9 Nov 2023 12:31:17 +0000	[thread overview]
Message-ID: <SJ0PR11MB5600393A73C481D08B6CEEA19EAFA@SJ0PR11MB5600.namprd11.prod.outlook.com> (raw)
In-Reply-To: <4aebadde-7cba-050e-d2eb-188d6216c566@suse.com>

> Subject: Re: [PATCH V2 3/8] Support APX GPR32 with extend evex prefix
> 
> On 03.11.2023 17:50, Cui, Lili wrote:
> > --- a/gas/testsuite/gas/i386/x86-64-inval-movbe.l
> > +++ b/gas/testsuite/gas/i386/x86-64-inval-movbe.l
> > @@ -1,29 +1,30 @@
> >  .*: Assembler messages:
> > -.*:4: Error: .*
> >  .*:5: Error: .*
> >  .*:6: Error: .*
> >  .*:7: Error: .*
> >  .*:8: Error: .*
> > -.*:11: Error: .*
> > +.*:9: Error: .*
> >  .*:12: Error: .*
> >  .*:13: Error: .*
> >  .*:14: Error: .*
> >  .*:15: Error: .*
> > +.*:16: Error: .*
> >  GAS LISTING .*
> >
> >
> >  [ 	]*1[ 	]+\# Check illegal movbe in 64bit mode\.
> >  [ 	]*2[ 	]+\.text
> > -[ 	]*3[ 	]+foo:
> > -[ 	]*4[ 	]+movbe	\(%rcx\),%bl
> > -[ 	]*5[ 	]+movbe	%ecx,%ebx
> > -[ 	]*6[ 	]+movbe	%bx,%rcx
> > -[ 	]*7[ 	]+movbe	%rbx,%rcx
> > -[ 	]*8[ 	]+movbe	%bl,\(%rcx\)
> > -[ 	]*9[ 	]+
> > -[ 	]*10[ 	]+\.intel_syntax noprefix
> > -[ 	]*11[ 	]+movbe bl, byte ptr \[rcx\]
> > -[ 	]*12[ 	]+movbe ebx, ecx
> > -[ 	]*13[ 	]+movbe rcx, bx
> > -[ 	]*14[ 	]+movbe rcx, rbx
> > -[ 	]*15[ 	]+movbe byte ptr \[rcx\], bl
> > +[ 	]*3[ 	]+\.arch \.noapx_f
> > +[ 	]*4[ 	]+foo:
> > +[ 	]*5[ 	]+movbe	\(%rcx\),%bl
> > +[ 	]*6[ 	]+movbe	%ecx,%ebx
> > +[ 	]*7[ 	]+movbe	%bx,%rcx
> > +[ 	]*8[ 	]+movbe	%rbx,%rcx
> > +[ 	]*9[ 	]+movbe	%bl,\(%rcx\)
> > +[ 	]*10[ 	]+
> > +[ 	]*11[ 	]+\.intel_syntax noprefix
> > +[ 	]*12[ 	]+movbe bl, byte ptr \[rcx\]
> > +[ 	]*13[ 	]+movbe ebx, ecx
> > +[ 	]*14[ 	]+movbe rcx, bx
> > +[ 	]*15[ 	]+movbe rcx, rbx
> > +[ 	]*16[ 	]+movbe byte ptr \[rcx\], bl
> 
> To avoid the need to fiddle with this file, did you consider changing the test's
> command line options instead? In any event ...
> 

Do you mean disabling apx_f with the command line "#as..."?  I tried "#as -march=+noapx_f" , but not worked.

> > --- a/gas/testsuite/gas/i386/x86-64-inval-movbe.s
> > +++ b/gas/testsuite/gas/i386/x86-64-inval-movbe.s
> > @@ -1,5 +1,6 @@
> >  # Check illegal movbe in 64bit mode.
> >  	.text
> > +	.arch .noapx_f
> >  foo:
> >  	movbe	(%rcx),%bl
> >  	movbe	%ecx,%ebx
> 
> ... the comment here wants expanding, to (briefly) mention the deliberate
> exclusion of APX.
> 

Done. 

> > --- a/opcodes/i386-dis-evex-len.h
> > +++ b/opcodes/i386-dis-evex-len.h
> > @@ -62,6 +62,16 @@ static const struct dis386 evex_len_table[][3] = {
> >      { REG_TABLE (REG_EVEX_0F38C7_L_2) },
> >    },
> >
> > +  /* EVEX_LEN_0F38F2 */
> > +  {
> > +    { "andnS",		{ Gdq, VexGdq, Edq }, 0 },
> > +  },
> 
> There's no sign of a prefix decode step here.
> 

The prefix decoding step is in the NF patch and its dependent patches (Part II 2/6). Both are suspended currently.

> > --- a/opcodes/i386-dis-evex-mod.h
> > +++ b/opcodes/i386-dis-evex-mod.h
> > @@ -1 +1,43 @@
> >  /* Nothing at present.  */
> 
> This comment needs to go away when new stuff is added here. However, I'm
> sure I requested before that no new entries be put here which have only one
> of their two slots populated. The reg-only and mem-only aspects can be
> expressed via proper choice of operand specifiers, at least in almost all cases.
> Note how you already use ...
> 
> > +  /* MOD_EVEX_MAP4_DA_PREFIX_1 */
> > +  {
> > +    { Bad_Opcode },
> > +    { "encodekey128", { Gd, Ed }, 0 },  },
> > +  /* MOD_EVEX_MAP4_DB_PREFIX_1 */
> > +  {
> > +    { Bad_Opcode },
> > +    { "encodekey256", { Gd, Ed }, 0 },  },
> > +  /* MOD_EVEX_MAP4_DC_PREFIX_1 */
> > +  {
> > +    { "aesenc128kl",    { XM, M }, 0 },
> > +  },
> > +  /* MOD_EVEX_MAP4_DD_PREFIX_1 */
> > +  {
> > +    { "aesdec128kl",    { XM, M }, 0 },
> > +  },
> > +  /* MOD_EVEX_MAP4_DE_PREFIX_1 */
> > +  {
> > +    { "aesenc256kl",    { XM, M }, 0 },
> > +  },
> > +  /* MOD_EVEX_MAP4_DF_PREFIX_1 */
> > +  {
> > +    { "aesdec256kl",    { XM, M }, 0 },
> > +  },
> > +  /* MOD_EVEX_MAP4_F8_PREFIX_1 */
> > +  {
> > +    { "enqcmds",	{ Gva, M },  0 },
> > +  },
> > +  /* MOD_EVEX_MAP4_F8_PREFIX_2 */
> > +  {
> > +    { "movdir64b",	{ Gva, M }, 0 },
> > +  },
> > +  /* MOD_EVEX_MAP4_F8_PREFIX_3 */
> > +  {
> > +    { "enqcmd",		{ Gva, M }, 0 },
> > +  },
> 
> ... M in many entries anyway. These can move one level up without needing
> further adjustment.
> 
> For all of the above, however, an EVEX.W decode step looks to be missing.
> Interestingly the doc consistently omits the (presumably) .W0 suffix for these,
> having merely a trailing dot there. The issue (doc and/or code) is present
> elsewhere as well.
> 

Do you mean that all EVEX promoted instructions need to be explicitly .W0 in the doc? in the case of, I'll handle it uniformly in get_valid_dis386.

Thanks,
Lili.


  reply	other threads:[~2023-11-09 12:31 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-03 16:50 Cui, Lili
2023-11-06 17:07 ` Jan Beulich
2023-11-13  5:53   ` Cui, Lili
2023-11-13  8:34     ` Jan Beulich
2023-11-14  3:12       ` Cui, Lili
2023-11-14 10:29         ` Jan Beulich
2023-11-15  8:39           ` Cui, Lili
2023-11-07 13:29 ` Jan Beulich
2023-11-09  8:38   ` Cui, Lili
2023-11-09 11:07     ` Jan Beulich
2023-11-09 11:12     ` Jan Beulich
2023-11-07 14:53 ` Jan Beulich
2023-11-09 12:31   ` Cui, Lili [this message]
2023-11-09 13:05     ` Jan Beulich
2023-11-09 14:57       ` Cui, Lili
2023-11-09 15:39         ` Jan Beulich
2023-11-14  7:42   ` Cui, Lili
2023-11-14 10:40     ` Jan Beulich
2023-11-14 14:46       ` Cui, Lili
2023-11-15  6:03   ` Cui, Lili
2023-11-15  9:11     ` Jan Beulich
2023-11-15 11:43       ` Cui, Lili
2023-11-16 13:57         ` Jan Beulich
2023-11-16 15:10           ` Cui, Lili
2023-11-16 15:15             ` Jan Beulich
2023-11-16 16:12           ` 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=SJ0PR11MB5600393A73C481D08B6CEEA19EAFA@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).