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: hjl.tools@gmail.com, binutils@sourceware.org
Subject: Re: [PATCH 3/3] Support APX zero-upper
Date: Wed, 22 May 2024 08:21:17 +0200	[thread overview]
Message-ID: <4e246773-03e6-4c02-b0ef-fc4893322626@suse.com> (raw)
In-Reply-To: <20240520062202.1297234-4-lili.cui@intel.com>

On 20.05.2024 08:22, Cui, Lili wrote:
> gas/ChangeLog:

I did specifically ask for (at least) one thing to be added to the description
here. You put that in the cover letter, which means it'll not end up in the
eventual commit. Please put it here. And as before, please try to get used to
not, ever, submit patches without any description, unless the title alone
really describes it all (including e.g. implementation decisions taken). What
you ...

>         * config/tc-i386.c (build_apx_evex_prefix): Handle ZU.
>         * testsuite/gas/i386/x86-64.exp: Added new tests for ZU.
>         * testsuite/gas/i386/x86-64.exp: Added new tests for ZU.
>         * testsuite/gas/i386/x86-64-apx-zu-intel.d: New test.
>         * testsuite/gas/i386/x86-64-apx-zu-inval.l: Ditto.
>         * testsuite/gas/i386/x86-64-apx-zu-inval.s: Ditto.
>         * testsuite/gas/i386/x86-64-apx-zu.d: Ditto.
>         * testsuite/gas/i386/x86-64-apx-zu.s: Ditto.
> 
> opcodes/ChangeLog:
> 
>         * i386-dis-evex-prefix.h: Handle PREFIX_EVEX_MAP4_40 ~
>         PREFIX_EVEX_MAP4_4F.
>         * i386-dis-evex.h: Ditto.
>         * i386-dis.c (struct dis386): Add new micro 'ZU'.
>         (putop): Handle %ZU.
>         * i386-gen.c: Added ZU.
>         * i386-opc.h: Ditto.
>         * i386-opc.tbl: Added new templates to support ZU.

... mechanically put here is useful to see _what_ was changed, but it's
entirely unhelpful when one wants to understand _why_ things were done
(perhaps a certain way).

> @@ -10877,6 +10894,18 @@ putop (instr_info *ins, const char *in_template, int sizeflag)
>  	      abort ();
>  	    }
>  	  break;
> +	case 'U':
> +	  if (l == 1 && (last[0] == 'Z'))
> +	    {
> +	      /* Although IMUL/SETcc does not support NDD, the EVEX.ND bit is
> +		 used to control whether its destination register has its upper
> +		 bits zeroed when OSIZE is 16b/8b.  */
> +	      if (ins->vex.nd)
> +		oappend (ins, "zu");

I find in particular the OSIZE part of the comment somewhat misleading. For
SETcc operand size (irrespective of any further insn attributes like
[embedded] prefixes) is 8 bits. Nothing to say there at all in this regard.
And for IMUL while EVEX.ZU indeed has an effect for 16-bit operand size
only, what about the bit being set when operand size is 32 or 64 bits? If
the doc is to be trusted, the this is benign, and afaict you follow that by
emitting "zu" in such cases as well. Just that the comment suggests
otherwise.

Once again: Okay with respective adjustments.

Jan

  reply	other threads:[~2024-05-22  6:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-20  6:21 [PATCH 0/3] " Cui, Lili
2024-05-20  6:22 ` [PATCH 1/3] x86: Split REX/REX2 old registers judgment Cui, Lili
2024-05-21 12:18   ` Jan Beulich
2024-05-22  1:33     ` Cui, Lili
2024-05-22  5:49       ` Jan Beulich
2024-05-22  6:11         ` Cui, Lili
2024-05-22  6:22           ` Jan Beulich
2024-05-20  6:22 ` [PATCH 2/3] Add check for 8-bit old registers in EVEX format Cui, Lili
2024-05-21 12:24   ` Jan Beulich
2024-05-22  2:20     ` Cui, Lili
2024-05-20  6:22 ` [PATCH 3/3] Support APX zero-upper Cui, Lili
2024-05-22  6:21   ` Jan Beulich [this message]
2024-05-22  8:05     ` 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=4e246773-03e6-4c02-b0ef-fc4893322626@suse.com \
    --to=jbeulich@suse.com \
    --cc=binutils@sourceware.org \
    --cc=hjl.tools@gmail.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).