public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Tsukasa OI <research_trasio@irq.a4lg.com>
To: Philipp Tomsich <philipp.tomsich@vrull.eu>, jiawei@iscas.ac.cn
Cc: ben.marshall@pqshield.com, mjos@pqshield.com,
	siyu@isrc.iscas.ac.cn, cmuellner@ventanamicro.com,
	binutils@sourceware.org, schwab@linux-m68k.org,
	kito.cheng@sifive.com, jimw@sifive.com
Subject: Re: [PATCH v4 1/3] RISC-V: Minimal support of scalar crypto extension
Date: Mon, 21 Feb 2022 23:44:27 +0900	[thread overview]
Message-ID: <4e5c118b-ce03-88c8-b1ac-864af25c8bfd@irq.a4lg.com> (raw)
In-Reply-To: <CAAeLtUBHzft9XjxB+i0kxsnRvZLFxTmXF7Xi_wbwYY98+wPZkQ@mail.gmail.com>



On 2022/02/21 23:16, Philipp Tomsich wrote:
> On Mon, 21 Feb 2022 at 15:14, <jiawei@iscas.ac.cn> wrote:
>>
>>
>>
>>
>> &gt; -----原始邮件-----
>> &gt; 发件人: "Jan Beulich" <jbeulich@suse.com>
>> &gt; 发送时间: 2022-02-21 21:24:11 (星期一)
>> &gt; 收件人: jiawei <jiawei@iscas.ac.cn>
>> &gt; 抄送: kito.cheng@sifive.com, nelson.chu@sifive.com, jimw@sifive.com, philipp.tomsich@vrull.eu, mjos@pqshield.com, ben.marshall@pqshield.com, cmuellner@ventanamicro.com, palmer@dabbelt.com, andrew@sifive.com, lazyparser@gmail.com, siyu@isrc.iscas.ac.cn, schwab@linux-m68k.org, binutils@sourceware.org
>> &gt; 主题: Re: [PATCH v4 1/3] RISC-V: Minimal support of scalar crypto extension
>> &gt;
>> &gt; On 15.11.2021 04:03, jiawei wrote:
>> &gt; &gt; Minimal support of scalar crypto extension, add "k" in riscv_supported_std_ext[] to make the   order check right with "zk" behind "zb". "zbk*" is sub-extension for k-ext, so it added behind "zbs" in riscv_supported_std_z_ext[].
>> &gt; &gt; ---
>> &gt; &gt;  bfd/elfxx-riscv.c | 28 ++++++++++++++++++++++++++++
>> &gt; &gt;  1 file changed, 28 insertions(+)
>> &gt; &gt;
>> &gt; &gt; diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c
>> &gt; &gt; index 3ffbaad66dd..152fbe3d160 100644
>> &gt; &gt; --- a/bfd/elfxx-riscv.c
>> &gt; &gt; +++ b/bfd/elfxx-riscv.c
>> &gt; &gt; @@ -1075,6 +1075,20 @@ static struct riscv_implicit_subset riscv_implicit_subsets[] =
>> &gt; &gt;    {"q", "d",         check_implicit_always},
>> &gt; &gt;    {"d", "f",         check_implicit_always},
>> &gt; &gt;    {"f", "zicsr",     check_implicit_always},
>> &gt; &gt; +  {"zk", "zkn",      check_implicit_always},
>> &gt; &gt; +  {"zk", "zkr",      check_implicit_always},
>> &gt; &gt; +  {"zk", "zkt",      check_implicit_always},
>> &gt; &gt; +  {"zkn", "zbkb",    check_implicit_always},
>> &gt; &gt; +  {"zkn", "zbkc",    check_implicit_always},
>> &gt; &gt; +  {"zkn", "zbkx",    check_implicit_always},
>> &gt; &gt; +  {"zkn", "zkne",    check_implicit_always},
>> &gt; &gt; +  {"zkn", "zknd",    check_implicit_always},
>> &gt; &gt; +  {"zkn", "zknh",    check_implicit_always},
>> &gt; &gt; +  {"zks", "zbkb",    check_implicit_always},
>> &gt; &gt; +  {"zks", "zbkc",    check_implicit_always},
>> &gt; &gt; +  {"zks", "zbkx",    check_implicit_always},
>> &gt; &gt; +  {"zks", "zksed",   check_implicit_always},
>> &gt; &gt; +  {"zks", "zksh",    check_implicit_always},
>> &gt; &gt;    {NULL, NULL, NULL}
>> &gt; &gt;  };
>> &gt; &gt;
>> &gt; &gt; @@ -1127,6 +1141,7 @@ static struct riscv_supported_ext riscv_supported_std_ext[] =
>> &gt; &gt;    {"c",              ISA_SPEC_CLASS_20190608,        2, 0, 0 },
>> &gt; &gt;    {"c",              ISA_SPEC_CLASS_2P2,             2, 0, 0 },
>> &gt; &gt;    {"b",              ISA_SPEC_CLASS_NONE, RISCV_UNKNOWN_VERSION, RISCV_UNKNOWN_VERSION, 0 },
>> &gt; &gt; +  {"k",              ISA_SPEC_CLASS_NONE, RISCV_UNKNOWN_VERSION, RISCV_UNKNOWN_VERSION, 0 },
>> &gt;
>> &gt; May I ask what purpose this addition serves? Without its use enabling
>> &gt; smaller scope extensions implicitly, I find it at best unhelpful that
>> &gt; ".option arch, +k" is accepted without having any effect.
>> &gt;
>> &gt; Jan
>>
>> It's same like bitmanip extension, add this will make k extension as a subextension
>> and set it's canonical order as ISA spec defined.
> 
> Let me point out that this is not the same as with the
> bit-manipulation family of extensions.
> Zb[abcs] are all standalone extensions, and there is no Zb.
> 
> --Phil.

