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 C5D633858D20 for ; Fri, 11 Aug 2023 02:39:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C5D633858D20 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 1C76E300089; Fri, 11 Aug 2023 02:39:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irq.a4lg.com; s=2017s01; t=1691721584; bh=TRSAnkENbo4Ea94MQVYrqunFMfTxgmYN44+3zYOqtQ0=; h=From:To:Cc:Subject:Date:Message-ID:Mime-Version: Content-Transfer-Encoding; b=Wbdv0AqKjoZ03a3E+dninOPO9HE9aGanvIaXdtbpcZGiXHsqUOJAMuXYXM9w4zIqS YxAXi7RHIsE0z+4sNrgDtvHrWs2j4oxUnqD3wTXS9iII4uVBP/hFx8fFnZrmo+chTw l25xvprnugMJwNfLpkpfAd1RhsFIwLOk3cYEJDOU= From: Tsukasa OI To: Tsukasa OI , Palmer Dabbelt , Andrew Waterman , Jim Wilson , Nelson Chu , Kito Cheng Cc: binutils@sourceware.org Subject: [REVIEW ONLY 0/2] UNRATIFIED RISC-V: Add support for indirect CSR access extensions Date: Fri, 11 Aug 2023 02:39:11 +0000 Message-ID: Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KAM_MANYTO,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no 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, This patch set demonstrates two extensions ('Smcsrind' and 'Sscsrind') in the Indirect CSR Access Architecture Extension specification: Note that RISC-V AIA and this Indirect CSR Access specifications don't have any strict superset or subset relations. Instead, Indirect CSR Access is based on a subset of RISC-V AIA but with some extensions and intentionally designed *not* to have dependencies to AIA. To implement those extensions (PATCH 2), new CSR handling mechanism will be required because those CSRs are shared with RISC-V AIA ('Smaia' / 'Ssaia'). 1. miselect 2. mireg 3. siselect 4. sireg 5. vsiselect 6. vsireg Complex CSR handling preparation as in PATCH 1 enables separating the "extension" variable (shared for error message) and actual checking. It enables checking like (A && B) and (A || B). In the PATCH 2, the author used this mechanism to check (Smaia || Smcsrind) and (Ssaia || Sscsrind). This approach should work until a kind of combinatorial explosion happens. PATCH 1 may be merged without PATCH 2 but since PATCH 2 contains two unratified extensions, this patch set as whole is considered RFC. Thanks, Tsukasa Tsukasa OI (2): RISC-V: Add complex CSR error handling UNRATIFIED RISC-V: Add indirect CSR Access Extensions and its CSRs bfd/elfxx-riscv.c | 4 + gas/config/tc-riscv.c | 38 ++++++- gas/testsuite/gas/riscv/csr-dw-regnums.d | 15 +++ gas/testsuite/gas/riscv/csr-dw-regnums.s | 17 ++++ gas/testsuite/gas/riscv/csr-version-1p10.d | 30 ++++++ gas/testsuite/gas/riscv/csr-version-1p10.l | 104 +++++++++++++++++--- gas/testsuite/gas/riscv/csr-version-1p11.d | 30 ++++++ gas/testsuite/gas/riscv/csr-version-1p11.l | 104 +++++++++++++++++--- gas/testsuite/gas/riscv/csr-version-1p12.d | 30 ++++++ gas/testsuite/gas/riscv/csr-version-1p12.l | 104 +++++++++++++++++--- gas/testsuite/gas/riscv/csr-version-1p9p1.d | 30 ++++++ gas/testsuite/gas/riscv/csr-version-1p9p1.l | 104 +++++++++++++++++--- gas/testsuite/gas/riscv/csr.s | 19 ++++ include/opcode/riscv-opc.h | 46 +++++++-- 14 files changed, 619 insertions(+), 56 deletions(-) base-commit: 5b576ed1434dfe9d80b7f0a4490c9faca94c0ed0 -- 2.41.0