From: Tsukasa OI Date: Fri, 24 Jun 2022 02:51:55 +0000 (+0900) Subject: RISC-V: Add 'Sscofpmf' extension with its CSRs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=713f370809b523277f8ecc69680ab591ce94da5e;p=binutils-gdb.git RISC-V: Add 'Sscofpmf' extension with its CSRs This commit adds Count Overflow and Mode-Based Filtering Extension (Sscofpmf) and its CSRs. bfd/ChangeLog: * elfxx-riscv.c (riscv_supported_std_s_ext): Add 'Sscofpmf' extension to valid 'S' extension list. gas/ChangeLog: * config/tc-riscv.c (enum riscv_csr_class): Add CSR classes for 'Sscofpmf' extension. (riscv_csr_address): Add handling for new CSR classes. * testsuite/gas/riscv/csr-dw-regnums.s: Add new CSRs. * testsuite/gas/riscv/csr-dw-regnums.d: Likewise. * testsuite/gas/riscv/csr.s: Add new CSRs. * 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_SCOUNTOVF, CSR_MHPMEVENT3H, CSR_MHPMEVENT4H, CSR_MHPMEVENT5H, CSR_MHPMEVENT6H, CSR_MHPMEVENT7H, CSR_MHPMEVENT8H, CSR_MHPMEVENT9H, CSR_MHPMEVENT10H, CSR_MHPMEVENT11H, CSR_MHPMEVENT12H, CSR_MHPMEVENT13H, CSR_MHPMEVENT14H, CSR_MHPMEVENT15H, CSR_MHPMEVENT16H, CSR_MHPMEVENT17H, CSR_MHPMEVENT18H, CSR_MHPMEVENT19H, CSR_MHPMEVENT20H, CSR_MHPMEVENT21H, CSR_MHPMEVENT22H, CSR_MHPMEVENT23H, CSR_MHPMEVENT24H, CSR_MHPMEVENT25H, CSR_MHPMEVENT26H, CSR_MHPMEVENT27H, CSR_MHPMEVENT28H, CSR_MHPMEVENT29H, CSR_MHPMEVENT30H, CSR_MHPMEVENT31H): New CSR macros. --- diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c index f72b827651e..855501c8eeb 100644 --- a/bfd/elfxx-riscv.c +++ b/bfd/elfxx-riscv.c @@ -1232,6 +1232,7 @@ static struct riscv_supported_ext riscv_supported_std_z_ext[] = static struct riscv_supported_ext riscv_supported_std_s_ext[] = { {"smstateen", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, + {"sscofpmf", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, {"svinval", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, {NULL, 0, 0, 0, 0} }; diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c index 660b2dd58bb..2f6180ea51e 100644 --- a/gas/config/tc-riscv.c +++ b/gas/config/tc-riscv.c @@ -72,6 +72,8 @@ enum riscv_csr_class CSR_CLASS_SMSTATEEN_AND_H, /* Smstateen only (with H) */ CSR_CLASS_SMSTATEEN_32, /* Smstateen RV32 only */ CSR_CLASS_SMSTATEEN_AND_H_32, /* Smstateen RV32 only (with H) */ + CSR_CLASS_SSCOFPMF, /* Sscofpmf only */ + CSR_CLASS_SSCOFPMF_32, /* Sscofpmf RV32 only */ }; /* This structure holds all restricted conditions for a CSR. */ @@ -941,6 +943,12 @@ riscv_csr_address (const char *csr_name, || csr_class == CSR_CLASS_SMSTATEEN_AND_H_32); extension = "smstateen"; break; + case CSR_CLASS_SSCOFPMF_32: + is_rv32_only = true; + /* Fall through. */ + case CSR_CLASS_SSCOFPMF: + extension = "sscofpmf"; + 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 0c9ec6e4035..2f353293faa 100644 --- a/gas/testsuite/gas/riscv/csr-dw-regnums.d +++ b/gas/testsuite/gas/riscv/csr-dw-regnums.d @@ -333,6 +333,36 @@ Contents of the .* section: DW_CFA_offset_extended_sf: r5661 \(hstateen1h\) at cfa\+6260 DW_CFA_offset_extended_sf: r5662 \(hstateen2h\) at cfa\+6264 DW_CFA_offset_extended_sf: r5663 \(hstateen3h\) at cfa\+6268 + DW_CFA_offset_extended_sf: r7584 \(scountovf\) at cfa\+13952 + DW_CFA_offset_extended_sf: r5923 \(mhpmevent3h\) at cfa\+7308 + DW_CFA_offset_extended_sf: r5924 \(mhpmevent4h\) at cfa\+7312 + DW_CFA_offset_extended_sf: r5925 \(mhpmevent5h\) at cfa\+7316 + DW_CFA_offset_extended_sf: r5926 \(mhpmevent6h\) at cfa\+7320 + DW_CFA_offset_extended_sf: r5927 \(mhpmevent7h\) at cfa\+7324 + DW_CFA_offset_extended_sf: r5928 \(mhpmevent8h\) at cfa\+7328 + DW_CFA_offset_extended_sf: r5929 \(mhpmevent9h\) at cfa\+7332 + DW_CFA_offset_extended_sf: r5930 \(mhpmevent10h\) at cfa\+7336 + DW_CFA_offset_extended_sf: r5931 \(mhpmevent11h\) at cfa\+7340 + DW_CFA_offset_extended_sf: r5932 \(mhpmevent12h\) at cfa\+7344 + DW_CFA_offset_extended_sf: r5933 \(mhpmevent13h\) at cfa\+7348 + DW_CFA_offset_extended_sf: r5934 \(mhpmevent14h\) at cfa\+7352 + DW_CFA_offset_extended_sf: r5935 \(mhpmevent15h\) at cfa\+7356 + DW_CFA_offset_extended_sf: r5936 \(mhpmevent16h\) at cfa\+7360 + DW_CFA_offset_extended_sf: r5937 \(mhpmevent17h\) at cfa\+7364 + DW_CFA_offset_extended_sf: r5938 \(mhpmevent18h\) at cfa\+7368 + DW_CFA_offset_extended_sf: r5939 \(mhpmevent19h\) at cfa\+7372 + DW_CFA_offset_extended_sf: r5940 \(mhpmevent20h\) at cfa\+7376 + DW_CFA_offset_extended_sf: r5941 \(mhpmevent21h\) at cfa\+7380 + DW_CFA_offset_extended_sf: r5942 \(mhpmevent22h\) at cfa\+7384 + DW_CFA_offset_extended_sf: r5943 \(mhpmevent23h\) at cfa\+7388 + DW_CFA_offset_extended_sf: r5944 \(mhpmevent24h\) at cfa\+7392 + DW_CFA_offset_extended_sf: r5945 \(mhpmevent25h\) at cfa\+7396 + DW_CFA_offset_extended_sf: r5946 \(mhpmevent26h\) at cfa\+7400 + DW_CFA_offset_extended_sf: r5947 \(mhpmevent27h\) at cfa\+7404 + DW_CFA_offset_extended_sf: r5948 \(mhpmevent28h\) at cfa\+7408 + DW_CFA_offset_extended_sf: r5949 \(mhpmevent29h\) at cfa\+7412 + DW_CFA_offset_extended_sf: r5950 \(mhpmevent30h\) at cfa\+7416 + DW_CFA_offset_extended_sf: r5951 \(mhpmevent31h\) at cfa\+7420 DW_CFA_offset_extended_sf: r4163 \(utval\) at cfa\+268 DW_CFA_offset_extended_sf: r4419 \(stval\) at cfa\+1292 DW_CFA_offset_extended_sf: r4480 \(satp\) at cfa\+1536 diff --git a/gas/testsuite/gas/riscv/csr-dw-regnums.s b/gas/testsuite/gas/riscv/csr-dw-regnums.s index 2afadac49f6..caac321c6e2 100644 --- a/gas/testsuite/gas/riscv/csr-dw-regnums.s +++ b/gas/testsuite/gas/riscv/csr-dw-regnums.s @@ -328,6 +328,37 @@ _start: .cfi_offset hstateen1h, 6260 .cfi_offset hstateen2h, 6264 .cfi_offset hstateen3h, 6268 + # Sscofpmf extension + .cfi_offset scountovf, 13952 + .cfi_offset mhpmevent3h, 7308 + .cfi_offset mhpmevent4h, 7312 + .cfi_offset mhpmevent5h, 7316 + .cfi_offset mhpmevent6h, 7320 + .cfi_offset mhpmevent7h, 7324 + .cfi_offset mhpmevent8h, 7328 + .cfi_offset mhpmevent9h, 7332 + .cfi_offset mhpmevent10h, 7336 + .cfi_offset mhpmevent11h, 7340 + .cfi_offset mhpmevent12h, 7344 + .cfi_offset mhpmevent13h, 7348 + .cfi_offset mhpmevent14h, 7352 + .cfi_offset mhpmevent15h, 7356 + .cfi_offset mhpmevent16h, 7360 + .cfi_offset mhpmevent17h, 7364 + .cfi_offset mhpmevent18h, 7368 + .cfi_offset mhpmevent19h, 7372 + .cfi_offset mhpmevent20h, 7376 + .cfi_offset mhpmevent21h, 7380 + .cfi_offset mhpmevent22h, 7384 + .cfi_offset mhpmevent23h, 7388 + .cfi_offset mhpmevent24h, 7392 + .cfi_offset mhpmevent25h, 7396 + .cfi_offset mhpmevent26h, 7400 + .cfi_offset mhpmevent27h, 7404 + .cfi_offset mhpmevent28h, 7408 + .cfi_offset mhpmevent29h, 7412 + .cfi_offset mhpmevent30h, 7416 + .cfi_offset mhpmevent31h, 7420 # dropped .cfi_offset ubadaddr, 268 # aliases .cfi_offset sbadaddr, 1292 # aliases diff --git a/gas/testsuite/gas/riscv/csr-version-1p10.d b/gas/testsuite/gas/riscv/csr-version-1p10.d index 65b370b5f77..90cc5dd3a1e 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p10.d +++ b/gas/testsuite/gas/riscv/csr-version-1p10.d @@ -641,6 +641,66 @@ Disassembly of section .text: [ ]+[0-9a-f]+:[ ]+61e59073[ ]+csrw[ ]+hstateen2h,a1 [ ]+[0-9a-f]+:[ ]+61f02573[ ]+csrr[ ]+a0,hstateen3h [ ]+[0-9a-f]+:[ ]+61f59073[ ]+csrw[ ]+hstateen3h,a1 +[ ]+[0-9a-f]+:[ ]+da002573[ ]+csrr[ ]+a0,scountovf +[ ]+[0-9a-f]+:[ ]+da059073[ ]+csrw[ ]+scountovf,a1 +[ ]+[0-9a-f]+:[ ]+72302573[ ]+csrr[ ]+a0,mhpmevent3h +[ ]+[0-9a-f]+:[ ]+72359073[ ]+csrw[ ]+mhpmevent3h,a1 +[ ]+[0-9a-f]+:[ ]+72402573[ ]+csrr[ ]+a0,mhpmevent4h +[ ]+[0-9a-f]+:[ ]+72459073[ ]+csrw[ ]+mhpmevent4h,a1 +[ ]+[0-9a-f]+:[ ]+72502573[ ]+csrr[ ]+a0,mhpmevent5h +[ ]+[0-9a-f]+:[ ]+72559073[ ]+csrw[ ]+mhpmevent5h,a1 +[ ]+[0-9a-f]+:[ ]+72602573[ ]+csrr[ ]+a0,mhpmevent6h +[ ]+[0-9a-f]+:[ ]+72659073[ ]+csrw[ ]+mhpmevent6h,a1 +[ ]+[0-9a-f]+:[ ]+72702573[ ]+csrr[ ]+a0,mhpmevent7h +[ ]+[0-9a-f]+:[ ]+72759073[ ]+csrw[ ]+mhpmevent7h,a1 +[ ]+[0-9a-f]+:[ ]+72802573[ ]+csrr[ ]+a0,mhpmevent8h +[ ]+[0-9a-f]+:[ ]+72859073[ ]+csrw[ ]+mhpmevent8h,a1 +[ ]+[0-9a-f]+:[ ]+72902573[ ]+csrr[ ]+a0,mhpmevent9h +[ ]+[0-9a-f]+:[ ]+72959073[ ]+csrw[ ]+mhpmevent9h,a1 +[ ]+[0-9a-f]+:[ ]+72a02573[ ]+csrr[ ]+a0,mhpmevent10h +[ ]+[0-9a-f]+:[ ]+72a59073[ ]+csrw[ ]+mhpmevent10h,a1 +[ ]+[0-9a-f]+:[ ]+72b02573[ ]+csrr[ ]+a0,mhpmevent11h +[ ]+[0-9a-f]+:[ ]+72b59073[ ]+csrw[ ]+mhpmevent11h,a1 +[ ]+[0-9a-f]+:[ ]+72c02573[ ]+csrr[ ]+a0,mhpmevent12h +[ ]+[0-9a-f]+:[ ]+72c59073[ ]+csrw[ ]+mhpmevent12h,a1 +[ ]+[0-9a-f]+:[ ]+72d02573[ ]+csrr[ ]+a0,mhpmevent13h +[ ]+[0-9a-f]+:[ ]+72d59073[ ]+csrw[ ]+mhpmevent13h,a1 +[ ]+[0-9a-f]+:[ ]+72e02573[ ]+csrr[ ]+a0,mhpmevent14h +[ ]+[0-9a-f]+:[ ]+72e59073[ ]+csrw[ ]+mhpmevent14h,a1 +[ ]+[0-9a-f]+:[ ]+72f02573[ ]+csrr[ ]+a0,mhpmevent15h +[ ]+[0-9a-f]+:[ ]+72f59073[ ]+csrw[ ]+mhpmevent15h,a1 +[ ]+[0-9a-f]+:[ ]+73002573[ ]+csrr[ ]+a0,mhpmevent16h +[ ]+[0-9a-f]+:[ ]+73059073[ ]+csrw[ ]+mhpmevent16h,a1 +[ ]+[0-9a-f]+:[ ]+73102573[ ]+csrr[ ]+a0,mhpmevent17h +[ ]+[0-9a-f]+:[ ]+73159073[ ]+csrw[ ]+mhpmevent17h,a1 +[ ]+[0-9a-f]+:[ ]+73202573[ ]+csrr[ ]+a0,mhpmevent18h +[ ]+[0-9a-f]+:[ ]+73259073[ ]+csrw[ ]+mhpmevent18h,a1 +[ ]+[0-9a-f]+:[ ]+73302573[ ]+csrr[ ]+a0,mhpmevent19h +[ ]+[0-9a-f]+:[ ]+73359073[ ]+csrw[ ]+mhpmevent19h,a1 +[ ]+[0-9a-f]+:[ ]+73402573[ ]+csrr[ ]+a0,mhpmevent20h +[ ]+[0-9a-f]+:[ ]+73459073[ ]+csrw[ ]+mhpmevent20h,a1 +[ ]+[0-9a-f]+:[ ]+73502573[ ]+csrr[ ]+a0,mhpmevent21h +[ ]+[0-9a-f]+:[ ]+73559073[ ]+csrw[ ]+mhpmevent21h,a1 +[ ]+[0-9a-f]+:[ ]+73602573[ ]+csrr[ ]+a0,mhpmevent22h +[ ]+[0-9a-f]+:[ ]+73659073[ ]+csrw[ ]+mhpmevent22h,a1 +[ ]+[0-9a-f]+:[ ]+73702573[ ]+csrr[ ]+a0,mhpmevent23h +[ ]+[0-9a-f]+:[ ]+73759073[ ]+csrw[ ]+mhpmevent23h,a1 +[ ]+[0-9a-f]+:[ ]+73802573[ ]+csrr[ ]+a0,mhpmevent24h +[ ]+[0-9a-f]+:[ ]+73859073[ ]+csrw[ ]+mhpmevent24h,a1 +[ ]+[0-9a-f]+:[ ]+73902573[ ]+csrr[ ]+a0,mhpmevent25h +[ ]+[0-9a-f]+:[ ]+73959073[ ]+csrw[ ]+mhpmevent25h,a1 +[ ]+[0-9a-f]+:[ ]+73a02573[ ]+csrr[ ]+a0,mhpmevent26h +[ ]+[0-9a-f]+:[ ]+73a59073[ ]+csrw[ ]+mhpmevent26h,a1 +[ ]+[0-9a-f]+:[ ]+73b02573[ ]+csrr[ ]+a0,mhpmevent27h +[ ]+[0-9a-f]+:[ ]+73b59073[ ]+csrw[ ]+mhpmevent27h,a1 +[ ]+[0-9a-f]+:[ ]+73c02573[ ]+csrr[ ]+a0,mhpmevent28h +[ ]+[0-9a-f]+:[ ]+73c59073[ ]+csrw[ ]+mhpmevent28h,a1 +[ ]+[0-9a-f]+:[ ]+73d02573[ ]+csrr[ ]+a0,mhpmevent29h +[ ]+[0-9a-f]+:[ ]+73d59073[ ]+csrw[ ]+mhpmevent29h,a1 +[ ]+[0-9a-f]+:[ ]+73e02573[ ]+csrr[ ]+a0,mhpmevent30h +[ ]+[0-9a-f]+:[ ]+73e59073[ ]+csrw[ ]+mhpmevent30h,a1 +[ ]+[0-9a-f]+:[ ]+73f02573[ ]+csrr[ ]+a0,mhpmevent31h +[ ]+[0-9a-f]+:[ ]+73f59073[ ]+csrw[ ]+mhpmevent31h,a1 [ ]+[0-9a-f]+:[ ]+04302573[ ]+csrr[ ]+a0,utval [ ]+[0-9a-f]+:[ ]+04359073[ ]+csrw[ ]+utval,a1 [ ]+[0-9a-f]+:[ ]+14302573[ ]+csrr[ ]+a0,stval diff --git a/gas/testsuite/gas/riscv/csr-version-1p10.l b/gas/testsuite/gas/riscv/csr-version-1p10.l index b1e42268e92..e4144b6477a 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p10.l +++ b/gas/testsuite/gas/riscv/csr-version-1p10.l @@ -483,6 +483,125 @@ .*Warning: invalid CSR `hstateen3h', needs rv32i extension .*Warning: invalid CSR `hstateen3h', needs `h' extension .*Warning: invalid CSR `hstateen3h', needs `smstateen' extension +.*Warning: invalid CSR `scountovf', needs `sscofpmf' extension +.*Warning: invalid CSR `scountovf', needs `sscofpmf' extension +.*Warning: read-only CSR is written `csrw scountovf,a1' +.*Warning: invalid CSR `mhpmevent3h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent3h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent3h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent3h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent4h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent4h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent4h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent4h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent5h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent5h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent5h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent5h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent6h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent6h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent6h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent6h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent7h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent7h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent7h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent7h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent8h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent8h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent8h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent8h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent9h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent9h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent9h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent9h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent10h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent10h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent10h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent10h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent11h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent11h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent11h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent11h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent12h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent12h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent12h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent12h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent13h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent13h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent13h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent13h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent14h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent14h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent14h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent14h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent15h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent15h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent15h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent15h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent16h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent16h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent16h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent16h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent17h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent17h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent17h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent17h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent18h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent18h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent18h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent18h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent19h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent19h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent19h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent19h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent20h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent20h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent20h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent20h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent21h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent21h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent21h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent21h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent22h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent22h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent22h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent22h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent23h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent23h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent23h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent23h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent24h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent24h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent24h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent24h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent25h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent25h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent25h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent25h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent26h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent26h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent26h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent26h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent27h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent27h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent27h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent27h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent28h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent28h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent28h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent28h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent29h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent29h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent29h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent29h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent30h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent30h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent30h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent30h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent31h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent31h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent31h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent31h', needs `sscofpmf' extension .*Warning: invalid CSR `ubadaddr' for the privileged spec `1.10' .*Warning: invalid CSR `ubadaddr' for the privileged spec `1.10' .*Warning: invalid CSR `sbadaddr' for the privileged spec `1.10' diff --git a/gas/testsuite/gas/riscv/csr-version-1p11.d b/gas/testsuite/gas/riscv/csr-version-1p11.d index 29a659af592..a85875acf08 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p11.d +++ b/gas/testsuite/gas/riscv/csr-version-1p11.d @@ -641,6 +641,66 @@ Disassembly of section .text: [ ]+[0-9a-f]+:[ ]+61e59073[ ]+csrw[ ]+hstateen2h,a1 [ ]+[0-9a-f]+:[ ]+61f02573[ ]+csrr[ ]+a0,hstateen3h [ ]+[0-9a-f]+:[ ]+61f59073[ ]+csrw[ ]+hstateen3h,a1 +[ ]+[0-9a-f]+:[ ]+da002573[ ]+csrr[ ]+a0,scountovf +[ ]+[0-9a-f]+:[ ]+da059073[ ]+csrw[ ]+scountovf,a1 +[ ]+[0-9a-f]+:[ ]+72302573[ ]+csrr[ ]+a0,mhpmevent3h +[ ]+[0-9a-f]+:[ ]+72359073[ ]+csrw[ ]+mhpmevent3h,a1 +[ ]+[0-9a-f]+:[ ]+72402573[ ]+csrr[ ]+a0,mhpmevent4h +[ ]+[0-9a-f]+:[ ]+72459073[ ]+csrw[ ]+mhpmevent4h,a1 +[ ]+[0-9a-f]+:[ ]+72502573[ ]+csrr[ ]+a0,mhpmevent5h +[ ]+[0-9a-f]+:[ ]+72559073[ ]+csrw[ ]+mhpmevent5h,a1 +[ ]+[0-9a-f]+:[ ]+72602573[ ]+csrr[ ]+a0,mhpmevent6h +[ ]+[0-9a-f]+:[ ]+72659073[ ]+csrw[ ]+mhpmevent6h,a1 +[ ]+[0-9a-f]+:[ ]+72702573[ ]+csrr[ ]+a0,mhpmevent7h +[ ]+[0-9a-f]+:[ ]+72759073[ ]+csrw[ ]+mhpmevent7h,a1 +[ ]+[0-9a-f]+:[ ]+72802573[ ]+csrr[ ]+a0,mhpmevent8h +[ ]+[0-9a-f]+:[ ]+72859073[ ]+csrw[ ]+mhpmevent8h,a1 +[ ]+[0-9a-f]+:[ ]+72902573[ ]+csrr[ ]+a0,mhpmevent9h +[ ]+[0-9a-f]+:[ ]+72959073[ ]+csrw[ ]+mhpmevent9h,a1 +[ ]+[0-9a-f]+:[ ]+72a02573[ ]+csrr[ ]+a0,mhpmevent10h +[ ]+[0-9a-f]+:[ ]+72a59073[ ]+csrw[ ]+mhpmevent10h,a1 +[ ]+[0-9a-f]+:[ ]+72b02573[ ]+csrr[ ]+a0,mhpmevent11h +[ ]+[0-9a-f]+:[ ]+72b59073[ ]+csrw[ ]+mhpmevent11h,a1 +[ ]+[0-9a-f]+:[ ]+72c02573[ ]+csrr[ ]+a0,mhpmevent12h +[ ]+[0-9a-f]+:[ ]+72c59073[ ]+csrw[ ]+mhpmevent12h,a1 +[ ]+[0-9a-f]+:[ ]+72d02573[ ]+csrr[ ]+a0,mhpmevent13h +[ ]+[0-9a-f]+:[ ]+72d59073[ ]+csrw[ ]+mhpmevent13h,a1 +[ ]+[0-9a-f]+:[ ]+72e02573[ ]+csrr[ ]+a0,mhpmevent14h +[ ]+[0-9a-f]+:[ ]+72e59073[ ]+csrw[ ]+mhpmevent14h,a1 +[ ]+[0-9a-f]+:[ ]+72f02573[ ]+csrr[ ]+a0,mhpmevent15h +[ ]+[0-9a-f]+:[ ]+72f59073[ ]+csrw[ ]+mhpmevent15h,a1 +[ ]+[0-9a-f]+:[ ]+73002573[ ]+csrr[ ]+a0,mhpmevent16h +[ ]+[0-9a-f]+:[ ]+73059073[ ]+csrw[ ]+mhpmevent16h,a1 +[ ]+[0-9a-f]+:[ ]+73102573[ ]+csrr[ ]+a0,mhpmevent17h +[ ]+[0-9a-f]+:[ ]+73159073[ ]+csrw[ ]+mhpmevent17h,a1 +[ ]+[0-9a-f]+:[ ]+73202573[ ]+csrr[ ]+a0,mhpmevent18h +[ ]+[0-9a-f]+:[ ]+73259073[ ]+csrw[ ]+mhpmevent18h,a1 +[ ]+[0-9a-f]+:[ ]+73302573[ ]+csrr[ ]+a0,mhpmevent19h +[ ]+[0-9a-f]+:[ ]+73359073[ ]+csrw[ ]+mhpmevent19h,a1 +[ ]+[0-9a-f]+:[ ]+73402573[ ]+csrr[ ]+a0,mhpmevent20h +[ ]+[0-9a-f]+:[ ]+73459073[ ]+csrw[ ]+mhpmevent20h,a1 +[ ]+[0-9a-f]+:[ ]+73502573[ ]+csrr[ ]+a0,mhpmevent21h +[ ]+[0-9a-f]+:[ ]+73559073[ ]+csrw[ ]+mhpmevent21h,a1 +[ ]+[0-9a-f]+:[ ]+73602573[ ]+csrr[ ]+a0,mhpmevent22h +[ ]+[0-9a-f]+:[ ]+73659073[ ]+csrw[ ]+mhpmevent22h,a1 +[ ]+[0-9a-f]+:[ ]+73702573[ ]+csrr[ ]+a0,mhpmevent23h +[ ]+[0-9a-f]+:[ ]+73759073[ ]+csrw[ ]+mhpmevent23h,a1 +[ ]+[0-9a-f]+:[ ]+73802573[ ]+csrr[ ]+a0,mhpmevent24h +[ ]+[0-9a-f]+:[ ]+73859073[ ]+csrw[ ]+mhpmevent24h,a1 +[ ]+[0-9a-f]+:[ ]+73902573[ ]+csrr[ ]+a0,mhpmevent25h +[ ]+[0-9a-f]+:[ ]+73959073[ ]+csrw[ ]+mhpmevent25h,a1 +[ ]+[0-9a-f]+:[ ]+73a02573[ ]+csrr[ ]+a0,mhpmevent26h +[ ]+[0-9a-f]+:[ ]+73a59073[ ]+csrw[ ]+mhpmevent26h,a1 +[ ]+[0-9a-f]+:[ ]+73b02573[ ]+csrr[ ]+a0,mhpmevent27h +[ ]+[0-9a-f]+:[ ]+73b59073[ ]+csrw[ ]+mhpmevent27h,a1 +[ ]+[0-9a-f]+:[ ]+73c02573[ ]+csrr[ ]+a0,mhpmevent28h +[ ]+[0-9a-f]+:[ ]+73c59073[ ]+csrw[ ]+mhpmevent28h,a1 +[ ]+[0-9a-f]+:[ ]+73d02573[ ]+csrr[ ]+a0,mhpmevent29h +[ ]+[0-9a-f]+:[ ]+73d59073[ ]+csrw[ ]+mhpmevent29h,a1 +[ ]+[0-9a-f]+:[ ]+73e02573[ ]+csrr[ ]+a0,mhpmevent30h +[ ]+[0-9a-f]+:[ ]+73e59073[ ]+csrw[ ]+mhpmevent30h,a1 +[ ]+[0-9a-f]+:[ ]+73f02573[ ]+csrr[ ]+a0,mhpmevent31h +[ ]+[0-9a-f]+:[ ]+73f59073[ ]+csrw[ ]+mhpmevent31h,a1 [ ]+[0-9a-f]+:[ ]+04302573[ ]+csrr[ ]+a0,utval [ ]+[0-9a-f]+:[ ]+04359073[ ]+csrw[ ]+utval,a1 [ ]+[0-9a-f]+:[ ]+14302573[ ]+csrr[ ]+a0,stval diff --git a/gas/testsuite/gas/riscv/csr-version-1p11.l b/gas/testsuite/gas/riscv/csr-version-1p11.l index 1b66848aca1..f4a57f2c409 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p11.l +++ b/gas/testsuite/gas/riscv/csr-version-1p11.l @@ -481,6 +481,125 @@ .*Warning: invalid CSR `hstateen3h', needs rv32i extension .*Warning: invalid CSR `hstateen3h', needs `h' extension .*Warning: invalid CSR `hstateen3h', needs `smstateen' extension +.*Warning: invalid CSR `scountovf', needs `sscofpmf' extension +.*Warning: invalid CSR `scountovf', needs `sscofpmf' extension +.*Warning: read-only CSR is written `csrw scountovf,a1' +.*Warning: invalid CSR `mhpmevent3h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent3h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent3h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent3h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent4h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent4h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent4h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent4h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent5h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent5h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent5h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent5h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent6h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent6h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent6h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent6h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent7h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent7h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent7h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent7h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent8h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent8h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent8h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent8h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent9h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent9h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent9h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent9h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent10h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent10h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent10h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent10h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent11h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent11h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent11h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent11h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent12h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent12h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent12h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent12h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent13h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent13h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent13h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent13h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent14h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent14h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent14h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent14h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent15h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent15h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent15h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent15h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent16h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent16h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent16h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent16h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent17h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent17h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent17h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent17h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent18h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent18h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent18h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent18h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent19h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent19h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent19h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent19h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent20h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent20h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent20h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent20h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent21h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent21h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent21h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent21h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent22h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent22h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent22h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent22h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent23h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent23h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent23h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent23h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent24h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent24h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent24h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent24h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent25h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent25h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent25h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent25h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent26h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent26h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent26h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent26h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent27h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent27h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent27h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent27h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent28h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent28h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent28h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent28h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent29h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent29h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent29h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent29h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent30h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent30h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent30h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent30h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent31h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent31h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent31h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent31h', needs `sscofpmf' extension .*Warning: invalid CSR `ubadaddr' for the privileged spec `1.11' .*Warning: invalid CSR `ubadaddr' for the privileged spec `1.11' .*Warning: invalid CSR `sbadaddr' for the privileged spec `1.11' diff --git a/gas/testsuite/gas/riscv/csr-version-1p12.d b/gas/testsuite/gas/riscv/csr-version-1p12.d index 46ca519b31e..60f19bff874 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p12.d +++ b/gas/testsuite/gas/riscv/csr-version-1p12.d @@ -641,6 +641,66 @@ Disassembly of section .text: [ ]+[0-9a-f]+:[ ]+61e59073[ ]+csrw[ ]+hstateen2h,a1 [ ]+[0-9a-f]+:[ ]+61f02573[ ]+csrr[ ]+a0,hstateen3h [ ]+[0-9a-f]+:[ ]+61f59073[ ]+csrw[ ]+hstateen3h,a1 +[ ]+[0-9a-f]+:[ ]+da002573[ ]+csrr[ ]+a0,scountovf +[ ]+[0-9a-f]+:[ ]+da059073[ ]+csrw[ ]+scountovf,a1 +[ ]+[0-9a-f]+:[ ]+72302573[ ]+csrr[ ]+a0,mhpmevent3h +[ ]+[0-9a-f]+:[ ]+72359073[ ]+csrw[ ]+mhpmevent3h,a1 +[ ]+[0-9a-f]+:[ ]+72402573[ ]+csrr[ ]+a0,mhpmevent4h +[ ]+[0-9a-f]+:[ ]+72459073[ ]+csrw[ ]+mhpmevent4h,a1 +[ ]+[0-9a-f]+:[ ]+72502573[ ]+csrr[ ]+a0,mhpmevent5h +[ ]+[0-9a-f]+:[ ]+72559073[ ]+csrw[ ]+mhpmevent5h,a1 +[ ]+[0-9a-f]+:[ ]+72602573[ ]+csrr[ ]+a0,mhpmevent6h +[ ]+[0-9a-f]+:[ ]+72659073[ ]+csrw[ ]+mhpmevent6h,a1 +[ ]+[0-9a-f]+:[ ]+72702573[ ]+csrr[ ]+a0,mhpmevent7h +[ ]+[0-9a-f]+:[ ]+72759073[ ]+csrw[ ]+mhpmevent7h,a1 +[ ]+[0-9a-f]+:[ ]+72802573[ ]+csrr[ ]+a0,mhpmevent8h +[ ]+[0-9a-f]+:[ ]+72859073[ ]+csrw[ ]+mhpmevent8h,a1 +[ ]+[0-9a-f]+:[ ]+72902573[ ]+csrr[ ]+a0,mhpmevent9h +[ ]+[0-9a-f]+:[ ]+72959073[ ]+csrw[ ]+mhpmevent9h,a1 +[ ]+[0-9a-f]+:[ ]+72a02573[ ]+csrr[ ]+a0,mhpmevent10h +[ ]+[0-9a-f]+:[ ]+72a59073[ ]+csrw[ ]+mhpmevent10h,a1 +[ ]+[0-9a-f]+:[ ]+72b02573[ ]+csrr[ ]+a0,mhpmevent11h +[ ]+[0-9a-f]+:[ ]+72b59073[ ]+csrw[ ]+mhpmevent11h,a1 +[ ]+[0-9a-f]+:[ ]+72c02573[ ]+csrr[ ]+a0,mhpmevent12h +[ ]+[0-9a-f]+:[ ]+72c59073[ ]+csrw[ ]+mhpmevent12h,a1 +[ ]+[0-9a-f]+:[ ]+72d02573[ ]+csrr[ ]+a0,mhpmevent13h +[ ]+[0-9a-f]+:[ ]+72d59073[ ]+csrw[ ]+mhpmevent13h,a1 +[ ]+[0-9a-f]+:[ ]+72e02573[ ]+csrr[ ]+a0,mhpmevent14h +[ ]+[0-9a-f]+:[ ]+72e59073[ ]+csrw[ ]+mhpmevent14h,a1 +[ ]+[0-9a-f]+:[ ]+72f02573[ ]+csrr[ ]+a0,mhpmevent15h +[ ]+[0-9a-f]+:[ ]+72f59073[ ]+csrw[ ]+mhpmevent15h,a1 +[ ]+[0-9a-f]+:[ ]+73002573[ ]+csrr[ ]+a0,mhpmevent16h +[ ]+[0-9a-f]+:[ ]+73059073[ ]+csrw[ ]+mhpmevent16h,a1 +[ ]+[0-9a-f]+:[ ]+73102573[ ]+csrr[ ]+a0,mhpmevent17h +[ ]+[0-9a-f]+:[ ]+73159073[ ]+csrw[ ]+mhpmevent17h,a1 +[ ]+[0-9a-f]+:[ ]+73202573[ ]+csrr[ ]+a0,mhpmevent18h +[ ]+[0-9a-f]+:[ ]+73259073[ ]+csrw[ ]+mhpmevent18h,a1 +[ ]+[0-9a-f]+:[ ]+73302573[ ]+csrr[ ]+a0,mhpmevent19h +[ ]+[0-9a-f]+:[ ]+73359073[ ]+csrw[ ]+mhpmevent19h,a1 +[ ]+[0-9a-f]+:[ ]+73402573[ ]+csrr[ ]+a0,mhpmevent20h +[ ]+[0-9a-f]+:[ ]+73459073[ ]+csrw[ ]+mhpmevent20h,a1 +[ ]+[0-9a-f]+:[ ]+73502573[ ]+csrr[ ]+a0,mhpmevent21h +[ ]+[0-9a-f]+:[ ]+73559073[ ]+csrw[ ]+mhpmevent21h,a1 +[ ]+[0-9a-f]+:[ ]+73602573[ ]+csrr[ ]+a0,mhpmevent22h +[ ]+[0-9a-f]+:[ ]+73659073[ ]+csrw[ ]+mhpmevent22h,a1 +[ ]+[0-9a-f]+:[ ]+73702573[ ]+csrr[ ]+a0,mhpmevent23h +[ ]+[0-9a-f]+:[ ]+73759073[ ]+csrw[ ]+mhpmevent23h,a1 +[ ]+[0-9a-f]+:[ ]+73802573[ ]+csrr[ ]+a0,mhpmevent24h +[ ]+[0-9a-f]+:[ ]+73859073[ ]+csrw[ ]+mhpmevent24h,a1 +[ ]+[0-9a-f]+:[ ]+73902573[ ]+csrr[ ]+a0,mhpmevent25h +[ ]+[0-9a-f]+:[ ]+73959073[ ]+csrw[ ]+mhpmevent25h,a1 +[ ]+[0-9a-f]+:[ ]+73a02573[ ]+csrr[ ]+a0,mhpmevent26h +[ ]+[0-9a-f]+:[ ]+73a59073[ ]+csrw[ ]+mhpmevent26h,a1 +[ ]+[0-9a-f]+:[ ]+73b02573[ ]+csrr[ ]+a0,mhpmevent27h +[ ]+[0-9a-f]+:[ ]+73b59073[ ]+csrw[ ]+mhpmevent27h,a1 +[ ]+[0-9a-f]+:[ ]+73c02573[ ]+csrr[ ]+a0,mhpmevent28h +[ ]+[0-9a-f]+:[ ]+73c59073[ ]+csrw[ ]+mhpmevent28h,a1 +[ ]+[0-9a-f]+:[ ]+73d02573[ ]+csrr[ ]+a0,mhpmevent29h +[ ]+[0-9a-f]+:[ ]+73d59073[ ]+csrw[ ]+mhpmevent29h,a1 +[ ]+[0-9a-f]+:[ ]+73e02573[ ]+csrr[ ]+a0,mhpmevent30h +[ ]+[0-9a-f]+:[ ]+73e59073[ ]+csrw[ ]+mhpmevent30h,a1 +[ ]+[0-9a-f]+:[ ]+73f02573[ ]+csrr[ ]+a0,mhpmevent31h +[ ]+[0-9a-f]+:[ ]+73f59073[ ]+csrw[ ]+mhpmevent31h,a1 [ ]+[0-9a-f]+:[ ]+04302573[ ]+csrr[ ]+a0,0x43 [ ]+[0-9a-f]+:[ ]+04359073[ ]+csrw[ ]+0x43,a1 [ ]+[0-9a-f]+:[ ]+14302573[ ]+csrr[ ]+a0,stval diff --git a/gas/testsuite/gas/riscv/csr-version-1p12.l b/gas/testsuite/gas/riscv/csr-version-1p12.l index 90a67f04c27..37522fadbf4 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p12.l +++ b/gas/testsuite/gas/riscv/csr-version-1p12.l @@ -343,6 +343,125 @@ .*Warning: invalid CSR `hstateen3h', needs rv32i extension .*Warning: invalid CSR `hstateen3h', needs `h' extension .*Warning: invalid CSR `hstateen3h', needs `smstateen' extension +.*Warning: invalid CSR `scountovf', needs `sscofpmf' extension +.*Warning: invalid CSR `scountovf', needs `sscofpmf' extension +.*Warning: read-only CSR is written `csrw scountovf,a1' +.*Warning: invalid CSR `mhpmevent3h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent3h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent3h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent3h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent4h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent4h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent4h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent4h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent5h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent5h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent5h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent5h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent6h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent6h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent6h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent6h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent7h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent7h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent7h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent7h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent8h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent8h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent8h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent8h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent9h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent9h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent9h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent9h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent10h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent10h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent10h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent10h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent11h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent11h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent11h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent11h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent12h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent12h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent12h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent12h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent13h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent13h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent13h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent13h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent14h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent14h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent14h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent14h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent15h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent15h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent15h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent15h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent16h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent16h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent16h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent16h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent17h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent17h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent17h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent17h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent18h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent18h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent18h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent18h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent19h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent19h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent19h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent19h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent20h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent20h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent20h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent20h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent21h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent21h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent21h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent21h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent22h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent22h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent22h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent22h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent23h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent23h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent23h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent23h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent24h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent24h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent24h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent24h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent25h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent25h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent25h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent25h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent26h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent26h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent26h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent26h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent27h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent27h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent27h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent27h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent28h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent28h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent28h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent28h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent29h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent29h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent29h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent29h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent30h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent30h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent30h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent30h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent31h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent31h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent31h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent31h', needs `sscofpmf' extension .*Warning: invalid CSR `ubadaddr' for the privileged spec `1.12' .*Warning: invalid CSR `ubadaddr' for the privileged spec `1.12' .*Warning: invalid CSR `sbadaddr' for the privileged spec `1.12' diff --git a/gas/testsuite/gas/riscv/csr-version-1p9p1.d b/gas/testsuite/gas/riscv/csr-version-1p9p1.d index da56a0b5668..e9eb8c031fb 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p9p1.d +++ b/gas/testsuite/gas/riscv/csr-version-1p9p1.d @@ -641,6 +641,66 @@ Disassembly of section .text: [ ]+[0-9a-f]+:[ ]+61e59073[ ]+csrw[ ]+hstateen2h,a1 [ ]+[0-9a-f]+:[ ]+61f02573[ ]+csrr[ ]+a0,hstateen3h [ ]+[0-9a-f]+:[ ]+61f59073[ ]+csrw[ ]+hstateen3h,a1 +[ ]+[0-9a-f]+:[ ]+da002573[ ]+csrr[ ]+a0,scountovf +[ ]+[0-9a-f]+:[ ]+da059073[ ]+csrw[ ]+scountovf,a1 +[ ]+[0-9a-f]+:[ ]+72302573[ ]+csrr[ ]+a0,mhpmevent3h +[ ]+[0-9a-f]+:[ ]+72359073[ ]+csrw[ ]+mhpmevent3h,a1 +[ ]+[0-9a-f]+:[ ]+72402573[ ]+csrr[ ]+a0,mhpmevent4h +[ ]+[0-9a-f]+:[ ]+72459073[ ]+csrw[ ]+mhpmevent4h,a1 +[ ]+[0-9a-f]+:[ ]+72502573[ ]+csrr[ ]+a0,mhpmevent5h +[ ]+[0-9a-f]+:[ ]+72559073[ ]+csrw[ ]+mhpmevent5h,a1 +[ ]+[0-9a-f]+:[ ]+72602573[ ]+csrr[ ]+a0,mhpmevent6h +[ ]+[0-9a-f]+:[ ]+72659073[ ]+csrw[ ]+mhpmevent6h,a1 +[ ]+[0-9a-f]+:[ ]+72702573[ ]+csrr[ ]+a0,mhpmevent7h +[ ]+[0-9a-f]+:[ ]+72759073[ ]+csrw[ ]+mhpmevent7h,a1 +[ ]+[0-9a-f]+:[ ]+72802573[ ]+csrr[ ]+a0,mhpmevent8h +[ ]+[0-9a-f]+:[ ]+72859073[ ]+csrw[ ]+mhpmevent8h,a1 +[ ]+[0-9a-f]+:[ ]+72902573[ ]+csrr[ ]+a0,mhpmevent9h +[ ]+[0-9a-f]+:[ ]+72959073[ ]+csrw[ ]+mhpmevent9h,a1 +[ ]+[0-9a-f]+:[ ]+72a02573[ ]+csrr[ ]+a0,mhpmevent10h +[ ]+[0-9a-f]+:[ ]+72a59073[ ]+csrw[ ]+mhpmevent10h,a1 +[ ]+[0-9a-f]+:[ ]+72b02573[ ]+csrr[ ]+a0,mhpmevent11h +[ ]+[0-9a-f]+:[ ]+72b59073[ ]+csrw[ ]+mhpmevent11h,a1 +[ ]+[0-9a-f]+:[ ]+72c02573[ ]+csrr[ ]+a0,mhpmevent12h +[ ]+[0-9a-f]+:[ ]+72c59073[ ]+csrw[ ]+mhpmevent12h,a1 +[ ]+[0-9a-f]+:[ ]+72d02573[ ]+csrr[ ]+a0,mhpmevent13h +[ ]+[0-9a-f]+:[ ]+72d59073[ ]+csrw[ ]+mhpmevent13h,a1 +[ ]+[0-9a-f]+:[ ]+72e02573[ ]+csrr[ ]+a0,mhpmevent14h +[ ]+[0-9a-f]+:[ ]+72e59073[ ]+csrw[ ]+mhpmevent14h,a1 +[ ]+[0-9a-f]+:[ ]+72f02573[ ]+csrr[ ]+a0,mhpmevent15h +[ ]+[0-9a-f]+:[ ]+72f59073[ ]+csrw[ ]+mhpmevent15h,a1 +[ ]+[0-9a-f]+:[ ]+73002573[ ]+csrr[ ]+a0,mhpmevent16h +[ ]+[0-9a-f]+:[ ]+73059073[ ]+csrw[ ]+mhpmevent16h,a1 +[ ]+[0-9a-f]+:[ ]+73102573[ ]+csrr[ ]+a0,mhpmevent17h +[ ]+[0-9a-f]+:[ ]+73159073[ ]+csrw[ ]+mhpmevent17h,a1 +[ ]+[0-9a-f]+:[ ]+73202573[ ]+csrr[ ]+a0,mhpmevent18h +[ ]+[0-9a-f]+:[ ]+73259073[ ]+csrw[ ]+mhpmevent18h,a1 +[ ]+[0-9a-f]+:[ ]+73302573[ ]+csrr[ ]+a0,mhpmevent19h +[ ]+[0-9a-f]+:[ ]+73359073[ ]+csrw[ ]+mhpmevent19h,a1 +[ ]+[0-9a-f]+:[ ]+73402573[ ]+csrr[ ]+a0,mhpmevent20h +[ ]+[0-9a-f]+:[ ]+73459073[ ]+csrw[ ]+mhpmevent20h,a1 +[ ]+[0-9a-f]+:[ ]+73502573[ ]+csrr[ ]+a0,mhpmevent21h +[ ]+[0-9a-f]+:[ ]+73559073[ ]+csrw[ ]+mhpmevent21h,a1 +[ ]+[0-9a-f]+:[ ]+73602573[ ]+csrr[ ]+a0,mhpmevent22h +[ ]+[0-9a-f]+:[ ]+73659073[ ]+csrw[ ]+mhpmevent22h,a1 +[ ]+[0-9a-f]+:[ ]+73702573[ ]+csrr[ ]+a0,mhpmevent23h +[ ]+[0-9a-f]+:[ ]+73759073[ ]+csrw[ ]+mhpmevent23h,a1 +[ ]+[0-9a-f]+:[ ]+73802573[ ]+csrr[ ]+a0,mhpmevent24h +[ ]+[0-9a-f]+:[ ]+73859073[ ]+csrw[ ]+mhpmevent24h,a1 +[ ]+[0-9a-f]+:[ ]+73902573[ ]+csrr[ ]+a0,mhpmevent25h +[ ]+[0-9a-f]+:[ ]+73959073[ ]+csrw[ ]+mhpmevent25h,a1 +[ ]+[0-9a-f]+:[ ]+73a02573[ ]+csrr[ ]+a0,mhpmevent26h +[ ]+[0-9a-f]+:[ ]+73a59073[ ]+csrw[ ]+mhpmevent26h,a1 +[ ]+[0-9a-f]+:[ ]+73b02573[ ]+csrr[ ]+a0,mhpmevent27h +[ ]+[0-9a-f]+:[ ]+73b59073[ ]+csrw[ ]+mhpmevent27h,a1 +[ ]+[0-9a-f]+:[ ]+73c02573[ ]+csrr[ ]+a0,mhpmevent28h +[ ]+[0-9a-f]+:[ ]+73c59073[ ]+csrw[ ]+mhpmevent28h,a1 +[ ]+[0-9a-f]+:[ ]+73d02573[ ]+csrr[ ]+a0,mhpmevent29h +[ ]+[0-9a-f]+:[ ]+73d59073[ ]+csrw[ ]+mhpmevent29h,a1 +[ ]+[0-9a-f]+:[ ]+73e02573[ ]+csrr[ ]+a0,mhpmevent30h +[ ]+[0-9a-f]+:[ ]+73e59073[ ]+csrw[ ]+mhpmevent30h,a1 +[ ]+[0-9a-f]+:[ ]+73f02573[ ]+csrr[ ]+a0,mhpmevent31h +[ ]+[0-9a-f]+:[ ]+73f59073[ ]+csrw[ ]+mhpmevent31h,a1 [ ]+[0-9a-f]+:[ ]+04302573[ ]+csrr[ ]+a0,ubadaddr [ ]+[0-9a-f]+:[ ]+04359073[ ]+csrw[ ]+ubadaddr,a1 [ ]+[0-9a-f]+:[ ]+14302573[ ]+csrr[ ]+a0,sbadaddr diff --git a/gas/testsuite/gas/riscv/csr-version-1p9p1.l b/gas/testsuite/gas/riscv/csr-version-1p9p1.l index 7376c7c33ad..893f8c8ba56 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p9p1.l +++ b/gas/testsuite/gas/riscv/csr-version-1p9p1.l @@ -533,6 +533,125 @@ .*Warning: invalid CSR `hstateen3h', needs rv32i extension .*Warning: invalid CSR `hstateen3h', needs `h' extension .*Warning: invalid CSR `hstateen3h', needs `smstateen' extension +.*Warning: invalid CSR `scountovf', needs `sscofpmf' extension +.*Warning: invalid CSR `scountovf', needs `sscofpmf' extension +.*Warning: read-only CSR is written `csrw scountovf,a1' +.*Warning: invalid CSR `mhpmevent3h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent3h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent3h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent3h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent4h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent4h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent4h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent4h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent5h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent5h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent5h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent5h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent6h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent6h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent6h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent6h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent7h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent7h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent7h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent7h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent8h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent8h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent8h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent8h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent9h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent9h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent9h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent9h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent10h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent10h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent10h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent10h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent11h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent11h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent11h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent11h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent12h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent12h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent12h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent12h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent13h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent13h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent13h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent13h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent14h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent14h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent14h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent14h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent15h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent15h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent15h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent15h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent16h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent16h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent16h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent16h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent17h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent17h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent17h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent17h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent18h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent18h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent18h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent18h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent19h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent19h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent19h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent19h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent20h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent20h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent20h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent20h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent21h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent21h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent21h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent21h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent22h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent22h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent22h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent22h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent23h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent23h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent23h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent23h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent24h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent24h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent24h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent24h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent25h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent25h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent25h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent25h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent26h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent26h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent26h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent26h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent27h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent27h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent27h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent27h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent28h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent28h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent28h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent28h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent29h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent29h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent29h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent29h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent30h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent30h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent30h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent30h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent31h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent31h', needs `sscofpmf' extension +.*Warning: invalid CSR `mhpmevent31h', needs rv32i extension +.*Warning: invalid CSR `mhpmevent31h', needs `sscofpmf' extension .*Warning: invalid CSR `utval' for the privileged spec `1.9.1' .*Warning: invalid CSR `utval' for the privileged spec `1.9.1' .*Warning: invalid CSR `fflags', needs `f' extension diff --git a/gas/testsuite/gas/riscv/csr.s b/gas/testsuite/gas/riscv/csr.s index 1a4a2be2c0f..2a723123f1b 100644 --- a/gas/testsuite/gas/riscv/csr.s +++ b/gas/testsuite/gas/riscv/csr.s @@ -359,6 +359,38 @@ csr hstateen2h csr hstateen3h + # Sscofpmf extension + csr scountovf + csr mhpmevent3h + csr mhpmevent4h + csr mhpmevent5h + csr mhpmevent6h + csr mhpmevent7h + csr mhpmevent8h + csr mhpmevent9h + csr mhpmevent10h + csr mhpmevent11h + csr mhpmevent12h + csr mhpmevent13h + csr mhpmevent14h + csr mhpmevent15h + csr mhpmevent16h + csr mhpmevent17h + csr mhpmevent18h + csr mhpmevent19h + csr mhpmevent20h + csr mhpmevent21h + csr mhpmevent22h + csr mhpmevent23h + csr mhpmevent24h + csr mhpmevent25h + csr mhpmevent26h + csr mhpmevent27h + csr mhpmevent28h + csr mhpmevent29h + csr mhpmevent30h + csr mhpmevent31h + # Supported in previous priv spec, but dropped now csr ubadaddr # 0x043 in 1.9.1, but the value is utval since 1.10 diff --git a/include/opcode/riscv-opc.h b/include/opcode/riscv-opc.h index 97a37bae01c..8546a6e7172 100644 --- a/include/opcode/riscv-opc.h +++ b/include/opcode/riscv-opc.h @@ -2453,6 +2453,37 @@ #define CSR_HSTATEEN1H 0x61d #define CSR_HSTATEEN2H 0x61e #define CSR_HSTATEEN3H 0x61f +/* Sscofpmf extension */ +#define CSR_SCOUNTOVF 0xda0 +#define CSR_MHPMEVENT3H 0x723 +#define CSR_MHPMEVENT4H 0x724 +#define CSR_MHPMEVENT5H 0x725 +#define CSR_MHPMEVENT6H 0x726 +#define CSR_MHPMEVENT7H 0x727 +#define CSR_MHPMEVENT8H 0x728 +#define CSR_MHPMEVENT9H 0x729 +#define CSR_MHPMEVENT10H 0x72a +#define CSR_MHPMEVENT11H 0x72b +#define CSR_MHPMEVENT12H 0x72c +#define CSR_MHPMEVENT13H 0x72d +#define CSR_MHPMEVENT14H 0x72e +#define CSR_MHPMEVENT15H 0x72f +#define CSR_MHPMEVENT16H 0x730 +#define CSR_MHPMEVENT17H 0x731 +#define CSR_MHPMEVENT18H 0x732 +#define CSR_MHPMEVENT19H 0x733 +#define CSR_MHPMEVENT20H 0x734 +#define CSR_MHPMEVENT21H 0x735 +#define CSR_MHPMEVENT22H 0x736 +#define CSR_MHPMEVENT23H 0x737 +#define CSR_MHPMEVENT24H 0x738 +#define CSR_MHPMEVENT25H 0x739 +#define CSR_MHPMEVENT26H 0x73a +#define CSR_MHPMEVENT27H 0x73b +#define CSR_MHPMEVENT28H 0x73c +#define CSR_MHPMEVENT29H 0x73d +#define CSR_MHPMEVENT30H 0x73e +#define CSR_MHPMEVENT31H 0x73f /* Unprivileged Floating-Point CSR addresses. */ #define CSR_FFLAGS 0x1 #define CSR_FRM 0x2 @@ -3139,6 +3170,37 @@ DECLARE_CSR(hstateen0h, CSR_HSTATEEN0H, CSR_CLASS_SMSTATEEN_AND_H_32, PRIV_SPEC_ DECLARE_CSR(hstateen1h, CSR_HSTATEEN1H, CSR_CLASS_SMSTATEEN_AND_H_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) DECLARE_CSR(hstateen2h, CSR_HSTATEEN2H, CSR_CLASS_SMSTATEEN_AND_H_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) DECLARE_CSR(hstateen3h, CSR_HSTATEEN3H, CSR_CLASS_SMSTATEEN_AND_H_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +/* Sscofpmf extension */ +DECLARE_CSR(scountovf, CSR_SCOUNTOVF, CSR_CLASS_SSCOFPMF, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mhpmevent3h, CSR_MHPMEVENT3H, CSR_CLASS_SSCOFPMF_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mhpmevent4h, CSR_MHPMEVENT4H, CSR_CLASS_SSCOFPMF_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mhpmevent5h, CSR_MHPMEVENT5H, CSR_CLASS_SSCOFPMF_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mhpmevent6h, CSR_MHPMEVENT6H, CSR_CLASS_SSCOFPMF_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mhpmevent7h, CSR_MHPMEVENT7H, CSR_CLASS_SSCOFPMF_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mhpmevent8h, CSR_MHPMEVENT8H, CSR_CLASS_SSCOFPMF_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mhpmevent9h, CSR_MHPMEVENT9H, CSR_CLASS_SSCOFPMF_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mhpmevent10h, CSR_MHPMEVENT10H, CSR_CLASS_SSCOFPMF_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mhpmevent11h, CSR_MHPMEVENT11H, CSR_CLASS_SSCOFPMF_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mhpmevent12h, CSR_MHPMEVENT12H, CSR_CLASS_SSCOFPMF_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mhpmevent13h, CSR_MHPMEVENT13H, CSR_CLASS_SSCOFPMF_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mhpmevent14h, CSR_MHPMEVENT14H, CSR_CLASS_SSCOFPMF_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mhpmevent15h, CSR_MHPMEVENT15H, CSR_CLASS_SSCOFPMF_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mhpmevent16h, CSR_MHPMEVENT16H, CSR_CLASS_SSCOFPMF_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mhpmevent17h, CSR_MHPMEVENT17H, CSR_CLASS_SSCOFPMF_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mhpmevent18h, CSR_MHPMEVENT18H, CSR_CLASS_SSCOFPMF_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mhpmevent19h, CSR_MHPMEVENT19H, CSR_CLASS_SSCOFPMF_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mhpmevent20h, CSR_MHPMEVENT20H, CSR_CLASS_SSCOFPMF_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mhpmevent21h, CSR_MHPMEVENT21H, CSR_CLASS_SSCOFPMF_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mhpmevent22h, CSR_MHPMEVENT22H, CSR_CLASS_SSCOFPMF_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mhpmevent23h, CSR_MHPMEVENT23H, CSR_CLASS_SSCOFPMF_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mhpmevent24h, CSR_MHPMEVENT24H, CSR_CLASS_SSCOFPMF_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mhpmevent25h, CSR_MHPMEVENT25H, CSR_CLASS_SSCOFPMF_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mhpmevent26h, CSR_MHPMEVENT26H, CSR_CLASS_SSCOFPMF_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mhpmevent27h, CSR_MHPMEVENT27H, CSR_CLASS_SSCOFPMF_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mhpmevent28h, CSR_MHPMEVENT28H, CSR_CLASS_SSCOFPMF_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mhpmevent29h, CSR_MHPMEVENT29H, CSR_CLASS_SSCOFPMF_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mhpmevent30h, CSR_MHPMEVENT30H, CSR_CLASS_SSCOFPMF_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mhpmevent31h, CSR_MHPMEVENT31H, CSR_CLASS_SSCOFPMF_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) /* Dropped CSRs. */ DECLARE_CSR(mbase, CSR_MBASE, CSR_CLASS_I, PRIV_SPEC_CLASS_1P9P1, PRIV_SPEC_CLASS_1P10) DECLARE_CSR(mbound, CSR_MBOUND, CSR_CLASS_I, PRIV_SPEC_CLASS_1P9P1, PRIV_SPEC_CLASS_1P10)