public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Haochen Jiang <haochen.jiang@intel.com>,
	konglin1 <lingling.kong@intel.com>
Cc: hjl.tools@gmail.com, amodra@gmail.com, binutils@sourceware.org
Subject: Re: [PATCH 1/5] Support Intel AVX-VNNI-INT16
Date: Thu, 13 Jul 2023 11:29:40 +0200	[thread overview]
Message-ID: <8ffc46cb-a949-5b78-12b6-9ee4161a9618@suse.com> (raw)
In-Reply-To: <20230713063303.205862-2-haochen.jiang@intel.com>

On 13.07.2023 08:32, Haochen Jiang wrote:
> @@ -3909,7 +3913,21 @@ static const struct dis386 prefix_table[][4] = {
>      { "vbcstnebf162ps", { XM, Mw }, 0 },
>      { "vbcstnesh2ps", { XM, Mw }, 0 },
>    },
> - 
> +  
> +  /* PREFIX_VEX_0F38D2 */

This and ...

> +  {
> +    { "vpdpwuud",	{ XM, Vex, EXx }, 0 },
> +    { "vpdpwsud",	{ XM, Vex, EXx }, 0 },
> +    { "vpdpwusd",	{ XM, Vex, EXx }, 0 },
> +  },
> +
> +  /* PREFIX_VEX_0F38D3 */

... this comment want to mention the correct enumerator names.

> --- a/opcodes/i386-gen.c
> +++ b/opcodes/i386-gen.c
> @@ -166,6 +166,8 @@ static const dependency isa_dependencies[] =
>      "AVX2" },
>    { "FRED",
>      "LKGS" },
> +  { "AVX_VNNI_INT16",
> +    "AVX2" },

Can this please be moved up ahead of FRED, perhaps immediately after
AVX_VNNI_INT8?

> @@ -366,6 +368,7 @@ static bitfield cpu_flags[] =
>    BITFIELD (RAO_INT),
>    BITFIELD (FRED),
>    BITFIELD (LKGS),
> +  BITFIELD (AVX_VNNI_INT16),

While not as relevant here, moving up would be nice in this case as well.

> --- a/opcodes/i386-opc.h
> +++ b/opcodes/i386-opc.h
> @@ -233,6 +233,8 @@ enum
>    CpuFRED,
>    /* lkgs instruction required */
>    CpuLKGS,
> +  /* Intel AVX VNNI-INT16 Instructions support required.  */
> +  CpuAVX_VNNI_INT16,
>    /* mwaitx instruction required */
>    CpuMWAITX,
>    /* Clzero instruction required */
> @@ -430,6 +432,7 @@ typedef union i386_cpu_flags
>        unsigned int cpurao_int:1;
>        unsigned int cpufred:1;
>        unsigned int cpulkgs:1;
> +      unsigned int cpuavx_vnni_int16:1;
>        unsigned int cpumwaitx:1;
>        unsigned int cpuclzero:1;
>        unsigned int cpuospke:1;

Adjustments to this file may then also be needed.

