From patchwork Tue Sep 12 01:39:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tsukasa OI X-Patchwork-Id: 13823 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9ecd:0:b0:3f2:4152:657d with SMTP id t13csp110825vqx; Mon, 11 Sep 2023 18:39:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHBuvKkGPzL0NmcvULyCy1FtqXWFFMuxoQ8OmuUEqHU51KB1DxhmkC/pFelmF2WEAq1yfK3 X-Received: by 2002:a2e:9b0a:0:b0:2bc:d567:bdbd with SMTP id u10-20020a2e9b0a000000b002bcd567bdbdmr9504915lji.15.1694482778145; Mon, 11 Sep 2023 18:39:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694482778; cv=none; d=google.com; s=arc-20160816; b=GCDHTazDTL0+FinJpxIiE5IPPiClQcVMhd3I5e8sJfC6+M/sGxGZPXI9fQTq0w9E9w 22RPZklSezIEOwQsGCbb6OiPjZSYQbFVuKN/ZIcWRajTWJ6ufHHgHrRaUOhBcDUPrfK2 u14LCNZGDezM3X2ghrNFx+uQQVcunJqaEAcxWlVfBa8vJd77EjQz59l+wWAKBoqIjm9e L5s7Z9AVJuGQG/qhQYrFabtLYQ9EizH7T7ddLq2d5fvOGQX+NQ0hOVrv45bCYg/yDvrc TesdzsWMBp0rE5O1cj4SDhl9e532Yqm5+ipK+4PdAJ0UVboPIsNh+KL1gPbD1tVT4BIg TmRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=CMTO4vF2064Fe14XkDtIoQj7j+spbo5d8/6WezfOD2c=; fh=lllctRxEXNnp/GZgTgmlYzny/eXMbSjNA/nbD0Q8v10=; b=VF7Yy15hAXwBnbvkwoZeWnFYCMcDSZ7M6dIV9UXXcf7jrcEOP7NqZBgJsK9YiLOacH nCQoTFsY4+n5qQzp9z08sE+A92o871wsvsw5/1JwT18KvD1O+8rq4IMSXs78wH/Ef/Q3 JSCTTLJVdAX9lzzXqJ3a1KSppXqB7bPqhCH5vMJ5PQdgvB6+DdkHYWiGqPEljMg/Id3J I/nW6e3QXC+jTQ0PMDieF368fI1x3buVbA5YxbdONrjkFeuIcnxOc/OOJJKRWqJEOism ia6vBW22benivYdHH0bxLOcFtSdXw6qVUZ5W3z0Ct1i8Mf9EuvnzOcLFr6Cr/2ONVQg1 2bTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=YhsiQCvY; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id ox3-20020a170907100300b0098e2aa0bb92si8207465ejb.137.2023.09.11.18.39.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Sep 2023 18:39:38 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=YhsiQCvY; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1304D3858419 for ; Tue, 12 Sep 2023 01:39:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1304D3858419 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1694482777; bh=CMTO4vF2064Fe14XkDtIoQj7j+spbo5d8/6WezfOD2c=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=YhsiQCvY7iB2L/G4RJsvs9704oNYIJ00q2zMiiz8xOpXvXbRFOExzHM58HtxI9OVl Dv6V0d4tYTGOpX0c6fmbypKHlyRlw+raMwEbm7A/Zmhl/OcsghtPS6cDjztAcUqqOO 0G8xj2rZjwHCwA4+1WcqSGYf4KAlQVHu4AiPxscA= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-sender-0.a4lg.com (mail-sender.a4lg.com [153.120.152.154]) by sourceware.org (Postfix) with ESMTPS id CF9103858D38 for ; Tue, 12 Sep 2023 01:39:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CF9103858D38 Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id B2670300089; Tue, 12 Sep 2023 01:39:25 +0000 (UTC) To: Tsukasa OI Cc: binutils@sourceware.org Subject: [REVIEW ONLY v2 0/1] UNRATIFIED RISC-V: Add support for Core-Local Interrupt Controller (CLIC) extensions and their CSRs Date: Tue, 12 Sep 2023 01:39:07 +0000 Message-ID: In-Reply-To: References: Mime-Version: 1.0 X-Spam-Status: No, score=-6.0 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 X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tsukasa OI via Binutils From: Tsukasa OI Reply-To: Tsukasa OI Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776793973949997912 X-GMAIL-MSGID: 1776793973949997912 *** WAIT FOR SPECIFICATION FREEZE *** This is an implementation for unratified and not frozen RISC-V extension and not intended to be merged for now. The only intent to submit this patchset is to test new instructions for your (possibly virtual) environment and early review for fast adoption after ratification. It's long since I submitted the previous version and it's a good time to submit new REVIEW ONLY one, knowing if it's unratified. Changes: v1 -> v2 * Rebased against the latest master. * Added support for 'Smclicconfig', 'Smclicshv' and 'Ssclic' extensions (following the latest CLIC specification). * Added diagnostics-only support for the 'Suclic' extension (likewise). This patchset adds following unratified extensions to GNU Binutils from the Core-Local Interrupt Controller (CLIC) RISC-V Privileged Architecture Extensions: 1. 'Smclic' 2. 'Smclicconfig' 3. 'Smclicshv' 4. 'Ssclic' 5. 'Suclic' (because 'N' extension support is now dropped by GNU Binutils, this extension is only supported to generate correct diagnostics that's why this extension is *not* in riscv_supported_std_s_ext). that add 18 CSRs in total. These extensions are software side of Core-Local Interrupt Controller (CLIC) which provides lower latency local interrupts. This is based on the specification document, version 0.9-draft: Although that 18 CSRs are assigned with actual numbers (this is why I'm not attaching "CSR instantiation" script in this patchset), it may be changed before ratification. Be careful. Thanks, Tsukasa Tsukasa OI (1): UNRATIFIED RISC-V: Add CLIC extensions with CSRs bfd/elfxx-riscv.c | 10 ++- gas/config/tc-riscv.c | 12 ++++ gas/testsuite/gas/riscv/csr-dw-regnums.d | 17 +++++ gas/testsuite/gas/riscv/csr-dw-regnums.s | 18 +++++ gas/testsuite/gas/riscv/csr-version-1p10.d | 34 ++++++++++ gas/testsuite/gas/riscv/csr-version-1p10.l | 74 +++++++++++++++++++++ gas/testsuite/gas/riscv/csr-version-1p11.d | 34 ++++++++++ gas/testsuite/gas/riscv/csr-version-1p11.l | 74 +++++++++++++++++++++ gas/testsuite/gas/riscv/csr-version-1p12.d | 34 ++++++++++ gas/testsuite/gas/riscv/csr-version-1p12.l | 74 +++++++++++++++++++++ gas/testsuite/gas/riscv/csr-version-1p9p1.d | 34 ++++++++++ gas/testsuite/gas/riscv/csr-version-1p9p1.l | 74 +++++++++++++++++++++ gas/testsuite/gas/riscv/csr.s | 19 ++++++ include/opcode/riscv-opc.h | 36 ++++++++++ 14 files changed, 543 insertions(+), 1 deletion(-) base-commit: 318d3bda5cad124bd11eebb0349d0f183ba625b1