From patchwork Wed Dec 13 13:17:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Feng Wang X-Patchwork-Id: 177985 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp7767967dys; Wed, 13 Dec 2023 05:19:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IF67JNQpknlroS2Y+oBN+VsoY/h7XuAJBCPXHRwGVfQwRgS3W+fVFMVlpK6cgJnBaNhxxzo X-Received: by 2002:a05:6102:c86:b0:464:42fb:4984 with SMTP id f6-20020a0561020c8600b0046442fb4984mr6365548vst.11.1702473564804; Wed, 13 Dec 2023 05:19:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702473564; cv=pass; d=google.com; s=arc-20160816; b=cKMUT+4gy8H6wh11SWqbdk1P7paC/4dJLCHKh+ByANpC592JOKTYU4NYC42bamEtGv cJZRNEBqQFxasSPcSlxqy3IUYiWu261ENdek8MAmpIKm/iFxNNTFKqJueIrYMbGYqAvQ b6XOOhahqTkD6I9QyriqK2QBZFc3sWeGNX6KG5FyDy4xTf0KdBvH2R9/6U+W3dN2tYOm Ti6w0v3gVIK3I5cLUx3dxMhHmHxa99R788+OFEtSNZ2gafeV9CC5wU1u0GoWA39UrfiK 4NmgzskLnKiGchPzeTdn9uEfsey6C7ZoBcvnvgypYH61+cPLlt+0wbmtf36UAZY/mrUW MAVw== 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=1vR5qSrOztml4sRO4YmC3RP3+dOJUQ8Ni+1u+r2ysug=; fh=wZsTJjjR4v8BRcXwQWcyfe6tMSjhJr9Wj68rYddjXWo=; b=D6atBAZO3gR29yx0PvmxdqvCZ78OmkyzPS/c3B4o143gJynF3VePZHWDTZBtJmZDno bw4ORcpYGw7Yzd3WTNDyM6uFZ1ngwQVi28+QASBywiGIIhP8ptziKCgtvwcnjN/2vDQ5 u5pswT7xf8cquJLb5cFIHVN/h4G7jQN58dIDrnTPjAw2urx/7hQLY2WbhlwS6sl4nbda x/VYiqCziIhhFWHtkrkY+Gk4o1Kgz0enJAgKig//22nZQRETsLhCznlT+i0BDsAkrpek W5jCvv6cEBgf96mgnpJunh0z26tuFw87lCj5qkRxdJ8f6LAR2kLRrcnxUFa4Zqh0Evnh NbWQ== 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 f1-20020a05610209a100b00464867bc9fesi2104964vsb.749.2023.12.13.05.19.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 05:19:24 -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 7C693385C40E for ; Wed, 13 Dec 2023 13:19: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 35478385C303 for ; Wed, 13 Dec 2023 13:18:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 35478385C303 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 35478385C303 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=1702473542; cv=none; b=ZqKyGMol+4jM4qLKLCeLElhq3EXZx2hWw09RQ06QhAWaevaHWWWF5m6we4hL7CW4Q0CGsB335M0ZttUwKRQwpIF4XnGo7ArAqWnhgL2Me84D7QcgD7rvwwACHG0YXvDGmY4nuVSyHFhMG/ZGcaJv6iBLvSoZzwZIaz/vw88ijnU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702473542; c=relaxed/simple; bh=EsqfVtmZJJfmM+9x3epzmMyv8UlbyVmDdfe6lxT7I6c=; h=From:To:Subject:Date:Message-Id; b=X2x42P/viiuMt+237OvvpK2pg2VjwMIHiCRum2mXRVgTyLjUJv6c5OTxmZZVfXYg2KuZLRtYBypVqD8wfI5oYZ7OqmZvjtJQUc3njbKDurUMA8euA84n88l0DW3myXRAxdTAXFs3SncfTtXjm382duviATmjTMWGV9ktDDfEsU0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from localhost.localdomain (unknown [10.12.130.31]) by app1 (Coremail) with SMTP id TAJkCgAXlvvyrnllilEBAA--.7026S4; Wed, 13 Dec 2023 21:17:39 +0800 (CST) From: Feng Wang To: gcc-patches@gcc.gnu.org Cc: Feng Wang Subject: [committed] RISC-V:Add crypto vector implied ISA info. Date: Wed, 13 Dec 2023 13:17:48 +0000 Message-Id: <20231213131748.35135-1-wangfeng@eswincomputing.com> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: TA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0uprps33xlqjhudrp/ 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: 1785172920785630813 X-GMAIL-MSGID: 1785172920785630813 Due to the crypto vector entension is depend on the Vector extension, so add the 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):