From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-sender-0.a4lg.com (mail-sender.a4lg.com [153.120.152.154]) by sourceware.org (Postfix) with ESMTPS id F29753858415 for ; Tue, 12 Sep 2023 01:39:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F29753858415 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 519EE300089; Tue, 12 Sep 2023 01:39:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irq.a4lg.com; s=2017s01; t=1694482776; bh=ursM8p00SnpHBpvnYJc+SA0wmWEHHOj0iTN2nYwiUI0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Mime-Version:Content-Transfer-Encoding; b=F+ovoA7j5eY2tlhBrJCtGvui99Wsxi15C4RYP3tRPn/oMWAqQsp+E3wn0PkGJt16w pExikF5DsAKvknCT5f5l7vjrlw7vtkbmcmqaJiinHtJYmTFONG/1sNfoMf4HUDMK/g 2Kyzwk9j24Hib0PqIZsddCmxAVxKkvWsH3V9M5mY= From: Tsukasa OI To: Tsukasa OI Cc: binutils@sourceware.org Subject: [REVIEW ONLY v2 1/1] UNRATIFIED RISC-V: Add CLIC extensions with CSRs Date: Tue, 12 Sep 2023 01:39:08 +0000 Message-ID: <713be97466ed820ab3bafcaaf0a04ce4e02430dd.1694482743.git.research_trasio@irq.a4lg.com> In-Reply-To: References: Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,GIT_PATCH_0,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: From: Tsukasa OI [DO NOT MERGE] Until CLIC is frozen/ratified and final version number is determined, this patch should not be merged upstream. This commit uses unratified version 0.9 as in the documentation (instead of possible 1.0 after ratification). This commit adds CSR and extension name support for Core-Local Interrupt Controller (CLIC) extensions. It adds following extensions: 1. 'Smclic' M-mode (and base) software-visible component of CLIC. 2. 'Ssclic' S-mode software-visible component of CLIC. Requires 'Smclic'. 3. 'Suclic' (partial support only) U-mode software-visible component of CLIC. Requires 'Smclic' and an extension which GNU Binutils does not currently support, 'N' (user-level interrupts). So it is partially supported for disassembling and generating warnings on GAS. 4. 'Smclicshv' CLIC selective hardware vectoring extension. The current documentation does not say that this extension depends on 'Smclic' but added to the implication list. 5. 'Smclicconfig' CLIC configuration extension. The current documentation does not say that this extension depends on 'Smclic' but added to the implication list. This is based on the latest Core-Local Interrupt Controller (CLIC) extension draft (version 0.9-draft): bfd/ChangeLog: * elfxx-riscv.c (riscv_implicit_subsets): Add CLIC-related implications. (riscv_supported_std_s_ext) Add CLIC-related extensions. gas/ChangeLog: * config/tc-riscv.c (enum riscv_csr_class): Add new CSR classes. (riscv_csr_address): Add new CSR class handling. * testsuite/gas/riscv/csr.s: Add new CSR test. * testsuite/gas/riscv/csr-dw-regnums.s: Likewise. * testsuite/gas/riscv/csr-dw-regnums.d: Likewise. * testsuite/gas/riscv/csr-version-1p9p1.d: Likewise. * testsuite/gas/riscv/csr-version-1p9p1.l: Likewise. * testsuite/gas/riscv/csr-version-1p10.d: Likewise. * testsuite/gas/riscv/csr-version-1p10.l: Likewise. * testsuite/gas/riscv/csr-version-1p11.d: Likewise. * testsuite/gas/riscv/csr-version-1p11.l: Likewise. * testsuite/gas/riscv/csr-version-1p12.d: Likewise. * testsuite/gas/riscv/csr-version-1p12.l: Likewise. include/ChangeLog: * opcode/riscv-opc.h (CSR_MTVT, CSR_MNXTI, CSR_MINTSTATUS, CSR_MINTTHRESH, CSR_MSCRATCHCSW, CSR_MSCRATCHCSWL, CSR_STVT, CSR_SNXTI, CSR_SINTSTATUS, CSR_SINTTHRESH, CSR_SSCRATCHCSW, CSR_SSCRATCHCSWL, CSR_UTVT, CSR_UNXTI, CSR_UINTSTATUS, CSR_UINTTHRESH, CSR_USCRATCHCSWL): New. --- 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(-) diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c index 6ed657171f0f..cd5033d0798a 100644 --- a/bfd/elfxx-riscv.c +++ b/bfd/elfxx-riscv.c @@ -1182,10 +1182,14 @@ static struct riscv_implicit_subset riscv_implicit_subsets[] = {"zcf", "zca", check_implicit_always}, {"zcd", "zca", check_implicit_always}, {"zcb", "zca", check_implicit_always}, + {"ssclic", "smclic", check_implicit_always}, {"smaia", "ssaia", check_implicit_always}, + {"smclicconfig", "smclic", check_implicit_always}, + {"smclicshv", "smclic", check_implicit_always}, + {"smclic", "zicsr", check_implicit_always}, {"smcntrpmf", "zicsr", check_implicit_always}, - {"smstateen", "ssstateen", check_implicit_always}, {"smepmp", "zicsr", check_implicit_always}, + {"smstateen", "ssstateen", check_implicit_always}, {"ssaia", "zicsr", check_implicit_always}, {"sscofpmf", "zicsr", check_implicit_always}, {"ssstateen", "zicsr", check_implicit_always}, @@ -1330,10 +1334,14 @@ static struct riscv_supported_ext riscv_supported_std_z_ext[] = static struct riscv_supported_ext riscv_supported_std_s_ext[] = { {"smaia", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, + {"smclic", ISA_SPEC_CLASS_DRAFT, 0, 9, 0 }, + {"smclicconfig", ISA_SPEC_CLASS_DRAFT, 0, 9, 0 }, + {"smclicshv", ISA_SPEC_CLASS_DRAFT, 0, 9, 0 }, {"smcntrpmf", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, {"smepmp", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, {"smstateen", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, {"ssaia", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, + {"ssclic", ISA_SPEC_CLASS_DRAFT, 0, 9, 0 }, {"sscofpmf", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, {"ssstateen", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, {"sstc", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c index cf6e0d8b0150..e0b6e0f06c0c 100644 --- a/gas/config/tc-riscv.c +++ b/gas/config/tc-riscv.c @@ -74,6 +74,7 @@ enum riscv_csr_class CSR_CLASS_H_32, /* hypervisor, rv32 only */ CSR_CLASS_SMAIA, /* Smaia */ CSR_CLASS_SMAIA_32, /* Smaia, rv32 only */ + CSR_CLASS_SMCLIC, /* Smclic only */ CSR_CLASS_SMCNTRPMF, /* Smcntrpmf */ CSR_CLASS_SMCNTRPMF_32, /* Smcntrpmf, rv32 only */ CSR_CLASS_SMSTATEEN, /* Smstateen only */ @@ -82,6 +83,7 @@ enum riscv_csr_class CSR_CLASS_SSAIA_AND_H, /* Ssaia with H */ CSR_CLASS_SSAIA_32, /* Ssaia, rv32 only */ CSR_CLASS_SSAIA_AND_H_32, /* Ssaia with H, rv32 only */ + CSR_CLASS_SSCLIC, /* Ssclic only */ CSR_CLASS_SSSTATEEN, /* S[ms]stateen only */ CSR_CLASS_SSSTATEEN_AND_H, /* S[ms]stateen only (with H) */ CSR_CLASS_SSSTATEEN_AND_H_32, /* S[ms]stateen RV32 only (with H) */ @@ -91,6 +93,7 @@ enum riscv_csr_class CSR_CLASS_SSTC_AND_H, /* Sstc only (with H) */ CSR_CLASS_SSTC_32, /* Sstc RV32 only */ CSR_CLASS_SSTC_AND_H_32, /* Sstc RV32 only (with H) */ + CSR_CLASS_SUCLIC, /* Suclic only (not really supported yet) */ }; /* This structure holds all restricted conditions for a CSR. */ @@ -1054,6 +1057,9 @@ riscv_csr_address (const char *csr_name, case CSR_CLASS_SMAIA: extension = "smaia"; break; + case CSR_CLASS_SMCLIC: + extension = "smclic"; + break; case CSR_CLASS_SMCNTRPMF_32: is_rv32_only = true; /* Fall through. */ @@ -1086,6 +1092,9 @@ riscv_csr_address (const char *csr_name, case CSR_CLASS_SSSTATEEN: extension = "ssstateen"; break; + case CSR_CLASS_SSCLIC: + extension = "ssclic"; + break; case CSR_CLASS_SSCOFPMF_32: is_rv32_only = true; /* Fall through. */ @@ -1102,6 +1111,9 @@ riscv_csr_address (const char *csr_name, || csr_class == CSR_CLASS_SSTC_AND_H_32); extension = "sstc"; break; + case CSR_CLASS_SUCLIC: + extension = "suclic"; + break; case CSR_CLASS_DEBUG: break; default: diff --git a/gas/testsuite/gas/riscv/csr-dw-regnums.d b/gas/testsuite/gas/riscv/csr-dw-regnums.d index cabb7c719181..0d18c1eee1d5 100644 --- a/gas/testsuite/gas/riscv/csr-dw-regnums.d +++ b/gas/testsuite/gas/riscv/csr-dw-regnums.d @@ -324,6 +324,23 @@ Contents of the .* section: DW_CFA_offset_extended_sf: r4888 \(mvienh\) at cfa\+3168 DW_CFA_offset_extended_sf: r4889 \(mviph\) at cfa\+3172 DW_CFA_offset_extended_sf: r4948 \(miph\) at cfa\+3408 + DW_CFA_offset_extended_sf: r4871 \(mtvt\) at cfa\+3100 + DW_CFA_offset_extended_sf: r4933 \(mnxti\) at cfa\+3348 + DW_CFA_offset_extended_sf: r8113 \(mintstatus\) at cfa\+16068 + DW_CFA_offset_extended_sf: r4935 \(mintthresh\) at cfa\+3356 + DW_CFA_offset_extended_sf: r4936 \(mscratchcsw\) at cfa\+3360 + DW_CFA_offset_extended_sf: r4937 \(mscratchcswl\) at cfa\+3364 + DW_CFA_offset_extended_sf: r4359 \(stvt\) at cfa\+1052 + DW_CFA_offset_extended_sf: r4421 \(snxti\) at cfa\+1300 + DW_CFA_offset_extended_sf: r7601 \(sintstatus\) at cfa\+14020 + DW_CFA_offset_extended_sf: r4423 \(sintthresh\) at cfa\+1308 + DW_CFA_offset_extended_sf: r4424 \(sscratchcsw\) at cfa\+1312 + DW_CFA_offset_extended_sf: r4425 \(sscratchcswl\) at cfa\+1316 + DW_CFA_offset_extended_sf: r4103 \(utvt\) at cfa\+28 + DW_CFA_offset_extended_sf: r4165 \(unxti\) at cfa\+276 + DW_CFA_offset_extended_sf: r7345 \(uintstatus\) at cfa\+12996 + DW_CFA_offset_extended_sf: r4167 \(uintthresh\) at cfa\+284 + DW_CFA_offset_extended_sf: r4169 \(uscratchcswl\) at cfa\+292 DW_CFA_offset_extended_sf: r4897 \(mcyclecfg\) at cfa\+3204 DW_CFA_offset_extended_sf: r4898 \(minstretcfg\) at cfa\+3208 DW_CFA_offset_extended_sf: r5921 \(mcyclecfgh\) at cfa\+7300 diff --git a/gas/testsuite/gas/riscv/csr-dw-regnums.s b/gas/testsuite/gas/riscv/csr-dw-regnums.s index 428d07707790..37b48fa973ad 100644 --- a/gas/testsuite/gas/riscv/csr-dw-regnums.s +++ b/gas/testsuite/gas/riscv/csr-dw-regnums.s @@ -321,6 +321,24 @@ _start: .cfi_offset mvienh, 3168 .cfi_offset mviph, 3172 .cfi_offset miph, 3408 + # Smclic/Ssclic/Suclic extensions + .cfi_offset mtvt, 3100 + .cfi_offset mnxti, 3348 + .cfi_offset mintstatus, 16068 + .cfi_offset mintthresh, 3356 + .cfi_offset mscratchcsw, 3360 + .cfi_offset mscratchcswl, 3364 + .cfi_offset stvt, 1052 + .cfi_offset snxti, 1300 + .cfi_offset sintstatus, 14020 + .cfi_offset sintthresh, 1308 + .cfi_offset sscratchcsw, 1312 + .cfi_offset sscratchcswl, 1316 + .cfi_offset utvt, 28 + .cfi_offset unxti, 276 + .cfi_offset uintstatus, 12996 + .cfi_offset uintthresh, 284 + .cfi_offset uscratchcswl, 292 # Smcntrpmf extension .cfi_offset mcyclecfg, 3204 .cfi_offset minstretcfg, 3208 diff --git a/gas/testsuite/gas/riscv/csr-version-1p10.d b/gas/testsuite/gas/riscv/csr-version-1p10.d index dbdc077adac8..1168851b2097 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p10.d +++ b/gas/testsuite/gas/riscv/csr-version-1p10.d @@ -623,6 +623,40 @@ Disassembly of section .text: [ ]+[0-9a-f]+:[ ]+31959073[ ]+csrw[ ]+mviph,a1 [ ]+[0-9a-f]+:[ ]+35402573[ ]+csrr[ ]+a0,miph [ ]+[0-9a-f]+:[ ]+35459073[ ]+csrw[ ]+miph,a1 +[ ]+[0-9a-f]+:[ ]+30702573[ ]+csrr[ ]+a0,mtvt +[ ]+[0-9a-f]+:[ ]+30759073[ ]+csrw[ ]+mtvt,a1 +[ ]+[0-9a-f]+:[ ]+34502573[ ]+csrr[ ]+a0,mnxti +[ ]+[0-9a-f]+:[ ]+34559073[ ]+csrw[ ]+mnxti,a1 +[ ]+[0-9a-f]+:[ ]+fb102573[ ]+csrr[ ]+a0,mintstatus +[ ]+[0-9a-f]+:[ ]+fb159073[ ]+csrw[ ]+mintstatus,a1 +[ ]+[0-9a-f]+:[ ]+34702573[ ]+csrr[ ]+a0,mintthresh +[ ]+[0-9a-f]+:[ ]+34759073[ ]+csrw[ ]+mintthresh,a1 +[ ]+[0-9a-f]+:[ ]+34802573[ ]+csrr[ ]+a0,mscratchcsw +[ ]+[0-9a-f]+:[ ]+34859073[ ]+csrw[ ]+mscratchcsw,a1 +[ ]+[0-9a-f]+:[ ]+34902573[ ]+csrr[ ]+a0,mscratchcswl +[ ]+[0-9a-f]+:[ ]+34959073[ ]+csrw[ ]+mscratchcswl,a1 +[ ]+[0-9a-f]+:[ ]+10702573[ ]+csrr[ ]+a0,stvt +[ ]+[0-9a-f]+:[ ]+10759073[ ]+csrw[ ]+stvt,a1 +[ ]+[0-9a-f]+:[ ]+14502573[ ]+csrr[ ]+a0,snxti +[ ]+[0-9a-f]+:[ ]+14559073[ ]+csrw[ ]+snxti,a1 +[ ]+[0-9a-f]+:[ ]+db102573[ ]+csrr[ ]+a0,sintstatus +[ ]+[0-9a-f]+:[ ]+db159073[ ]+csrw[ ]+sintstatus,a1 +[ ]+[0-9a-f]+:[ ]+14702573[ ]+csrr[ ]+a0,sintthresh +[ ]+[0-9a-f]+:[ ]+14759073[ ]+csrw[ ]+sintthresh,a1 +[ ]+[0-9a-f]+:[ ]+14802573[ ]+csrr[ ]+a0,sscratchcsw +[ ]+[0-9a-f]+:[ ]+14859073[ ]+csrw[ ]+sscratchcsw,a1 +[ ]+[0-9a-f]+:[ ]+14902573[ ]+csrr[ ]+a0,sscratchcswl +[ ]+[0-9a-f]+:[ ]+14959073[ ]+csrw[ ]+sscratchcswl,a1 +[ ]+[0-9a-f]+:[ ]+00702573[ ]+csrr[ ]+a0,utvt +[ ]+[0-9a-f]+:[ ]+00759073[ ]+csrw[ ]+utvt,a1 +[ ]+[0-9a-f]+:[ ]+04502573[ ]+csrr[ ]+a0,unxti +[ ]+[0-9a-f]+:[ ]+04559073[ ]+csrw[ ]+unxti,a1 +[ ]+[0-9a-f]+:[ ]+cb102573[ ]+csrr[ ]+a0,uintstatus +[ ]+[0-9a-f]+:[ ]+cb159073[ ]+csrw[ ]+uintstatus,a1 +[ ]+[0-9a-f]+:[ ]+04702573[ ]+csrr[ ]+a0,uintthresh +[ ]+[0-9a-f]+:[ ]+04759073[ ]+csrw[ ]+uintthresh,a1 +[ ]+[0-9a-f]+:[ ]+04902573[ ]+csrr[ ]+a0,uscratchcswl +[ ]+[0-9a-f]+:[ ]+04959073[ ]+csrw[ ]+uscratchcswl,a1 [ ]+[0-9a-f]+:[ ]+32102573[ ]+csrr[ ]+a0,mcyclecfg [ ]+[0-9a-f]+:[ ]+32159073[ ]+csrw[ ]+mcyclecfg,a1 [ ]+[0-9a-f]+:[ ]+32202573[ ]+csrr[ ]+a0,minstretcfg diff --git a/gas/testsuite/gas/riscv/csr-version-1p10.l b/gas/testsuite/gas/riscv/csr-version-1p10.l index 054179a416db..80e79300f3f2 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p10.l +++ b/gas/testsuite/gas/riscv/csr-version-1p10.l @@ -889,6 +889,80 @@ .*Info: macro .* .*Warning: invalid CSR `miph', needs `smaia' extension .*Info: macro .* +.*Warning: invalid CSR `mtvt', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mtvt', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mnxti', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mnxti', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mintstatus', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mintstatus', needs `smclic' extension +.*Info: macro .* +.*Warning: read-only CSR is written `csrw mintstatus,a1' +.*Info: macro .* +.*Warning: invalid CSR `mintthresh', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mintthresh', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mscratchcsw', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mscratchcsw', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mscratchcswl', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mscratchcswl', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `stvt', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `stvt', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `snxti', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `snxti', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `sintstatus', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `sintstatus', needs `ssclic' extension +.*Info: macro .* +.*Warning: read-only CSR is written `csrw sintstatus,a1' +.*Info: macro .* +.*Warning: invalid CSR `sintthresh', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `sintthresh', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `sscratchcsw', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `sscratchcsw', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `sscratchcswl', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `sscratchcswl', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `utvt', needs `suclic' extension +.*Info: macro .* +.*Warning: invalid CSR `utvt', needs `suclic' extension +.*Info: macro .* +.*Warning: invalid CSR `unxti', needs `suclic' extension +.*Info: macro .* +.*Warning: invalid CSR `unxti', needs `suclic' extension +.*Info: macro .* +.*Warning: invalid CSR `uintstatus', needs `suclic' extension +.*Info: macro .* +.*Warning: invalid CSR `uintstatus', needs `suclic' extension +.*Info: macro .* +.*Warning: read-only CSR is written `csrw uintstatus,a1' +.*Info: macro .* +.*Warning: invalid CSR `uintthresh', needs `suclic' extension +.*Info: macro .* +.*Warning: invalid CSR `uintthresh', needs `suclic' extension +.*Info: macro .* +.*Warning: invalid CSR `uscratchcswl', needs `suclic' extension +.*Info: macro .* +.*Warning: invalid CSR `uscratchcswl', needs `suclic' extension +.*Info: macro .* .*Warning: invalid CSR `mcyclecfg', needs `smcntrpmf' extension .*Info: macro .* .*Warning: invalid CSR `mcyclecfg', needs `smcntrpmf' extension diff --git a/gas/testsuite/gas/riscv/csr-version-1p11.d b/gas/testsuite/gas/riscv/csr-version-1p11.d index 7ba88b6d1d53..78f12e17961e 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p11.d +++ b/gas/testsuite/gas/riscv/csr-version-1p11.d @@ -623,6 +623,40 @@ Disassembly of section .text: [ ]+[0-9a-f]+:[ ]+31959073[ ]+csrw[ ]+mviph,a1 [ ]+[0-9a-f]+:[ ]+35402573[ ]+csrr[ ]+a0,miph [ ]+[0-9a-f]+:[ ]+35459073[ ]+csrw[ ]+miph,a1 +[ ]+[0-9a-f]+:[ ]+30702573[ ]+csrr[ ]+a0,mtvt +[ ]+[0-9a-f]+:[ ]+30759073[ ]+csrw[ ]+mtvt,a1 +[ ]+[0-9a-f]+:[ ]+34502573[ ]+csrr[ ]+a0,mnxti +[ ]+[0-9a-f]+:[ ]+34559073[ ]+csrw[ ]+mnxti,a1 +[ ]+[0-9a-f]+:[ ]+fb102573[ ]+csrr[ ]+a0,mintstatus +[ ]+[0-9a-f]+:[ ]+fb159073[ ]+csrw[ ]+mintstatus,a1 +[ ]+[0-9a-f]+:[ ]+34702573[ ]+csrr[ ]+a0,mintthresh +[ ]+[0-9a-f]+:[ ]+34759073[ ]+csrw[ ]+mintthresh,a1 +[ ]+[0-9a-f]+:[ ]+34802573[ ]+csrr[ ]+a0,mscratchcsw +[ ]+[0-9a-f]+:[ ]+34859073[ ]+csrw[ ]+mscratchcsw,a1 +[ ]+[0-9a-f]+:[ ]+34902573[ ]+csrr[ ]+a0,mscratchcswl +[ ]+[0-9a-f]+:[ ]+34959073[ ]+csrw[ ]+mscratchcswl,a1 +[ ]+[0-9a-f]+:[ ]+10702573[ ]+csrr[ ]+a0,stvt +[ ]+[0-9a-f]+:[ ]+10759073[ ]+csrw[ ]+stvt,a1 +[ ]+[0-9a-f]+:[ ]+14502573[ ]+csrr[ ]+a0,snxti +[ ]+[0-9a-f]+:[ ]+14559073[ ]+csrw[ ]+snxti,a1 +[ ]+[0-9a-f]+:[ ]+db102573[ ]+csrr[ ]+a0,sintstatus +[ ]+[0-9a-f]+:[ ]+db159073[ ]+csrw[ ]+sintstatus,a1 +[ ]+[0-9a-f]+:[ ]+14702573[ ]+csrr[ ]+a0,sintthresh +[ ]+[0-9a-f]+:[ ]+14759073[ ]+csrw[ ]+sintthresh,a1 +[ ]+[0-9a-f]+:[ ]+14802573[ ]+csrr[ ]+a0,sscratchcsw +[ ]+[0-9a-f]+:[ ]+14859073[ ]+csrw[ ]+sscratchcsw,a1 +[ ]+[0-9a-f]+:[ ]+14902573[ ]+csrr[ ]+a0,sscratchcswl +[ ]+[0-9a-f]+:[ ]+14959073[ ]+csrw[ ]+sscratchcswl,a1 +[ ]+[0-9a-f]+:[ ]+00702573[ ]+csrr[ ]+a0,utvt +[ ]+[0-9a-f]+:[ ]+00759073[ ]+csrw[ ]+utvt,a1 +[ ]+[0-9a-f]+:[ ]+04502573[ ]+csrr[ ]+a0,unxti +[ ]+[0-9a-f]+:[ ]+04559073[ ]+csrw[ ]+unxti,a1 +[ ]+[0-9a-f]+:[ ]+cb102573[ ]+csrr[ ]+a0,uintstatus +[ ]+[0-9a-f]+:[ ]+cb159073[ ]+csrw[ ]+uintstatus,a1 +[ ]+[0-9a-f]+:[ ]+04702573[ ]+csrr[ ]+a0,uintthresh +[ ]+[0-9a-f]+:[ ]+04759073[ ]+csrw[ ]+uintthresh,a1 +[ ]+[0-9a-f]+:[ ]+04902573[ ]+csrr[ ]+a0,uscratchcswl +[ ]+[0-9a-f]+:[ ]+04959073[ ]+csrw[ ]+uscratchcswl,a1 [ ]+[0-9a-f]+:[ ]+32102573[ ]+csrr[ ]+a0,mcyclecfg [ ]+[0-9a-f]+:[ ]+32159073[ ]+csrw[ ]+mcyclecfg,a1 [ ]+[0-9a-f]+:[ ]+32202573[ ]+csrr[ ]+a0,minstretcfg diff --git a/gas/testsuite/gas/riscv/csr-version-1p11.l b/gas/testsuite/gas/riscv/csr-version-1p11.l index cc365f1df415..9c6c2523d9fc 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p11.l +++ b/gas/testsuite/gas/riscv/csr-version-1p11.l @@ -885,6 +885,80 @@ .*Info: macro .* .*Warning: invalid CSR `miph', needs `smaia' extension .*Info: macro .* +.*Warning: invalid CSR `mtvt', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mtvt', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mnxti', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mnxti', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mintstatus', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mintstatus', needs `smclic' extension +.*Info: macro .* +.*Warning: read-only CSR is written `csrw mintstatus,a1' +.*Info: macro .* +.*Warning: invalid CSR `mintthresh', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mintthresh', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mscratchcsw', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mscratchcsw', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mscratchcswl', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mscratchcswl', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `stvt', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `stvt', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `snxti', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `snxti', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `sintstatus', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `sintstatus', needs `ssclic' extension +.*Info: macro .* +.*Warning: read-only CSR is written `csrw sintstatus,a1' +.*Info: macro .* +.*Warning: invalid CSR `sintthresh', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `sintthresh', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `sscratchcsw', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `sscratchcsw', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `sscratchcswl', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `sscratchcswl', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `utvt', needs `suclic' extension +.*Info: macro .* +.*Warning: invalid CSR `utvt', needs `suclic' extension +.*Info: macro .* +.*Warning: invalid CSR `unxti', needs `suclic' extension +.*Info: macro .* +.*Warning: invalid CSR `unxti', needs `suclic' extension +.*Info: macro .* +.*Warning: invalid CSR `uintstatus', needs `suclic' extension +.*Info: macro .* +.*Warning: invalid CSR `uintstatus', needs `suclic' extension +.*Info: macro .* +.*Warning: read-only CSR is written `csrw uintstatus,a1' +.*Info: macro .* +.*Warning: invalid CSR `uintthresh', needs `suclic' extension +.*Info: macro .* +.*Warning: invalid CSR `uintthresh', needs `suclic' extension +.*Info: macro .* +.*Warning: invalid CSR `uscratchcswl', needs `suclic' extension +.*Info: macro .* +.*Warning: invalid CSR `uscratchcswl', needs `suclic' extension +.*Info: macro .* .*Warning: invalid CSR `mcyclecfg', needs `smcntrpmf' extension .*Info: macro .* .*Warning: invalid CSR `mcyclecfg', needs `smcntrpmf' extension diff --git a/gas/testsuite/gas/riscv/csr-version-1p12.d b/gas/testsuite/gas/riscv/csr-version-1p12.d index 677820b95265..8fe27e77e121 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p12.d +++ b/gas/testsuite/gas/riscv/csr-version-1p12.d @@ -623,6 +623,40 @@ Disassembly of section .text: [ ]+[0-9a-f]+:[ ]+31959073[ ]+csrw[ ]+mviph,a1 [ ]+[0-9a-f]+:[ ]+35402573[ ]+csrr[ ]+a0,miph [ ]+[0-9a-f]+:[ ]+35459073[ ]+csrw[ ]+miph,a1 +[ ]+[0-9a-f]+:[ ]+30702573[ ]+csrr[ ]+a0,mtvt +[ ]+[0-9a-f]+:[ ]+30759073[ ]+csrw[ ]+mtvt,a1 +[ ]+[0-9a-f]+:[ ]+34502573[ ]+csrr[ ]+a0,mnxti +[ ]+[0-9a-f]+:[ ]+34559073[ ]+csrw[ ]+mnxti,a1 +[ ]+[0-9a-f]+:[ ]+fb102573[ ]+csrr[ ]+a0,mintstatus +[ ]+[0-9a-f]+:[ ]+fb159073[ ]+csrw[ ]+mintstatus,a1 +[ ]+[0-9a-f]+:[ ]+34702573[ ]+csrr[ ]+a0,mintthresh +[ ]+[0-9a-f]+:[ ]+34759073[ ]+csrw[ ]+mintthresh,a1 +[ ]+[0-9a-f]+:[ ]+34802573[ ]+csrr[ ]+a0,mscratchcsw +[ ]+[0-9a-f]+:[ ]+34859073[ ]+csrw[ ]+mscratchcsw,a1 +[ ]+[0-9a-f]+:[ ]+34902573[ ]+csrr[ ]+a0,mscratchcswl +[ ]+[0-9a-f]+:[ ]+34959073[ ]+csrw[ ]+mscratchcswl,a1 +[ ]+[0-9a-f]+:[ ]+10702573[ ]+csrr[ ]+a0,stvt +[ ]+[0-9a-f]+:[ ]+10759073[ ]+csrw[ ]+stvt,a1 +[ ]+[0-9a-f]+:[ ]+14502573[ ]+csrr[ ]+a0,snxti +[ ]+[0-9a-f]+:[ ]+14559073[ ]+csrw[ ]+snxti,a1 +[ ]+[0-9a-f]+:[ ]+db102573[ ]+csrr[ ]+a0,sintstatus +[ ]+[0-9a-f]+:[ ]+db159073[ ]+csrw[ ]+sintstatus,a1 +[ ]+[0-9a-f]+:[ ]+14702573[ ]+csrr[ ]+a0,sintthresh +[ ]+[0-9a-f]+:[ ]+14759073[ ]+csrw[ ]+sintthresh,a1 +[ ]+[0-9a-f]+:[ ]+14802573[ ]+csrr[ ]+a0,sscratchcsw +[ ]+[0-9a-f]+:[ ]+14859073[ ]+csrw[ ]+sscratchcsw,a1 +[ ]+[0-9a-f]+:[ ]+14902573[ ]+csrr[ ]+a0,sscratchcswl +[ ]+[0-9a-f]+:[ ]+14959073[ ]+csrw[ ]+sscratchcswl,a1 +[ ]+[0-9a-f]+:[ ]+00702573[ ]+csrr[ ]+a0,utvt +[ ]+[0-9a-f]+:[ ]+00759073[ ]+csrw[ ]+utvt,a1 +[ ]+[0-9a-f]+:[ ]+04502573[ ]+csrr[ ]+a0,unxti +[ ]+[0-9a-f]+:[ ]+04559073[ ]+csrw[ ]+unxti,a1 +[ ]+[0-9a-f]+:[ ]+cb102573[ ]+csrr[ ]+a0,uintstatus +[ ]+[0-9a-f]+:[ ]+cb159073[ ]+csrw[ ]+uintstatus,a1 +[ ]+[0-9a-f]+:[ ]+04702573[ ]+csrr[ ]+a0,uintthresh +[ ]+[0-9a-f]+:[ ]+04759073[ ]+csrw[ ]+uintthresh,a1 +[ ]+[0-9a-f]+:[ ]+04902573[ ]+csrr[ ]+a0,uscratchcswl +[ ]+[0-9a-f]+:[ ]+04959073[ ]+csrw[ ]+uscratchcswl,a1 [ ]+[0-9a-f]+:[ ]+32102573[ ]+csrr[ ]+a0,mcyclecfg [ ]+[0-9a-f]+:[ ]+32159073[ ]+csrw[ ]+mcyclecfg,a1 [ ]+[0-9a-f]+:[ ]+32202573[ ]+csrr[ ]+a0,minstretcfg diff --git a/gas/testsuite/gas/riscv/csr-version-1p12.l b/gas/testsuite/gas/riscv/csr-version-1p12.l index 7a7f5f717c52..491cf0dac408 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p12.l +++ b/gas/testsuite/gas/riscv/csr-version-1p12.l @@ -609,6 +609,80 @@ .*Info: macro .* .*Warning: invalid CSR `miph', needs `smaia' extension .*Info: macro .* +.*Warning: invalid CSR `mtvt', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mtvt', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mnxti', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mnxti', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mintstatus', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mintstatus', needs `smclic' extension +.*Info: macro .* +.*Warning: read-only CSR is written `csrw mintstatus,a1' +.*Info: macro .* +.*Warning: invalid CSR `mintthresh', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mintthresh', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mscratchcsw', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mscratchcsw', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mscratchcswl', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mscratchcswl', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `stvt', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `stvt', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `snxti', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `snxti', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `sintstatus', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `sintstatus', needs `ssclic' extension +.*Info: macro .* +.*Warning: read-only CSR is written `csrw sintstatus,a1' +.*Info: macro .* +.*Warning: invalid CSR `sintthresh', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `sintthresh', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `sscratchcsw', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `sscratchcsw', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `sscratchcswl', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `sscratchcswl', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `utvt', needs `suclic' extension +.*Info: macro .* +.*Warning: invalid CSR `utvt', needs `suclic' extension +.*Info: macro .* +.*Warning: invalid CSR `unxti', needs `suclic' extension +.*Info: macro .* +.*Warning: invalid CSR `unxti', needs `suclic' extension +.*Info: macro .* +.*Warning: invalid CSR `uintstatus', needs `suclic' extension +.*Info: macro .* +.*Warning: invalid CSR `uintstatus', needs `suclic' extension +.*Info: macro .* +.*Warning: read-only CSR is written `csrw uintstatus,a1' +.*Info: macro .* +.*Warning: invalid CSR `uintthresh', needs `suclic' extension +.*Info: macro .* +.*Warning: invalid CSR `uintthresh', needs `suclic' extension +.*Info: macro .* +.*Warning: invalid CSR `uscratchcswl', needs `suclic' extension +.*Info: macro .* +.*Warning: invalid CSR `uscratchcswl', needs `suclic' extension +.*Info: macro .* .*Warning: invalid CSR `mcyclecfg', needs `smcntrpmf' extension .*Info: macro .* .*Warning: invalid CSR `mcyclecfg', needs `smcntrpmf' extension diff --git a/gas/testsuite/gas/riscv/csr-version-1p9p1.d b/gas/testsuite/gas/riscv/csr-version-1p9p1.d index f4d2b04ca6a4..3f792b3ae001 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p9p1.d +++ b/gas/testsuite/gas/riscv/csr-version-1p9p1.d @@ -623,6 +623,40 @@ Disassembly of section .text: [ ]+[0-9a-f]+:[ ]+31959073[ ]+csrw[ ]+mviph,a1 [ ]+[0-9a-f]+:[ ]+35402573[ ]+csrr[ ]+a0,miph [ ]+[0-9a-f]+:[ ]+35459073[ ]+csrw[ ]+miph,a1 +[ ]+[0-9a-f]+:[ ]+30702573[ ]+csrr[ ]+a0,mtvt +[ ]+[0-9a-f]+:[ ]+30759073[ ]+csrw[ ]+mtvt,a1 +[ ]+[0-9a-f]+:[ ]+34502573[ ]+csrr[ ]+a0,mnxti +[ ]+[0-9a-f]+:[ ]+34559073[ ]+csrw[ ]+mnxti,a1 +[ ]+[0-9a-f]+:[ ]+fb102573[ ]+csrr[ ]+a0,mintstatus +[ ]+[0-9a-f]+:[ ]+fb159073[ ]+csrw[ ]+mintstatus,a1 +[ ]+[0-9a-f]+:[ ]+34702573[ ]+csrr[ ]+a0,mintthresh +[ ]+[0-9a-f]+:[ ]+34759073[ ]+csrw[ ]+mintthresh,a1 +[ ]+[0-9a-f]+:[ ]+34802573[ ]+csrr[ ]+a0,mscratchcsw +[ ]+[0-9a-f]+:[ ]+34859073[ ]+csrw[ ]+mscratchcsw,a1 +[ ]+[0-9a-f]+:[ ]+34902573[ ]+csrr[ ]+a0,mscratchcswl +[ ]+[0-9a-f]+:[ ]+34959073[ ]+csrw[ ]+mscratchcswl,a1 +[ ]+[0-9a-f]+:[ ]+10702573[ ]+csrr[ ]+a0,stvt +[ ]+[0-9a-f]+:[ ]+10759073[ ]+csrw[ ]+stvt,a1 +[ ]+[0-9a-f]+:[ ]+14502573[ ]+csrr[ ]+a0,snxti +[ ]+[0-9a-f]+:[ ]+14559073[ ]+csrw[ ]+snxti,a1 +[ ]+[0-9a-f]+:[ ]+db102573[ ]+csrr[ ]+a0,sintstatus +[ ]+[0-9a-f]+:[ ]+db159073[ ]+csrw[ ]+sintstatus,a1 +[ ]+[0-9a-f]+:[ ]+14702573[ ]+csrr[ ]+a0,sintthresh +[ ]+[0-9a-f]+:[ ]+14759073[ ]+csrw[ ]+sintthresh,a1 +[ ]+[0-9a-f]+:[ ]+14802573[ ]+csrr[ ]+a0,sscratchcsw +[ ]+[0-9a-f]+:[ ]+14859073[ ]+csrw[ ]+sscratchcsw,a1 +[ ]+[0-9a-f]+:[ ]+14902573[ ]+csrr[ ]+a0,sscratchcswl +[ ]+[0-9a-f]+:[ ]+14959073[ ]+csrw[ ]+sscratchcswl,a1 +[ ]+[0-9a-f]+:[ ]+00702573[ ]+csrr[ ]+a0,utvt +[ ]+[0-9a-f]+:[ ]+00759073[ ]+csrw[ ]+utvt,a1 +[ ]+[0-9a-f]+:[ ]+04502573[ ]+csrr[ ]+a0,unxti +[ ]+[0-9a-f]+:[ ]+04559073[ ]+csrw[ ]+unxti,a1 +[ ]+[0-9a-f]+:[ ]+cb102573[ ]+csrr[ ]+a0,uintstatus +[ ]+[0-9a-f]+:[ ]+cb159073[ ]+csrw[ ]+uintstatus,a1 +[ ]+[0-9a-f]+:[ ]+04702573[ ]+csrr[ ]+a0,uintthresh +[ ]+[0-9a-f]+:[ ]+04759073[ ]+csrw[ ]+uintthresh,a1 +[ ]+[0-9a-f]+:[ ]+04902573[ ]+csrr[ ]+a0,uscratchcswl +[ ]+[0-9a-f]+:[ ]+04959073[ ]+csrw[ ]+uscratchcswl,a1 [ ]+[0-9a-f]+:[ ]+32102573[ ]+csrr[ ]+a0,mscounteren [ ]+[0-9a-f]+:[ ]+32159073[ ]+csrw[ ]+mscounteren,a1 [ ]+[0-9a-f]+:[ ]+32202573[ ]+csrr[ ]+a0,mhcounteren diff --git a/gas/testsuite/gas/riscv/csr-version-1p9p1.l b/gas/testsuite/gas/riscv/csr-version-1p9p1.l index 7fcd73ab7ddd..223bc42784b4 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p9p1.l +++ b/gas/testsuite/gas/riscv/csr-version-1p9p1.l @@ -989,6 +989,80 @@ .*Info: macro .* .*Warning: invalid CSR `miph', needs `smaia' extension .*Info: macro .* +.*Warning: invalid CSR `mtvt', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mtvt', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mnxti', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mnxti', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mintstatus', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mintstatus', needs `smclic' extension +.*Info: macro .* +.*Warning: read-only CSR is written `csrw mintstatus,a1' +.*Info: macro .* +.*Warning: invalid CSR `mintthresh', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mintthresh', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mscratchcsw', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mscratchcsw', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mscratchcswl', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `mscratchcswl', needs `smclic' extension +.*Info: macro .* +.*Warning: invalid CSR `stvt', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `stvt', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `snxti', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `snxti', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `sintstatus', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `sintstatus', needs `ssclic' extension +.*Info: macro .* +.*Warning: read-only CSR is written `csrw sintstatus,a1' +.*Info: macro .* +.*Warning: invalid CSR `sintthresh', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `sintthresh', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `sscratchcsw', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `sscratchcsw', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `sscratchcswl', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `sscratchcswl', needs `ssclic' extension +.*Info: macro .* +.*Warning: invalid CSR `utvt', needs `suclic' extension +.*Info: macro .* +.*Warning: invalid CSR `utvt', needs `suclic' extension +.*Info: macro .* +.*Warning: invalid CSR `unxti', needs `suclic' extension +.*Info: macro .* +.*Warning: invalid CSR `unxti', needs `suclic' extension +.*Info: macro .* +.*Warning: invalid CSR `uintstatus', needs `suclic' extension +.*Info: macro .* +.*Warning: invalid CSR `uintstatus', needs `suclic' extension +.*Info: macro .* +.*Warning: read-only CSR is written `csrw uintstatus,a1' +.*Info: macro .* +.*Warning: invalid CSR `uintthresh', needs `suclic' extension +.*Info: macro .* +.*Warning: invalid CSR `uintthresh', needs `suclic' extension +.*Info: macro .* +.*Warning: invalid CSR `uscratchcswl', needs `suclic' extension +.*Info: macro .* +.*Warning: invalid CSR `uscratchcswl', needs `suclic' extension +.*Info: macro .* .*Warning: invalid CSR `mcyclecfg', needs `smcntrpmf' extension .*Info: macro .* .*Warning: invalid CSR `mcyclecfg' for the privileged spec `1.9.1' diff --git a/gas/testsuite/gas/riscv/csr.s b/gas/testsuite/gas/riscv/csr.s index 3d8da5488a04..14673ce16a96 100644 --- a/gas/testsuite/gas/riscv/csr.s +++ b/gas/testsuite/gas/riscv/csr.s @@ -350,6 +350,25 @@ csr mviph csr miph + # Smclic/Ssclic/Suclic extensions + csr mtvt + csr mnxti + csr mintstatus + csr mintthresh + csr mscratchcsw + csr mscratchcswl + csr stvt + csr snxti + csr sintstatus + csr sintthresh + csr sscratchcsw + csr sscratchcswl + csr utvt + csr unxti + csr uintstatus + csr uintthresh + csr uscratchcswl + # Smcntrpmf extension csr mcyclecfg csr minstretcfg diff --git a/include/opcode/riscv-opc.h b/include/opcode/riscv-opc.h index 2a26c45f0c24..8b3a42529f2a 100644 --- a/include/opcode/riscv-opc.h +++ b/include/opcode/riscv-opc.h @@ -2878,6 +2878,24 @@ #define CSR_MVIENH 0x318 #define CSR_MVIPH 0x319 #define CSR_MIPH 0x354 +/* Smclic/Ssclic/Suclic extension CSR addresses (including non-ratified user interrupts). */ +#define CSR_MTVT 0x307 +#define CSR_MNXTI 0x345 +#define CSR_MINTSTATUS 0xfb1 +#define CSR_MINTTHRESH 0x347 +#define CSR_MSCRATCHCSW 0x348 +#define CSR_MSCRATCHCSWL 0x349 +#define CSR_STVT 0x107 +#define CSR_SNXTI 0x145 +#define CSR_SINTSTATUS 0xdb1 +#define CSR_SINTTHRESH 0x147 +#define CSR_SSCRATCHCSW 0x148 +#define CSR_SSCRATCHCSWL 0x149 +#define CSR_UTVT 0x7 +#define CSR_UNXTI 0x45 +#define CSR_UINTSTATUS 0xcb1 +#define CSR_UINTTHRESH 0x47 +#define CSR_USCRATCHCSWL 0x49 /* Smcntrpmf extension. */ #define CSR_MCYCLECFG 0x321 #define CSR_MINSTRETCFG 0x322 @@ -3869,6 +3887,24 @@ DECLARE_CSR(mieh, CSR_MIEH, CSR_CLASS_SMAIA_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_ DECLARE_CSR(mvienh, CSR_MVIENH, CSR_CLASS_SMAIA_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) DECLARE_CSR(mviph, CSR_MVIPH, CSR_CLASS_SMAIA_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) DECLARE_CSR(miph, CSR_MIPH, CSR_CLASS_SMAIA_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +/* Smclic/Ssclic/Suclic extensions (including non-ratified user interrupts). */ +DECLARE_CSR(mtvt, CSR_MTVT, CSR_CLASS_SMCLIC, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mnxti, CSR_MNXTI, CSR_CLASS_SMCLIC, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mintstatus, CSR_MINTSTATUS, CSR_CLASS_SMCLIC, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mintthresh, CSR_MINTTHRESH, CSR_CLASS_SMCLIC, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mscratchcsw, CSR_MSCRATCHCSW, CSR_CLASS_SMCLIC, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mscratchcswl, CSR_MSCRATCHCSWL, CSR_CLASS_SMCLIC, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(stvt, CSR_STVT, CSR_CLASS_SSCLIC, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(snxti, CSR_SNXTI, CSR_CLASS_SSCLIC, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(sintstatus, CSR_SINTSTATUS, CSR_CLASS_SSCLIC, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(sintthresh, CSR_SINTTHRESH, CSR_CLASS_SSCLIC, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(sscratchcsw, CSR_SSCRATCHCSW, CSR_CLASS_SSCLIC, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(sscratchcswl, CSR_SSCRATCHCSWL, CSR_CLASS_SSCLIC, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(utvt, CSR_UTVT, CSR_CLASS_SUCLIC, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(unxti, CSR_UNXTI, CSR_CLASS_SUCLIC, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(uintstatus, CSR_UINTSTATUS, CSR_CLASS_SUCLIC, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(uintthresh, CSR_UINTTHRESH, CSR_CLASS_SUCLIC, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(uscratchcswl, CSR_USCRATCHCSWL, CSR_CLASS_SUCLIC, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) /* Smcntrpmf extension (incompatible with the privileged spec v1.9.1). */ DECLARE_CSR(mcyclecfg, CSR_MCYCLECFG, CSR_CLASS_SMCNTRPMF, PRIV_SPEC_CLASS_1P10, PRIV_SPEC_CLASS_DRAFT) DECLARE_CSR(minstretcfg, CSR_MINSTRETCFG, CSR_CLASS_SMCNTRPMF, PRIV_SPEC_CLASS_1P10, PRIV_SPEC_CLASS_DRAFT) -- 2.42.0