Message ID | 20231206024524.10792-1-wangfeng@eswincomputing.com |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp3845895vqy; Tue, 5 Dec 2023 18:46:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IHSE0bd/zVCKZ5T6DIk9qAO4tBPk//nQrqVSAirrNOhW3MQv27t4+per428JroSd4QbDtQv X-Received: by 2002:a1f:e384:0:b0:4b2:ccfb:81de with SMTP id a126-20020a1fe384000000b004b2ccfb81demr245946vkh.22.1701830811491; Tue, 05 Dec 2023 18:46:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701830811; cv=pass; d=google.com; s=arc-20160816; b=avorVcrZWhO+HgHTsEeRNjMmRWqZakVxN8Y9Y4ekXA0FJZQP8SY00iOnA4aAqjplNP leEBGnlzUb743wjubVqD47oxtJxHy9dfu4YIbnh8qIiJcIucjpXY3A6eJwDZTkdvpzcy 7Ha8IIQACLcX9F6mZAeos1eFHG3do/9BvyIAmBn4WFSsE+PO4d5SrhNg5bQ5ImmpJ8zd V1veL6mW8pGPHWx9BibClzc4wbBTTossApwXH8AcLtMjN6Ec3NXanC3/pO5RZKTlLKJe 9FMMv4LkEq1YQcD1uEAisM85mT6j55Qs8IFJksjPceAPItOsAmJCp++zizo3Twcut/vT L4Aw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:message-id:date:subject:cc:to :from:arc-filter:dmarc-filter:delivered-to; bh=GngiNWuXAWkhzkwEIuhbJ3FztlEXFUzkgDqC+gjFcto=; fh=LD/eg044r5myWG9+PuCx38QZOcH49ea16O/aCRBQ/Gk=; b=feg2SJxcQoPZaIHQrG+2eyTXXOSY8dZbvKn22zsBzkNEes6uVnTCQ1a5XQda9yMhMt 4Jt5LcLiPwwSOALxcdLgbZcMppr0MO+z18VngNQ/c2fEDg5Vc9Ax1A6Wtp57cBlc90p0 AV4Z9gv/7WkCwUM7SzGPJ+oaROYV79uKv5HFeIsfQBNDrlNCN4C0nYCwvioAOJStGcXY YDp9i+HxJtpXmZ3jQDo4RK/T/zIy6GpPLuxSsXpFKBJmf4gTi60SBkZAn9/t2Ggc7DW7 kO3nTl+T7RNGZtlOAKzOj9tqA5kp78SW9lVQ9gCD+yBzKMT20rF2BtfIR3vCAPr2cGjE HO6w== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id u10-20020a0cea4a000000b0067aa7935880si8959714qvp.489.2023.12.05.18.46.51 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 18:46:51 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EFA2A3845BD6 for <ouuuleilei@gmail.com>; Wed, 6 Dec 2023 02:46:50 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from zg8tmja2lje4os4yms4ymjma.icoremail.net (zg8tmja2lje4os4yms4ymjma.icoremail.net [206.189.21.223]) by sourceware.org (Postfix) with ESMTP id 6DA8E3858289 for <gcc-patches@gcc.gnu.org>; Wed, 6 Dec 2023 02:46:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6DA8E3858289 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=eswincomputing.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=eswincomputing.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6DA8E3858289 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=206.189.21.223 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701830787; cv=none; b=oFZdNRBHttxuzRiJhC2Z5nL7hP1NQTv/f+vx1SvZtxNBc51zazcS9iBucePZmuUB9Gc1BjTUNbMceBXoAnVq9rs0UczrZkhEkVuKosUNRwjRRF/wHlgrQ0bQ4brM22AJoZbc+/J9l2Lh67NTQcYuC853XuJWxUQmvUNjow2dojc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701830787; c=relaxed/simple; bh=5pP5svK45dh2kuQ1VBoH1Km7j4+mSssNMrvEWSxgLe0=; h=From:To:Subject:Date:Message-Id; b=IXCyZMCn7m6GN6AW+wJNgmPVpiq7ZR0Vg+xk0qhMOu0K5l2gi4Fe2XGX8n37NAVfH1sPS8g6ysdS4cAjhvJnD5YQ9fML+UXWGbJ9tjSZ97Qn2VrBD6LvxjG3UlM2uKiMZv0DRrxUNRDnowhlFgffqJ3jCPI3UZ3o96SqVvAMHwc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from localhost.localdomain (unknown [10.12.130.31]) by app2 (Coremail) with SMTP id TQJkCgAnttQ54G9llmIAAA--.5861S4; Wed, 06 Dec 2023 10:45:14 +0800 (CST) From: Feng Wang <wangfeng@eswincomputing.com> To: gcc-patches@gcc.gnu.org Cc: kito.cheng@gmail.com, jeffreyalaw@gmail.com, juzhe.zhong@rivai.ai, zhusonghe@eswincomputing.com, panciyan@eswincomputing.com, Feng Wang <wangfeng@eswincomputing.com> Subject: [PATCH 1/4] RISC-V: Add crypto vector implied ISA info. Date: Wed, 6 Dec 2023 02:45:21 +0000 Message-Id: <20231206024524.10792-1-wangfeng@eswincomputing.com> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: TQJkCgAnttQ54G9llmIAAA--.5861S4 X-Coremail-Antispam: 1UD129KBjvdXoW7Gryftw4Dur4DZrWfWr4fGrg_yoWDJFc_Cr WjgFsFqr4DJa95tFyDXr4YgrWrA3yrJ34xG34xtwnF9w1UZrW3Awn8tFs3Jw48ur98J3Zr Ar4fXF1ayr1UtjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb28FF20E14v26r4j6ryUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_tr0E3s1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr1j 6F4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AKxVW0oV Cq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0 I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r 4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwCY02Avz4vE-syl42xK 82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGw C20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r126r1DMIIYrxkI7VAKI48J MIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMI IF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E 87Iv6xkF7I0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x0JUdHUDUUUUU= X-CM-SenderInfo: pzdqwwxhqjqvxvzl0uprps33xlqjhudrp/ X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784498944620490154 X-GMAIL-MSGID: 1784498944620490154 |
Series |
[1/4] RISC-V: Add crypto vector implied ISA info.
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Feng Wang
Dec. 6, 2023, 2:45 a.m. UTC
Due to the crypto vector entension is depend on the Vector extension, so the "v" info is added into implied ISA info with the corresponding crypto vector extension. gcc/ChangeLog: * common/config/riscv/riscv-common.cc: Add "v" into implied ISA info. --- gcc/common/config/riscv/riscv-common.cc | 9 +++++++++ 1 file changed, 9 insertions(+)
Comments
On 2023/12/06 11:45, Feng Wang wrote: > Due to the crypto vector entension is depend on the Vector extension, > so the "v" info is added into implied ISA info with the corresponding > crypto vector extension. Hi Feng, It's true that vector crypto extensions are based on the vector extension but it *does not* mean that it requires full the 'V' extension. Vector crypto extensions also consider about embedded processors where VLEN < 128. Quoting the documentation: > The Zvknhb and Zvbc Vector Crypto Extensions --and accordingly the composite extensions Zvkn > and Zvks-- require a Zve64x base, or application ("V") base Vector Extension. > > All of the other Vector Crypto Extensions can be built on any embedded (Zve*) or application ("V") > base Vector Extension. So, correct dependencies to add are like follows: > + {"zvbb", "zvkb"}, > + {"zvbc", "zve64x"}, > + {"zvkb", "zve32x"}, > + {"zvkg", "zve32x"}, > + {"zvkned", "zve32x"}, > + {"zvknha", "zve32x"}, > + {"zvknhb", "zve64x"}, > + {"zvksed", "zve32x"}, > + {"zvksh", "zve32x"}, Note that 'V' indirectly depends on both 'Zve32x' and 'Zve64x' so this would be fine to represent "or application ('V')" part quoted above. Also, consider adding those dependencies to the Python script gcc/config/riscv/arch-canonicalize. Thanks, Tsukasa > > gcc/ChangeLog: > > * common/config/riscv/riscv-common.cc: Add "v" into implied ISA info. > --- > gcc/common/config/riscv/riscv-common.cc | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc > index 6c210412515..dbb42ca2f1e 100644 > --- a/gcc/common/config/riscv/riscv-common.cc > +++ b/gcc/common/config/riscv/riscv-common.cc > @@ -120,6 +120,15 @@ static const riscv_implied_info_t riscv_implied_info[] = > {"zvksc", "zvbc"}, > {"zvksg", "zvks"}, > {"zvksg", "zvkg"}, > + {"zvbb", "zvkb"}, > + {"zvbc", "v"}, > + {"zvkb", "v"}, > + {"zvkg", "v"}, > + {"zvkned", "v"}, > + {"zvknha", "v"}, > + {"zvknhb", "v"}, > + {"zvksed", "v"}, > + {"zvksh", "v"}, > > {"zfh", "zfhmin"}, > {"zfhmin", "f"},
2023-12-06 11:33 Tsukasa OI <research_trasio@irq.a4lg.com> wrote: >On 2023/12/06 11:45, Feng Wang wrote: >> Due to the crypto vector entension is depend on the Vector extension, >> so the "v" info is added into implied ISA info with the corresponding >> crypto vector extension. > >Hi Feng, > >It's true that vector crypto extensions are based on the vector >extension but it *does not* mean that it requires full the 'V' >extension. Vector crypto extensions also consider about embedded >processors where VLEN < 128. > >Quoting the documentation: > >> The Zvknhb and Zvbc Vector Crypto Extensions --and accordingly the composite extensions Zvkn >> and Zvks-- require a Zve64x base, or application ("V") base Vector Extension. >> >> All of the other Vector Crypto Extensions can be built on any embedded (Zve*) or application ("V") >> base Vector Extension. > >So, correct dependencies to add are like follows: > >> + {"zvbb", "zvkb"}, >> + {"zvbc", "zve64x"}, >> + {"zvkb", "zve32x"}, >> + {"zvkg", "zve32x"}, >> + {"zvkned", "zve32x"}, >> + {"zvknha", "zve32x"}, >> + {"zvknhb", "zve64x"}, >> + {"zvksed", "zve32x"}, >> + {"zvksh", "zve32x"}, > >Note that 'V' indirectly depends on both 'Zve32x' and 'Zve64x' so this >would be fine to represent "or application ('V')" part quoted above. > >Also, consider adding those dependencies to the Python script >gcc/config/riscv/arch-canonicalize. > >Thanks, >Tsukasa > I modified this part. Thank you for your correction. > > > >> >> gcc/ChangeLog: >> >> * common/config/riscv/riscv-common.cc: Add "v" into implied ISA info. >> --- >> gcc/common/config/riscv/riscv-common.cc | 9 +++++++++ >> 1 file changed, 9 insertions(+) >> >> diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc >> index 6c210412515..dbb42ca2f1e 100644 >> --- a/gcc/common/config/riscv/riscv-common.cc >> +++ b/gcc/common/config/riscv/riscv-common.cc >> @@ -120,6 +120,15 @@ static const riscv_implied_info_t riscv_implied_info[] = >> {"zvksc", "zvbc"}, >> {"zvksg", "zvks"}, >> {"zvksg", "zvkg"}, >> + {"zvbb", "zvkb"}, >> + {"zvbc", "v"}, >> + {"zvkb", "v"}, >> + {"zvkg", "v"}, >> + {"zvkned", "v"}, >> + {"zvknha", "v"}, >> + {"zvknhb", "v"}, >> + {"zvksed", "v"}, >> + {"zvksh", "v"}, >> >> {"zfh", "zfhmin"}, >> {"zfhmin", "f"},
diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc index 6c210412515..dbb42ca2f1e 100644 --- a/gcc/common/config/riscv/riscv-common.cc +++ b/gcc/common/config/riscv/riscv-common.cc @@ -120,6 +120,15 @@ static const riscv_implied_info_t riscv_implied_info[] = {"zvksc", "zvbc"}, {"zvksg", "zvks"}, {"zvksg", "zvkg"}, + {"zvbb", "zvkb"}, + {"zvbc", "v"}, + {"zvkb", "v"}, + {"zvkg", "v"}, + {"zvkned", "v"}, + {"zvknha", "v"}, + {"zvknhb", "v"}, + {"zvksed", "v"}, + {"zvksh", "v"}, {"zfh", "zfhmin"}, {"zfhmin", "f"},