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 5632C3858C55 for ; Sat, 8 Oct 2022 04:32:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5632C3858C55 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 A6972300089; Sat, 8 Oct 2022 04:32:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irq.a4lg.com; s=2017s01; t=1665203540; bh=fYyqNbYl/YKLDbbPju7j6L1VNN81HucxF+I5PNwgrzQ=; h=From:To:Cc:Subject:Date:Message-Id:Mime-Version: Content-Transfer-Encoding; b=dx5Bbkg7gO1IOmccHVW0J4Ehbtsju4PQytmOoPVTNbhXF7Jh+PWeO3g2pHPQlFHRC bmLilcewOac5eKpvM4ExIU4cZDfu6OEa+cHBS4+uMtdAdYdlyLDebX1gej0kUSAYbK bY55NiMAV08n82Mqblzmiv4Q9gca8NYRAjkDoCbQ= From: Tsukasa OI To: Tsukasa OI , Nelson Chu , Kito Cheng , Palmer Dabbelt , Andrew Waterman Cc: binutils@sourceware.org Subject: [RFC PATCH 0/1] RISC-V: Imply 'Zicsr' from privileged extensions with CSRs Date: Sat, 8 Oct 2022 04:32:17 +0000 Message-Id: Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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: Hello, 'H', 'Smstateen', 'Sscofpmf' and 'Sstc' are four privileged extensions with their CSR definitions and 'Smepmp' is a privileged extension with additional CSR bits. Volume II: Privileged Architecture of the RISC-V ISA Manual states that the privileged architecture requires the 'Zicsr' extension. However, current GNU Binutils has no direct way whether the program has dependency to the privileged architecture itself. As a workaround, we could add implications from privileged extensions that either add new CSRs, extend existing CSRs or depends on using CSRs. This patchset adds such implications for existing privileged extensions that satisfy this condition. I would like to hear your thoughts. Thanks, Tsukasa Tsukasa OI (1): RISC-V: Imply 'Zicsr' from privileged extensions with CSRs bfd/elfxx-riscv.c | 5 +++++ gas/testsuite/gas/riscv/march-imply-h.d | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 gas/testsuite/gas/riscv/march-imply-h.d base-commit: 4cbfd0daabd68516651ee37a19d0e24ca4789ea3 -- 2.34.1