From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-xe31.google.com (mail-vs1-xe31.google.com [IPv6:2607:f8b0:4864:20::e31]) by sourceware.org (Postfix) with ESMTPS id DC6043857401 for ; Tue, 28 Jun 2022 01:40:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DC6043857401 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-vs1-xe31.google.com with SMTP id w187so10674179vsb.1 for ; Mon, 27 Jun 2022 18:40:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ft+TgHwzhsbrbGH+DzoEYs9vHewqg2ShUHRs58avauY=; b=TRKq7pP/Kr6J46Ar+D/c78j6rG+EgRgK+ClmQ9k7ctESYuXKE95N9OVb5TglBpRfMe DjUgSEbgL8PGOxxTdS1I87fAg/wfDyQPUX6tDICuf+D8y5Fna6I9FouKQDo1gk+jggkx qi9TgCyTWju2EVCZoj5y5MGUI9IEFTO1WumpUJO9Ic4p/KwP/j4N5GPNtNOT7Jy2Cvh3 eyuxT7VmQruoFVmtcg0GKlT+1ZAIeqigPS7vT+GBsXFMr1FRO7Yuu/vkAvAwKCL134+E LsX6oLzGx0TFL5+jb3LB/+7fySg3jqAFKp6W5uxGpQLR9a1m02eVkf3aN1XUOxYSyMj0 zc1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ft+TgHwzhsbrbGH+DzoEYs9vHewqg2ShUHRs58avauY=; b=lLAX5u7Olerk/aG80UF8TN4Kvh7zjfCK5lpu5KjEoaw8mSSLLCLFPNqp4c0pjsMELO EUrufBc5O2unWycfAHm599krc6Uoo02oNgebcIeK7QZh+M6xBnNpX4M3kjoV4PAVADL/ +2pkp4lZfyZ0i4tPHoYDO85N5lceGXQgNa6AfsVyhpaYzn0QwLV/UuKmsU0FSQ0wDoiP XGWssMw1EzrdNMwNZtB8iGEn3ojN7CVJnsj+2hBX3L28/qd/lPpRNydWK9GxB3QqLoHG Yh1XEAdG4Lq50EeUywFs7fwLxIWs6MEsffTneuZtiJWVkYAIYtW/ikYj7d/NrlW2eHEU ImKw== X-Gm-Message-State: AJIora8+jmetYQL1D0J3AVfZVSmjPg20nT5+SgJWjiXLsYHmU6HKaZSI qhtSQqsdqF/uJDMhhIYvPYZN+WvopLa/dHlxHR0BGQ== X-Google-Smtp-Source: AGRyM1vCamuN9ww0oSpmzhzGsvcez72UxphVAbQgbcMsoD53cJIV5+6Q+iUcBQQsNq3V0c+8+rAVQflNuqNgy8Awo0U= X-Received: by 2002:a05:6102:109:b0:354:5934:b53a with SMTP id z9-20020a056102010900b003545934b53amr331831vsq.31.1656380425255; Mon, 27 Jun 2022 18:40:25 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Nelson Chu Date: Tue, 28 Jun 2022 09:40:16 +0800 Message-ID: Subject: Re: [PATCH v3 0/4] RISC-V: Add CSRs for several supervisor extensions To: Tsukasa OI Cc: Kito Cheng , Palmer Dabbelt , Binutils Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jun 2022 01:40:27 -0000 Thanks, passed toolchain regressions, so all committed. On Fri, Jun 24, 2022 at 10:52 AM Tsukasa OI wrote: > > v1: > > v2: > > CURRENT (GitHub): > > > This patchset adds CSRs for following extensions: > > - Smstateen > - Sscofpmf > - Sstc > > Because 'H' extension and related CSR class is now implemented, we can > now safely and consistently implement hypervisor-related CSR feature > gate masking. > > [CHANGES: v2 -> v3] > - Follow up to now implemented 'H' extension support > - Add (and refactor) complex CSR feature gate handling (on H and RV32) > - Make new CSRs independent to privileged architecture > (as initially suggested by Nelson Chu) > > Thanks, > Tsukasa > > > > > Tsukasa OI (4): > RISC-V: Add new CSR feature gate handling (RV32,H) I think this one is a workaround since we may have more complicate macros like INSN_CLASS in the future (or, and, ...). Maybe we should have the function similar to riscv_multi_subset_supports_ext for CSRs. Or maybe we could combine the riscv_multi_subset_supports and riscv_multi_subset_supports_ext functions into one, just return NULL if everything went well, otherwise return the error msg directly, and so does the CSR_CLASS. Anyway, the fix is fine for now, since we will get wrong error message without it. We could have a better fix in the future patches. Thanks Nelson > RISC-V: Add 'Smstateen' extension and its CSRs > RISC-V: Add 'Sscofpmf' extension with its CSRs > RISC-V: Add 'Sstc' extension and its CSRs > > bfd/elfxx-riscv.c | 3 + > gas/config/tc-riscv.c | 47 ++++- > gas/testsuite/gas/riscv/csr-dw-regnums.d | 54 +++++ > gas/testsuite/gas/riscv/csr-dw-regnums.s | 57 ++++++ > gas/testsuite/gas/riscv/csr-version-1p10.d | 108 ++++++++++ > gas/testsuite/gas/riscv/csr-version-1p10.l | 207 ++++++++++++++++++++ > gas/testsuite/gas/riscv/csr-version-1p11.d | 108 ++++++++++ > gas/testsuite/gas/riscv/csr-version-1p11.l | 207 ++++++++++++++++++++ > gas/testsuite/gas/riscv/csr-version-1p12.d | 108 ++++++++++ > gas/testsuite/gas/riscv/csr-version-1p12.l | 207 ++++++++++++++++++++ > gas/testsuite/gas/riscv/csr-version-1p9p1.d | 108 ++++++++++ > gas/testsuite/gas/riscv/csr-version-1p9p1.l | 207 ++++++++++++++++++++ > gas/testsuite/gas/riscv/csr.s | 60 ++++++ > include/opcode/riscv-opc.h | 114 +++++++++++ > 14 files changed, 1591 insertions(+), 4 deletions(-) > > > base-commit: 54603ee2aeaf248220f0f440c322ff02e98cd403 > -- > 2.34.1 >