From patchwork Sun Sep 3 02:42:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tsukasa OI X-Patchwork-Id: 13777 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ab0a:0:b0:3f2:4152:657d with SMTP id m10csp414212vqo; Sat, 2 Sep 2023 19:42:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF0sb8jXHCCRcPu0QeLngemJ+T1ErbQINq60MVz81fhpZ3b9SL+2ATPaY5NKpnKY5uSkHMR X-Received: by 2002:a17:906:f252:b0:9a1:eb67:c0ce with SMTP id gy18-20020a170906f25200b009a1eb67c0cemr4970210ejb.50.1693708947707; Sat, 02 Sep 2023 19:42:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693708947; cv=none; d=google.com; s=arc-20160816; b=rPjHcRw7RNqgFtPXsW5uBFiNf392sMcGDb41PRZflr8Sxq1ICj+Z3yvUhwCY5avntE DsB0/UcZxOlM6WMaESuI+jA/3wEZneWA+FZZmyF2fVKYd8jm+mswFtTBk3Q+GMyfGxFK 7W2kcn6GOB/dNDY5MGVWNrWlOSRUnGkoEPYvoRqLsGw9w62KdXUPjCJ3FuYaeQn1MLpF fLRRjX+tsShlwW1KzR0lb/bcM6DdO5nNRLBsVW68xzqUC3ytPVfmY/IILh1dxJ22QoFZ 0o+BjqsRxsGoZInQlyeR8Ef8ltV/5Xu/fUts9+Mky+bgaeEtONYHP7Tiw/F50twMTJ88 Vy4A== 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:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=nyMHGuSqHFsEnOxRnKFJdww4DuXzqJXtAicTQl+pSV0=; fh=ZF+wo3DcPSqUItF1q4EUtvad+sxRVmq6AyRZI5CgtTU=; b=QMqZ/+2EV9WA2KiLpUL0e9SSzmWW3moWLSYFZx0UejxqOjU0dJmizhfOXKDIU03LUS FBHAcn0yoB93hwQeLpk+jQ+nlYQSSDE7EtkjoRWg/lGQoRsSGYxJIhFr/wYs0xx2ERy2 C1WZpKeHhgE3Gr/u0CAUcGosBBGydZbTPni+C2rMqHq2RfKOdudUhI3UkPMogz22A+Rw 8nrOpv7uAVfwxTOjntVtpyInxUM+3524SPx2Bhr28wcwA8rNPyYo2ACYlXpVIMSdYP70 lktST5hlhzaAq1ghDaFHoWFbvaLUlZVhOdYFiES+EeErqXoPJuLeLofL0q/BjzHrrF3K 7lPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=AS2PECtB; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c 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 (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id i18-20020a170906851200b009a1b305102bsi4599184ejx.131.2023.09.02.19.42.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Sep 2023 19:42:27 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=AS2PECtB; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c 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 4BDD33858C50 for ; Sun, 3 Sep 2023 02:42:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4BDD33858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1693708946; bh=nyMHGuSqHFsEnOxRnKFJdww4DuXzqJXtAicTQl+pSV0=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=AS2PECtBcqDEQIX13LNeSirBNOkjY/CNNL24Bc+6hmdeg1lE+upG39BUXA8j8oPgs VsEgStv2m5ylbXyDfADR1rHPPPWKQ+NlWvsYbwOioWFKSEUlmKoNizny1E9DEDvv3G YF0nkmE4H+SoqgdhW2Y5/6AhTubrS1/BeeeQIr1A= 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 B450A3858CD1 for ; Sun, 3 Sep 2023 02:42:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B450A3858CD1 Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id 6F45B300089; Sun, 3 Sep 2023 02:42:13 +0000 (UTC) To: Tsukasa OI , Palmer Dabbelt , Andrew Waterman , Jim Wilson , Nelson Chu , Kito Cheng , Jiawei Cc: binutils@sourceware.org Subject: [PATCH 0/1] RISC-V: Add 'Smcntrpmf' extension and its CSRs Date: Sun, 3 Sep 2023 02:42:00 +0000 Message-ID: Mime-Version: 1.0 X-Spam-Status: No, score=-5.9 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 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: 1775982553693760416 X-GMAIL-MSGID: 1775982553693760416 Hello, This patch set implements the 'Smcntrpmf' extension: This specification is frozen and now approved. Note that, despite that this patch set is indepdendently created, it resolved some issues of Jiawei's support patch for the same extension: My patch implements the extension without removing "mscounteren" and "mhcounteren" CSRs. 1. "mscounteren" and "mhcounteren" CSRs are moved and marked as aliases. 2. CSRs of the 'Smcntrpmf' extension is marked incompatible with the privileged specification version 1.9.1 (because it conflicts with "mscounteren" and "mhcounteren"). For 2., this is not normal for RISC-V extensions but considered necessary (because of direct conflicts of the CSR values). Thanks to them, "mscounteren" and "mhcounteren" are preferred when disassembling with the privileged specification 1.9.1 (that is more natural). Other than that, this is a quite normal extension support patch set. Thanks, Tsukasa Tsukasa OI (1): RISC-V: Add 'Smcntrpmf' extension and its CSRs bfd/elfxx-riscv.c | 2 ++ gas/config/tc-riscv.c | 9 +++++ gas/testsuite/gas/riscv/csr-dw-regnums.d | 8 +++-- gas/testsuite/gas/riscv/csr-dw-regnums.s | 9 +++-- gas/testsuite/gas/riscv/csr-version-1p10.d | 16 ++++++--- gas/testsuite/gas/riscv/csr-version-1p10.l | 40 ++++++++++++++++----- gas/testsuite/gas/riscv/csr-version-1p11.d | 16 ++++++--- gas/testsuite/gas/riscv/csr-version-1p11.l | 40 ++++++++++++++++----- gas/testsuite/gas/riscv/csr-version-1p12.d | 16 ++++++--- gas/testsuite/gas/riscv/csr-version-1p12.l | 40 ++++++++++++++++----- gas/testsuite/gas/riscv/csr-version-1p9p1.d | 16 ++++++--- gas/testsuite/gas/riscv/csr-version-1p9p1.l | 40 +++++++++++++++++++++ gas/testsuite/gas/riscv/csr.s | 10 ++++-- include/opcode/riscv-opc.h | 14 ++++++-- 14 files changed, 228 insertions(+), 48 deletions(-) base-commit: a496e1a71e1766d4bb02b241cb23e2e9874d2605