public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "Cui, Lili" <lili.cui@intel.com>
Cc: hongjiu.lu@intel.com, binutils@sourceware.org
Subject: Re: [PATCH] Support APX NF
Date: Fri, 1 Mar 2024 08:04:52 +0100	[thread overview]
Message-ID: <7fdc0331-d26c-4e7c-933d-022a9ee870e1@suse.com> (raw)
In-Reply-To: <20240227090106.200134-1-lili.cui@intel.com>

On 27.02.2024 10:01, Cui, Lili wrote:
> @@ -1888,7 +1892,7 @@ static INLINE bool need_evex_encoding (const insn_template *t)
>    return i.encoding == encoding_evex
>  	|| i.encoding == encoding_evex512
>  	|| (t->opcode_modifier.vex && i.has_egpr)
> -	|| i.mask.reg;
> +	|| i.mask.reg || i.has_nf;
>  }

This, at least, can be avoided if ...

> @@ -7187,6 +7198,10 @@ parse_insn (const char *line, char *mnemonic, bool prefix_only)
>  		  /* {rex2} */
>  		  i.rex2_encoding = true;
>  		  break;
> +		case Prefix_NF:
> +		  /* {NF} */
> +		  i.has_nf = true;
> +		  break;

.. you suitably update i.encoding here.

Which reminds me of another aspect wanting testing: Either order of {nf}
and {vex} together wants proving that it is properly rejected. Note that
this is different from a programmer using both {vex} and {evex}, where
the latter simply overrides the earlier. (While this is reasonable
behavior imo, this isn't to say that this is the only way of reasonably
dealing with such. But that's the way things have been.)

> @@ -2619,25 +2622,25 @@ static const struct dis386 reg_table[][8] = {
>    },
>    /* REG_C0 */
>    {
> -    { "rolA",	{ VexGb, Eb, Ib }, NO_PREFIX },
> -    { "rorA",	{ VexGb, Eb, Ib }, NO_PREFIX },
> -    { "rclA",	{ VexGb, Eb, Ib }, NO_PREFIX },
> -    { "rcrA",	{ VexGb, Eb, Ib }, NO_PREFIX },
> -    { "shlA",	{ VexGb, Eb, Ib }, NO_PREFIX },
> -    { "shrA",	{ VexGb, Eb, Ib }, NO_PREFIX },
> -    { "shlA",	{ VexGb, Eb, Ib }, NO_PREFIX },
> -    { "sarA",	{ VexGb, Eb, Ib }, NO_PREFIX },
> +    { "%XNrolA",	{ VexGb, Eb, Ib }, NO_PREFIX },
> +    { "%XNrorA",	{ VexGb, Eb, Ib }, NO_PREFIX },
> +    { "%XNrclA",	{ VexGb, Eb, Ib }, NO_PREFIX },
> +    { "%XNrcrA",	{ VexGb, Eb, Ib }, NO_PREFIX },
> +    { "%XNshlA",	{ VexGb, Eb, Ib }, NO_PREFIX },
> +    { "%XNshrA",	{ VexGb, Eb, Ib }, NO_PREFIX },
> +    { "%XNshlA",	{ VexGb, Eb, Ib }, NO_PREFIX },
> +    { "%XNsarA",	{ VexGb, Eb, Ib }, NO_PREFIX },
>    },

Just to mention it, as it occurred to me only now: Switching to using
N here wouldn't be quite as straightforward as I first thought,
because of these and other table entries which are also used for
legacy encodings. That's not to say though that I withdraw that
suggestion - I still view it as wanting to at least consider.

Jan

  parent reply	other threads:[~2024-03-01  7:04 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-27  9:01 Cui, Lili
2024-02-28 16:11 ` H.J. Lu
2024-02-29  1:12   ` Cui, Lili
2024-02-29  6:53   ` Jan Beulich
2024-02-29  8:39     ` Cui, Lili
2024-02-29  9:06       ` Jan Beulich
2024-02-29 10:22         ` Cui, Lili
2024-02-29 12:23           ` H.J. Lu
2024-02-29 12:26             ` Cui, Lili
2024-02-29 11:21 ` Jan Beulich
2024-02-29 12:00   ` Cui, Lili
2024-02-29 12:04     ` Jan Beulich
2024-02-29 12:41       ` Cui, Lili
2024-02-29 13:17         ` Jan Beulich
2024-02-29 13:47           ` Cui, Lili
2024-02-29 14:12             ` Jan Beulich
2024-03-01  3:23               ` Cui, Lili
2024-03-01  6:56                 ` Jan Beulich
2024-03-01  8:01                   ` Cui, Lili
2024-03-01 11:36   ` Cui, Lili
2024-03-01 11:49     ` Jan Beulich
2024-03-01  7:04 ` Jan Beulich [this message]
2024-03-01 11:50   ` Cui, Lili
2024-03-19  6:41 Cui, Lili
2024-03-21 14:26 ` 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=7fdc0331-d26c-4e7c-933d-022a9ee870e1@suse.com \
    --to=jbeulich@suse.com \
    --cc=binutils@sourceware.org \
    --cc=hongjiu.lu@intel.com \
    --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).