From patchwork Wed Dec 13 09:12:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Feng Wang X-Patchwork-Id: 177826 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp7644259dys; Wed, 13 Dec 2023 01:14:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IG4zE6j6Ht/ZBSxR3SdhESQSEidfK2nB5iE5xN6laRkC2DTucCudGgDur41wdYYyA6T0Iwj X-Received: by 2002:a05:6358:d047:b0:170:21d3:314e with SMTP id jb7-20020a056358d04700b0017021d3314emr7939238rwb.49.1702458865650; Wed, 13 Dec 2023 01:14:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702458865; cv=pass; d=google.com; s=arc-20160816; b=j+32x0smYKo9LLkND9LWnh0jD7xSXKibzDTgW+kDBra4cwJZhDZcw0NwiP6zXj6U0S vphVu1ps8IBWZD5gbeetxdpraDLbbNZD8HlXvnRGseAvBo03eaICHKRPY9NsBYwIFytE HipmS/dlhHSTnl0BZnrX1zTa6+fdyYVf+WOyXvjVJsf+uyLJVXkWCS8XKbe+gUMDCKdf 14AOj9MyU03XMvgeFKJ8Kp+k5x8H+J06ifluRmNQV25AltIYb0SdAyR1RlB26s7O/H9G CnG9t5HowIgYZ/DSmGkLHqTtWXvSNjoxXn/KS1nfxT/JgnDPdkm3fO/kGToRMBwN/flW ag8w== 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=kdGwWKnj6fn808eNfaCaPf5L5I+PiWVJx9fSE+zyAn8=; fh=LD/eg044r5myWG9+PuCx38QZOcH49ea16O/aCRBQ/Gk=; b=BFy9HdOdIIfLfw0CISz8wWKgWMJuxEIYYQNn1Squb0W/KLRIuBFDul0P26W8I5vCXO pSQZu5LZogEtY6ArR77P3URMKB71dKzUYV8p7TsNmf/Zv1vAQ7rDaIt7/O04glv/tIOI G0r04YOJIvTYYLC4bH6NqPPzdcULIQ/69m0P5GwbLRV1Byz8j8xhfh3p0jULsCkoRgTg eb7RuVKVsd+MdxP2YcwnctcPgTAXx4KFrL/OUGrLw5zDVI4dNpuhb3J7jDpktF8LlCmv ChnSQYDxoiVC1vyhmSRVbXfCOPDGIFxzLP+KkJj3DdMqtOBCxUgh/Nty3eeqdolrezWL fqrg== 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 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id m10-20020ad4448a000000b0067a8d3c22a3si3577834qvt.350.2023.12.13.01.14.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 01:14:25 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; 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 2620:52:3:1:0:246e:9693:128c 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 C0450385DC2D for ; Wed, 13 Dec 2023 09:14:24 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from zg8tmtu5ljg5lje1ms4xmtka.icoremail.net (zg8tmtu5ljg5lje1ms4xmtka.icoremail.net [159.89.151.119]) by sourceware.org (Postfix) with ESMTP id 6E3FC385C6FE for ; Wed, 13 Dec 2023 09:13:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6E3FC385C6FE 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 6E3FC385C6FE Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=159.89.151.119 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702458841; cv=none; b=OKpBocLN9CLBFiBQ4h12VpQHk5R5mUaRCO1WjlSHRv5o9rO5RMOhxQPItYi36/Jd6xS0KjXk4Mi0sXfkkYqd7+dvPF6N4B/HGh8Z/iZY3k4C/0itQz1yfB2FAXxbxZHM9Q9Tc2MNBjmg+iiAxDIazIrGVMuNYzacRVH1PWWq2yc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702458841; c=relaxed/simple; bh=q/BsEdKXz386N9bXJLuoAO1sC6d31ieQiIjmNGfFA5c=; h=From:To:Subject:Date:Message-Id; b=GyVTLcfNq2byg7mCt180FyT5aKmiPVY1OJl8rqVw5Oum2uUlHQIqJwDmVrLSRLq3uqYg8rxsmvCDhtVVnA8EbFHx9pKq1bwS2LKvqixwS5KgUj0/Zmwkp62/Cte7RprOVx9JtJkEf/hOfuYTnMV5RrjmATxaHFLGqq27gnRGhxA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from localhost.localdomain (unknown [10.12.130.31]) by app2 (Coremail) with SMTP id TQJkCgAnttSFdXllEEgBAA--.15299S4; Wed, 13 Dec 2023 17:12:38 +0800 (CST) From: Feng Wang 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 Subject: [PATCH v2 1/4] RISC-V:Add crypto vector implied ISA info. Date: Wed, 13 Dec 2023 09:12:47 +0000 Message-Id: <20231213091250.30539-1-wangfeng@eswincomputing.com> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: TQJkCgAnttSFdXllEEgBAA--.15299S4 X-Coremail-Antispam: 1UD129KBjvJXoW7Cr1DtF45ur4xXF4xCw4UArb_yoW8Kry8pF 18JF93Z348Kwnag3WSkw1xZw48WFn3X345AF1DCw18Can8Jr1xZFnYqw1aqrykJF4vvFnx ZF1rKry29F4UAF7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUkI14x267AKxVW8JVW5JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK02 1l84ACjcxK6xIIjxv20xvE14v26w1j6s0DM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4U JVWxJr1l84ACjcxK6I8E87Iv67AKxVW0oVCq3wA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gc CE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E 2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJV W8JwACjcxG0xvY0x0EwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1lc2xSY4AK6svPMxAI w28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr 4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxG rwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8Jw CI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2 z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7VUbXdbUUUUUU== X-CM-SenderInfo: pzdqwwxhqjqvxvzl0uprps33xlqjhudrp/ X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_RPBL, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785157507045286145 X-GMAIL-MSGID: 1785157507045286145 Patch v2: Change the implied ISA info using the minimum set and add dependencies info into the python script. 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: Modify implied ISA info. * config/riscv/arch-canonicalize: Add crypto vector implied info. --- gcc/common/config/riscv/riscv-common.cc | 9 +++++++++ gcc/config/riscv/arch-canonicalize | 21 +++++++++++++++------ 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc index 4d5a2f874a2..76987598143 100644 --- a/gcc/common/config/riscv/riscv-common.cc +++ b/gcc/common/config/riscv/riscv-common.cc @@ -145,6 +145,15 @@ static const riscv_implied_info_t riscv_implied_info[] = {"zvksc", "zvbc"}, {"zvksg", "zvks"}, {"zvksg", "zvkg"}, + {"zvbb", "zvkb"}, + {"zvbc", "zve64x"}, + {"zvkb", "zve32x"}, + {"zvkg", "zve32x"}, + {"zvkned", "zve32x"}, + {"zvknha", "zve32x"}, + {"zvknhb", "zve64x"}, + {"zvksed", "zve32x"}, + {"zvksh", "zve32x"}, {"zfh", "zfhmin"}, {"zfhmin", "f"}, diff --git a/gcc/config/riscv/arch-canonicalize b/gcc/config/riscv/arch-canonicalize index ea2f67a0944..a8f47a1752b 100755 --- a/gcc/config/riscv/arch-canonicalize +++ b/gcc/config/riscv/arch-canonicalize @@ -69,12 +69,21 @@ IMPLIED_EXT = { "zvl32768b" : ["zvl16384b"], "zvl65536b" : ["zvl32768b"], - "zvkn" : ["zvkned", "zvknhb", "zvbb", "zvkt"], - "zvknc" : ["zvkn", "zvbc"], - "zvkng" : ["zvkn", "zvkg"], - "zvks" : ["zvksed", "zvksh", "zvbb", "zvkt"], - "zvksc" : ["zvks", "zvbc"], - "zvksg" : ["zvks", "zvkg"], + "zvkn" : ["zvkned", "zvknhb", "zvkb", "zvkt"], + "zvknc" : ["zvkn", "zvbc"], + "zvkng" : ["zvkn", "zvkg"], + "zvks" : ["zvksed", "zvksh", "zvkb", "zvkt"], + "zvksc" : ["zvks", "zvbc"], + "zvksg" : ["zvks", "zvkg"], + "zvbb" : ["zvkb"], + "zvbc" : ["zve64x"], + "zvkb" : ["zve32x"], + "zvkg" : ["zve32x"], + "zvkned" : ["zve32x"], + "zvknha" : ["zve32x"], + "zvknhb" : ["zve64x"], + "zvksed" : ["zve32x"], + "zvksh" : ["zve32x"], } def arch_canonicalize(arch, isa_spec):