I agree.

But we cannot remove these now for a good reason.

This is because riscv_supported_std_ext is used to determine canonical
order of multi-letter extensions (starting with 'Z').  See
riscv_init_ext_order function (bfd/elfxx-riscv.c) for details.

Maybe we should make a marker (flag?) for "canonical order is determined
by this but not an actual extension".  This will apply to...

- "L"
- "B"
- "K"
- "J"
- "T"
- "P"
- "N"

Tsukasa

> 
>>
>> &gt;
>> &gt; &gt; @@ -1146,6 +1161,19 @@ static struct riscv_supported_ext riscv_supported_std_z_ext[] =
>> &gt; &gt;    {"zba",            ISA_SPEC_CLASS_DRAFT,           1, 0,  0 },
>> &gt; &gt;    {"zbc",            ISA_SPEC_CLASS_DRAFT,           1, 0,  0 },
>> &gt; &gt;    {"zbs",               ISA_SPEC_CLASS_DRAFT,           1, 0,  0 },
>> &gt; &gt; +  {"zbkb",           ISA_SPEC_CLASS_DRAFT,           1, 0,  0 },
>> &gt; &gt; +  {"zbkc",           ISA_SPEC_CLASS_DRAFT,           1, 0,  0 },
>> &gt; &gt; +  {"zbkx",           ISA_SPEC_CLASS_DRAFT,           1, 0,  0 },
>> &gt; &gt; +  {"zk",             ISA_SPEC_CLASS_DRAFT,           1, 0,  0 },
>> &gt; &gt; +  {"zkn",            ISA_SPEC_CLASS_DRAFT,           1, 0,  0 },
>> &gt; &gt; +  {"zknd",           ISA_SPEC_CLASS_DRAFT,           1, 0,  0 },
>> &gt; &gt; +  {"zkne",           ISA_SPEC_CLASS_DRAFT,           1, 0,  0 },
>> &gt; &gt; +  {"zknh",           ISA_SPEC_CLASS_DRAFT,           1, 0,  0 },
>> &gt; &gt; +  {"zkr",            ISA_SPEC_CLASS_DRAFT,           1, 0,  0 },
>> &gt; &gt; +  {"zks",            ISA_SPEC_CLASS_DRAFT,           1, 0,  0 },
>> &gt; &gt; +  {"zksed",  ISA_SPEC_CLASS_DRAFT,           1, 0,  0 },
>> &gt; &gt; +  {"zksh",           ISA_SPEC_CLASS_DRAFT,           1, 0,  0 },
>> &gt; &gt; +  {"zkt",            ISA_SPEC_CLASS_DRAFT,           1, 0,  0 },
>> &gt; &gt;    {NULL, 0, 0, 0, 0}
>> &gt; &gt;  };
>> &gt; &gt;
>> </jiawei@iscas.ac.cn></jbeulich@suse.com>
> 

  parent reply	other threads:[~2022-02-21 14:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-15  3:03 [PATCH v4 0/3] RISC-V: Support Scalar Cryptography extension jiawei
2021-11-15  3:03 ` [PATCH v4 1/3] RISC-V: Minimal support of scalar crypto extension jiawei
2022-02-21 13:24   ` Jan Beulich
2022-02-21 14:14     ` jiawei
2022-02-21 14:16       ` Philipp Tomsich
2022-02-21 14:25         ` Jan Beulich
2022-02-21 14:44         ` Tsukasa OI [this message]
2022-02-21 14:50           ` Kito Cheng
2021-11-15  3:03 ` [PATCH v4 2/3] RISC-V: Scalar crypto instructions and operand set jiawei
2022-01-04  8:04   ` Jan Beulich
2022-01-04  8:38     ` 陈嘉炜
2022-01-04  8:49       ` Jan Beulich
2022-01-04 13:13         ` Markku-Juhani O. Saarinen
2021-11-15  3:03 ` [PATCH v4 3/3] RISC-V: Scalar crypto instruction and Entropy Source CSR testcases jiawei
2021-12-21 16:06   ` Jan Beulich
2021-11-16  4:07 ` [PATCH v4 0/3] RISC-V: Support Scalar Cryptography extension Nelson Chu

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=4e5c118b-ce03-88c8-b1ac-864af25c8bfd@irq.a4lg.com \
    --to=research_trasio@irq.a4lg.com \
    --cc=ben.marshall@pqshield.com \
    --cc=binutils@sourceware.org \
    --cc=cmuellner@ventanamicro.com \
    --cc=jiawei@iscas.ac.cn \
    --cc=jimw@sifive.com \
    --cc=kito.cheng@sifive.com \
    --cc=mjos@pqshield.com \
    --cc=philipp.tomsich@vrull.eu \
    --cc=schwab@linux-m68k.org \
    --cc=siyu@isrc.iscas.ac.cn \
    /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).