From patchwork Thu Dec 7 02:15:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Feng Wang X-Patchwork-Id: 174877 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp4508456vqy; Wed, 6 Dec 2023 18:16:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IF6+HMLSlGP3G1GS7GAnJntxNxkZSkdsNzu24F8o1DR4a7vVYv70JCqA7hmMLvNp3GhMqY9 X-Received: by 2002:a05:622a:d:b0:423:b62b:9e6a with SMTP id x13-20020a05622a000d00b00423b62b9e6amr2744579qtw.62.1701915399870; Wed, 06 Dec 2023 18:16:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701915399; cv=pass; d=google.com; s=arc-20160816; b=YkNNJNcAc35ljp5MeBgC39mjy8sGalxOb5Ve3RY3bCbbcV2Of7dRQnevn2V9f/bnn7 TGsRXwOPFDkiBk73esRKZHQzpinimUmgvvDlMo6SaWuU0Rr2vEiQZMpwgEEPZTKbto14 y9VKXF/hNNwLzlupvSLJZtQoKPTjNOdgRkdR4t6WyC5jSyo6F58PqgI3cihg1ixEaXZs 8cwfeQpL8Va/6kihZ+pVYZ9rYo/RSVpkGnh2bplFMKULGV4yX/J34U31DwSt9zAQ6EwU EbozvFAtsjBIUX5uxRTGS3Go6Y+MO1c2MZ3vtEbo/qeBHHXwb/S1Qm3+bzJARKIVJleG 71DQ== 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=lY5E9nrHmzWt33/F9ejvu828WUBiH2MC72BswnP3CRc=; fh=LD/eg044r5myWG9+PuCx38QZOcH49ea16O/aCRBQ/Gk=; b=zyu1KEqzOILMsGqslFx0VfrWVeZjztMBnqoj6aHAaYT6a82lcqo7CsGDZ8GxALIQPH ryZc4tVY/WlnZ1nNpikaqQ9Jn1vdMRQceS27MrYxSjtr+oJQqdya54nZ/P1s/AKc6eeO akBuQ7r+RRfYi70qALiChoEyBOFzineTPoJPK71aW0VstL1d33EJicWpxgnaxmdzNH68 /HsDzoKX7IU5VgZtpUWW2PLoHZnV0WGYntunPmIWkLiopKun8/xCkvkWoFnYzzg9oEJH TWrgFR4OXNSNLL+SgvB5UQhatraBKogPKGeerrKMECcRoy6ztQJN+3GIgQtfzL2IAW8M xSzA== 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 f13-20020ac8464d000000b00425895b5c8asi361154qto.490.2023.12.06.18.16.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 18:16:39 -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 0927A3858C2C for ; Thu, 7 Dec 2023 02:16:39 +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 6556A385734E for ; Thu, 7 Dec 2023 02:16:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6556A385734E 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 6556A385734E 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=1701915376; cv=none; b=wn6Ddx3fC+323Df3eglCRhB+WiYL7qDlswcFdDharkApXjckZiIHAUO+98qnAw02pYZNqArjJr34P4/J4MWCJp30rnzi5LqwtTqfioFXIbcbE3OkKkJer9WpMm3ZWafHYvDsZp+12z8lYpRYtXFynHM5eadcfEDHxXtNyuUH0aY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701915376; c=relaxed/simple; bh=4WxJuIGGX7dLNfGTObaGvpKGUe3To/szOcyot5qSiZ8=; h=From:To:Subject:Date:Message-Id; b=pJFVcZR4SmF4cfH4lPuQ0qicyFuo/pGpSUhkIQB8Db6c8EgdAOSi52hacgMgvXu0ls0kf9rTijerP/T9agLhxfX/dNY6eof9553Mutrxxg8zSl+TpxFq+KRJdadIYwd8VGHp67XcQ2yGZdI3R+yr0Tcc09MZ00fMBJydTu8jdno= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from localhost.localdomain (unknown [10.12.130.31]) by app1 (Coremail) with SMTP id TAJkCgA3w_2nKnFl14UAAA--.8152S4; Thu, 07 Dec 2023 10:15:04 +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 1/4][v2] RISC-V:Add crypto vector implied ISA info. Date: Thu, 7 Dec 2023 02:15:11 +0000 Message-Id: <20231207021514.10248-1-wangfeng@eswincomputing.com> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: TAJkCgA3w_2nKnFl14UAAA--.8152S4 X-Coremail-Antispam: 1UD129KBjvJXoW7Cr1DtF45ur4xXF4xCw4UArb_yoW8Kry8pF 18Jas3Z348Kwnag3WSkw18Zw48WF1fXry5AF1DC348Can8Jr1xuFnYqw1aqrykJF4vvFnx Z3WrKry29F4UAF7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUkI14x267AKxVW8JVW5JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK02 1l84ACjcxK6xIIjxv20xvE14v26w1j6s0DM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4U JVWxJr1l84ACjcxK6I8E87Iv67AKxVW0oVCq3wA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gc CE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E 2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJV W8JwACjcxG0xvY0x0EwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1lc2xSY4AK6svPMxAI w28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr 4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxG rwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJw CI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2 z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7VUbXdbUUUUUU== X-CM-SenderInfo: pzdqwwxhqjqvxvzl0uprps33xlqjhudrp/ X-Spam-Status: No, score=-12.6 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 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: 1784498944620490154 X-GMAIL-MSGID: 1784587642456752620 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 6c210412515..a7aa3435a8a 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", "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):