> --- a/opcodes/i386-opc.tbl
> +++ b/opcodes/i386-opc.tbl
> @@ -3364,3 +3364,14 @@ erets, 0xf20f01ca, FRED|x64, NoSuf, {}
>  eretu, 0xf30f01ca, FRED|x64, NoSuf, {}
>  
>  // FRED instructions end.
> +
> +// AVX_VNNI_INT16 instructions.
> +
> +vpdpwuud, 0xd2, AVX_VNNI_INT16, Modrm|Vex|Space0F38|VexVVVV|VexW0|CheckOperandSize|NoSuf, { RegXMM|RegYMM|Unspecified|BaseIndex, RegXMM|RegYMM, RegXMM|RegYMM }
> +vpdpwuuds, 0xd3, AVX_VNNI_INT16, Modrm|Vex|Space0F38|VexVVVV|VexW0|CheckOperandSize|NoSuf, { RegXMM|RegYMM|Unspecified|BaseIndex, RegXMM|RegYMM, RegXMM|RegYMM }
> +vpdpwusd, 0x66d2, AVX_VNNI_INT16, Modrm|Vex|Space0F38|VexVVVV|VexW0|CheckOperandSize|NoSuf, { RegXMM|RegYMM|Unspecified|BaseIndex, RegXMM|RegYMM, RegXMM|RegYMM }
> +vpdpwusds, 0x66d3, AVX_VNNI_INT16, Modrm|Vex|Space0F38|VexVVVV|VexW0|CheckOperandSize|NoSuf, { RegXMM|RegYMM|Unspecified|BaseIndex, RegXMM|RegYMM, RegXMM|RegYMM }
> +vpdpwsud, 0xf3d2, AVX_VNNI_INT16, Modrm|Vex|Space0F38|VexVVVV|VexW0|CheckOperandSize|NoSuf, { RegXMM|RegYMM|Unspecified|BaseIndex, RegXMM|RegYMM, RegXMM|RegYMM }
> +vpdpwsuds, 0xf3d3, AVX_VNNI_INT16, Modrm|Vex|Space0F38|VexVVVV|VexW0|CheckOperandSize|NoSuf, { RegXMM|RegYMM|Unspecified|BaseIndex, RegXMM|RegYMM, RegXMM|RegYMM }
> +
> +// AVX_VNNI_INT16 instructions end.

While purely cosmetic here, I think it is a bad habit to always add to
the bottom of the file. Not only does this result in related entries
sometimes being far apart, but it also increases the risk of conflicts
between patches. Therefore I'd like to ask to put this next to
AVX-VNNI-INT8 as well (and note the dashes used there, which you will
want to use here as well).

Okay with all of these adjustments. In case you disagree with any of
the requests, please submit a v2.

Jan

  reply	other threads:[~2023-07-13  9:29 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-13  6:32 [PATCH 0/5] Support Intel Arrow Lake/Lunar Lake ISAs Haochen Jiang
2023-07-13  6:32 ` [PATCH 1/5] Support Intel AVX-VNNI-INT16 Haochen Jiang
2023-07-13  9:29   ` Jan Beulich [this message]
2023-07-14  5:51     ` Jiang, Haochen
2023-07-13  6:33 ` [PATCH 2/5] Support Intel SHA512 Haochen Jiang
2023-07-13 10:02   ` Jan Beulich
2023-07-14  3:40     ` Jiang, Haochen
2023-07-14  7:12       ` Jan Beulich
2023-07-18  7:20         ` Jiang, Haochen
2023-07-18  7:54           ` [PATCH v2] " Haochen Jiang
2023-07-18  7:59             ` Jiang, Haochen
2023-07-18  8:51             ` Jan Beulich
2023-07-20  8:32               ` Jiang, Haochen
2023-07-20 10:37                 ` Jan Beulich
2023-07-20  8:32               ` [PATCH] " Haochen Jiang
2023-07-20 11:07                 ` [PATCH v3] " Jan Beulich
2023-07-27  5:52                   ` Jiang, Haochen
2023-07-18  8:11           ` [PATCH 2/5] " Jan Beulich
2023-07-13  6:33 ` [PATCH 3/5] Support Intel SM3 Haochen Jiang
2023-07-13 10:20   ` Jan Beulich
2023-07-18  8:09     ` [PATCH v2] " Haochen Jiang
2023-07-18  9:03       ` Jan Beulich
2023-07-24  2:54         ` Jiang, Haochen
2023-07-13  6:33 ` [PATCH 4/5] Support Intel SM4 Haochen Jiang
2023-07-13 10:25   ` Jan Beulich
2023-07-18  7:21     ` Jiang, Haochen
2023-07-18  8:13       ` [PATCH v2] " Haochen Jiang
2023-07-18  9:11         ` Jan Beulich
2023-07-13  6:33 ` [PATCH 5/5] Support Intel PBNDKB Haochen Jiang
2023-07-13 10:29   ` Jan Beulich
2023-07-14  7:15     ` Jiang, Haochen

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=8ffc46cb-a949-5b78-12b6-9ee4161a9618@suse.com \
    --to=jbeulich@suse.com \
    --cc=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=haochen.jiang@intel.com \
    --cc=hjl.tools@gmail.com \
    --cc=lingling.kong@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).