From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-sender-0.a4lg.com (mail-sender-0.a4lg.com [IPv6:2401:2500:203:30b:4000:6bfe:4757:0]) by sourceware.org (Postfix) with ESMTPS id 09C403857BB6 for ; Thu, 22 Sep 2022 07:59:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 09C403857BB6 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=irq.a4lg.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=irq.a4lg.com Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id 18C2E300089; Thu, 22 Sep 2022 07:59:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irq.a4lg.com; s=2017s01; t=1663833549; bh=qwVdnabPVnFo1kN1gs2rbxU2IhWdVMwfuPxx6XtxYQw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Mime-Version:Content-Transfer-Encoding; b=cX34OHrTroJcsSM8gvfvV44gqBkCL59xVHJhMV6y+MQhAxh4k0OrcGGVaVeRDmM8x 3iOYUSNoHGLw3ox+CeIYI9yONuqlgNI/heZ5/0K6fx8HAcmG1WvziZ0hmjphvUpL1v omSft7rIn4Q+ytUT0qf6NYYuvqK8cUL7RZDJM6H4= From: Tsukasa OI To: Tsukasa OI , Nelson Chu , Kito Cheng , Palmer Dabbelt , Andrew Waterman Cc: binutils@sourceware.org Subject: [RFC PATCH 1/1] RISC-V: Add privileged extensions without instructions/CSRs Date: Thu, 22 Sep 2022 07:58:56 +0000 Message-Id: In-Reply-To: References: Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,GIT_PATCH_0,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Currently, GNU Binutils does not support following privileged extensions: - 'Smepmp' - 'Svnapot' - 'Svpbmt' as they do not provide new CSRs or new instructions ('Smepmp' extends the privileged architecture CSRs but does not define the CSR itself). However, adding them might be useful as we no longer have to "filter" ISA strings just for toolchains (if full ISA string is given by a vendor, we can straightly use it). And there's a fact that supports this theory: there's already an (unprivileged) extension which does not provide CSRs or instructions (but only an architectural guarantee): 'Zkt' (constant timing guarantee for certain subset of RISC-V instructions). This simple patchset simply adds three privileged extensions listed above. bfd/ChangeLog: * elfxx-riscv.c (riscv_supported_std_s_ext): Add 'Smepmp', 'Svnapot' and 'Svpbmt' extensions. --- bfd/elfxx-riscv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c index 7eda177bd6e..bbc30c9afc2 100644 --- a/bfd/elfxx-riscv.c +++ b/bfd/elfxx-riscv.c @@ -1210,10 +1210,13 @@ static struct riscv_supported_ext riscv_supported_std_z_ext[] = static struct riscv_supported_ext riscv_supported_std_s_ext[] = { + {"smepmp", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, {"smstateen", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, {"sscofpmf", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, {"sstc", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, {"svinval", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, + {"svnapot", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, + {"svpbmt", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, {NULL, 0, 0, 0, 0} }; -- 2.34.1