RISC-V: Add 'Smstateen' extension and its CSRs
authorTsukasa OI <research_trasio@irq.a4lg.com>
Fri, 24 Jun 2022 02:51:54 +0000 (11:51 +0900)
committerNelson Chu <nelson.chu@sifive.com>
Tue, 28 Jun 2022 01:07:25 +0000 (09:07 +0800)
This commit adds State Enable Extension (Smstateen) and its CSRs.

bfd/ChangeLog:

* elfxx-riscv.c (riscv_supported_std_s_ext): Add 'Smstateen'
extension to valid 'S' extension list.

gas/ChangeLog:

* config/tc-riscv.c (enum riscv_csr_class): Add CSR classes for
'Smstateen' 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_MSTATEEN0, CSR_MSTATEEN1,
CSR_MSTATEEN2, CSR_MSTATEEN3, CSR_SSTATEEN0, CSR_SSTATEEN1,
CSR_SSTATEEN2, CSR_SSTATEEN3, CSR_HSTATEEN0, CSR_HSTATEEN1,
CSR_HSTATEEN2, CSR_HSTATEEN3, CSR_MSTATEEN0H, CSR_MSTATEEN1H,
CSR_MSTATEEN2H, CSR_MSTATEEN3H, CSR_HSTATEEN0H, CSR_HSTATEEN1H,
CSR_HSTATEEN2H, CSR_HSTATEEN3H): New CSR macros.

14 files changed:
bfd/elfxx-riscv.c
gas/config/tc-riscv.c
gas/testsuite/gas/riscv/csr-dw-regnums.d
gas/testsuite/gas/riscv/csr-dw-regnums.s
gas/testsuite/gas/riscv/csr-version-1p10.d
gas/testsuite/gas/riscv/csr-version-1p10.l
gas/testsuite/gas/riscv/csr-version-1p11.d
gas/testsuite/gas/riscv/csr-version-1p11.l
gas/testsuite/gas/riscv/csr-version-1p12.d
gas/testsuite/gas/riscv/csr-version-1p12.l
gas/testsuite/gas/riscv/csr-version-1p9p1.d
gas/testsuite/gas/riscv/csr-version-1p9p1.l
gas/testsuite/gas/riscv/csr.s
include/opcode/riscv-opc.h

index f920e0ce9ffe46e58af146f6076cae7a575eef00..f72b827651e66bef7df9e0cc4ea1df92edfaeea3 100644 (file)
@@ -1231,6 +1231,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 },
   {"svinval",          ISA_SPEC_CLASS_DRAFT,           1, 0, 0 },
   {NULL, 0, 0, 0, 0}
 };
index 6c5938b5596e8761cbfdc8d12c6c82ccad706808..660b2dd58bb1fae86ab20390a19f705bfe298d65 100644 (file)
@@ -68,6 +68,10 @@ enum riscv_csr_class
   CSR_CLASS_DEBUG,     /* debug CSR */
   CSR_CLASS_H,         /* hypervisor */
   CSR_CLASS_H_32,      /* hypervisor, rv32 only */
+  CSR_CLASS_SMSTATEEN,         /* Smstateen only */
+  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) */
 };
 
 /* This structure holds all restricted conditions for a CSR.  */
@@ -927,6 +931,16 @@ riscv_csr_address (const char *csr_name,
     case CSR_CLASS_V:
       extension = "v";
       break;
+    case CSR_CLASS_SMSTATEEN:
+    case CSR_CLASS_SMSTATEEN_AND_H:
+    case CSR_CLASS_SMSTATEEN_32:
+    case CSR_CLASS_SMSTATEEN_AND_H_32:
+      is_rv32_only = (csr_class == CSR_CLASS_SMSTATEEN_32
+                     || csr_class == CSR_CLASS_SMSTATEEN_AND_H_32);
+      is_h_required = (csr_class == CSR_CLASS_SMSTATEEN_AND_H
+                     || csr_class == CSR_CLASS_SMSTATEEN_AND_H_32);
+      extension = "smstateen";
+      break;
     case CSR_CLASS_DEBUG:
       break;
     default:
index 23ceba193cafb13b2c759f1d190878c3ec0ecd89..0c9ec6e4035311f3d1bb349e0a1e308414e61a25 100644 (file)
@@ -313,6 +313,26 @@ Contents of the .* section:
   DW_CFA_offset_extended_sf: r4675 \(vstval\) at cfa\+2316
   DW_CFA_offset_extended_sf: r4676 \(vsip\) at cfa\+2320
   DW_CFA_offset_extended_sf: r4736 \(vsatp\) at cfa\+2560
+  DW_CFA_offset_extended_sf: r4876 \(mstateen0\) at cfa\+3120
+  DW_CFA_offset_extended_sf: r4877 \(mstateen1\) at cfa\+3124
+  DW_CFA_offset_extended_sf: r4878 \(mstateen2\) at cfa\+3128
+  DW_CFA_offset_extended_sf: r4879 \(mstateen3\) at cfa\+3132
+  DW_CFA_offset_extended_sf: r4364 \(sstateen0\) at cfa\+1072
+  DW_CFA_offset_extended_sf: r4365 \(sstateen1\) at cfa\+1076
+  DW_CFA_offset_extended_sf: r4366 \(sstateen2\) at cfa\+1080
+  DW_CFA_offset_extended_sf: r4367 \(sstateen3\) at cfa\+1084
+  DW_CFA_offset_extended_sf: r5644 \(hstateen0\) at cfa\+6192
+  DW_CFA_offset_extended_sf: r5645 \(hstateen1\) at cfa\+6196
+  DW_CFA_offset_extended_sf: r5646 \(hstateen2\) at cfa\+6200
+  DW_CFA_offset_extended_sf: r5647 \(hstateen3\) at cfa\+6204
+  DW_CFA_offset_extended_sf: r4892 \(mstateen0h\) at cfa\+3184
+  DW_CFA_offset_extended_sf: r4893 \(mstateen1h\) at cfa\+3188
+  DW_CFA_offset_extended_sf: r4894 \(mstateen2h\) at cfa\+3192
+  DW_CFA_offset_extended_sf: r4895 \(mstateen3h\) at cfa\+3196
+  DW_CFA_offset_extended_sf: r5660 \(hstateen0h\) at cfa\+6256
+  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: 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
index 4a243ad7b0fe01135f95028f1652969a2a2a6b4c..2afadac49f6275a602d9523c84b5ccd8f0abc13b 100644 (file)
@@ -307,6 +307,27 @@ _start:
        .cfi_offset vstval, 2316
        .cfi_offset vsip, 2320
        .cfi_offset vsatp, 2560
+       # Smstateen extension
+       .cfi_offset mstateen0, 3120
+       .cfi_offset mstateen1, 3124
+       .cfi_offset mstateen2, 3128
+       .cfi_offset mstateen3, 3132
+       .cfi_offset sstateen0, 1072
+       .cfi_offset sstateen1, 1076
+       .cfi_offset sstateen2, 1080
+       .cfi_offset sstateen3, 1084
+       .cfi_offset hstateen0, 6192
+       .cfi_offset hstateen1, 6196
+       .cfi_offset hstateen2, 6200
+       .cfi_offset hstateen3, 6204
+       .cfi_offset mstateen0h, 3184
+       .cfi_offset mstateen1h, 3188
+       .cfi_offset mstateen2h, 3192
+       .cfi_offset mstateen3h, 3196
+       .cfi_offset hstateen0h, 6256
+       .cfi_offset hstateen1h, 6260
+       .cfi_offset hstateen2h, 6264
+       .cfi_offset hstateen3h, 6268
        # dropped
        .cfi_offset ubadaddr, 268       # aliases
        .cfi_offset sbadaddr, 1292      # aliases
index c39cbf3a2236677a22fdb1cede270f70e681f37d..65b370b5f770a752782e2589da93d246a058dda2 100644 (file)
@@ -601,6 +601,46 @@ Disassembly of section .text:
 [      ]+[0-9a-f]+:[   ]+24459073[     ]+csrw[         ]+vsip,a1
 [      ]+[0-9a-f]+:[   ]+28002573[     ]+csrr[         ]+a0,vsatp
 [      ]+[0-9a-f]+:[   ]+28059073[     ]+csrw[         ]+vsatp,a1
+[      ]+[0-9a-f]+:[   ]+30c02573[     ]+csrr[         ]+a0,mstateen0
+[      ]+[0-9a-f]+:[   ]+30c59073[     ]+csrw[         ]+mstateen0,a1
+[      ]+[0-9a-f]+:[   ]+30d02573[     ]+csrr[         ]+a0,mstateen1
+[      ]+[0-9a-f]+:[   ]+30d59073[     ]+csrw[         ]+mstateen1,a1
+[      ]+[0-9a-f]+:[   ]+30e02573[     ]+csrr[         ]+a0,mstateen2
+[      ]+[0-9a-f]+:[   ]+30e59073[     ]+csrw[         ]+mstateen2,a1
+[      ]+[0-9a-f]+:[   ]+30f02573[     ]+csrr[         ]+a0,mstateen3
+[      ]+[0-9a-f]+:[   ]+30f59073[     ]+csrw[         ]+mstateen3,a1
+[      ]+[0-9a-f]+:[   ]+10c02573[     ]+csrr[         ]+a0,sstateen0
+[      ]+[0-9a-f]+:[   ]+10c59073[     ]+csrw[         ]+sstateen0,a1
+[      ]+[0-9a-f]+:[   ]+10d02573[     ]+csrr[         ]+a0,sstateen1
+[      ]+[0-9a-f]+:[   ]+10d59073[     ]+csrw[         ]+sstateen1,a1
+[      ]+[0-9a-f]+:[   ]+10e02573[     ]+csrr[         ]+a0,sstateen2
+[      ]+[0-9a-f]+:[   ]+10e59073[     ]+csrw[         ]+sstateen2,a1
+[      ]+[0-9a-f]+:[   ]+10f02573[     ]+csrr[         ]+a0,sstateen3
+[      ]+[0-9a-f]+:[   ]+10f59073[     ]+csrw[         ]+sstateen3,a1
+[      ]+[0-9a-f]+:[   ]+60c02573[     ]+csrr[         ]+a0,hstateen0
+[      ]+[0-9a-f]+:[   ]+60c59073[     ]+csrw[         ]+hstateen0,a1
+[      ]+[0-9a-f]+:[   ]+60d02573[     ]+csrr[         ]+a0,hstateen1
+[      ]+[0-9a-f]+:[   ]+60d59073[     ]+csrw[         ]+hstateen1,a1
+[      ]+[0-9a-f]+:[   ]+60e02573[     ]+csrr[         ]+a0,hstateen2
+[      ]+[0-9a-f]+:[   ]+60e59073[     ]+csrw[         ]+hstateen2,a1
+[      ]+[0-9a-f]+:[   ]+60f02573[     ]+csrr[         ]+a0,hstateen3
+[      ]+[0-9a-f]+:[   ]+60f59073[     ]+csrw[         ]+hstateen3,a1
+[      ]+[0-9a-f]+:[   ]+31c02573[     ]+csrr[         ]+a0,mstateen0h
+[      ]+[0-9a-f]+:[   ]+31c59073[     ]+csrw[         ]+mstateen0h,a1
+[      ]+[0-9a-f]+:[   ]+31d02573[     ]+csrr[         ]+a0,mstateen1h
+[      ]+[0-9a-f]+:[   ]+31d59073[     ]+csrw[         ]+mstateen1h,a1
+[      ]+[0-9a-f]+:[   ]+31e02573[     ]+csrr[         ]+a0,mstateen2h
+[      ]+[0-9a-f]+:[   ]+31e59073[     ]+csrw[         ]+mstateen2h,a1
+[      ]+[0-9a-f]+:[   ]+31f02573[     ]+csrr[         ]+a0,mstateen3h
+[      ]+[0-9a-f]+:[   ]+31f59073[     ]+csrw[         ]+mstateen3h,a1
+[      ]+[0-9a-f]+:[   ]+61c02573[     ]+csrr[         ]+a0,hstateen0h
+[      ]+[0-9a-f]+:[   ]+61c59073[     ]+csrw[         ]+hstateen0h,a1
+[      ]+[0-9a-f]+:[   ]+61d02573[     ]+csrr[         ]+a0,hstateen1h
+[      ]+[0-9a-f]+:[   ]+61d59073[     ]+csrw[         ]+hstateen1h,a1
+[      ]+[0-9a-f]+:[   ]+61e02573[     ]+csrr[         ]+a0,hstateen2h
+[      ]+[0-9a-f]+:[   ]+61e59073[     ]+csrw[         ]+hstateen2h,a1
+[      ]+[0-9a-f]+:[   ]+61f02573[     ]+csrr[         ]+a0,hstateen3h
+[      ]+[0-9a-f]+:[   ]+61f59073[     ]+csrw[         ]+hstateen3h,a1
 [      ]+[0-9a-f]+:[   ]+04302573[     ]+csrr[         ]+a0,utval
 [      ]+[0-9a-f]+:[   ]+04359073[     ]+csrw[         ]+utval,a1
 [      ]+[0-9a-f]+:[   ]+14302573[     ]+csrr[         ]+a0,stval
index d00bce89f8d861a77f94fc30c45a2a79d551e8f7..b1e42268e92defafaa8893d26ccd6821985f53b4 100644 (file)
 .*Warning: invalid CSR `vsip', needs `h' extension
 .*Warning: invalid CSR `vsatp', needs `h' extension
 .*Warning: invalid CSR `vsatp', needs `h' extension
+.*Warning: invalid CSR `mstateen0', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen0', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen1', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen1', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen2', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen2', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen3', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen3', needs `smstateen' extension
+.*Warning: invalid CSR `sstateen0', needs `smstateen' extension
+.*Warning: invalid CSR `sstateen0', needs `smstateen' extension
+.*Warning: invalid CSR `sstateen1', needs `smstateen' extension
+.*Warning: invalid CSR `sstateen1', needs `smstateen' extension
+.*Warning: invalid CSR `sstateen2', needs `smstateen' extension
+.*Warning: invalid CSR `sstateen2', needs `smstateen' extension
+.*Warning: invalid CSR `sstateen3', needs `smstateen' extension
+.*Warning: invalid CSR `sstateen3', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen0', needs `h' extension
+.*Warning: invalid CSR `hstateen0', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen0', needs `h' extension
+.*Warning: invalid CSR `hstateen0', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen1', needs `h' extension
+.*Warning: invalid CSR `hstateen1', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen1', needs `h' extension
+.*Warning: invalid CSR `hstateen1', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen2', needs `h' extension
+.*Warning: invalid CSR `hstateen2', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen2', needs `h' extension
+.*Warning: invalid CSR `hstateen2', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen3', needs `h' extension
+.*Warning: invalid CSR `hstateen3', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen3', needs `h' extension
+.*Warning: invalid CSR `hstateen3', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen0h', needs rv32i extension
+.*Warning: invalid CSR `mstateen0h', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen0h', needs rv32i extension
+.*Warning: invalid CSR `mstateen0h', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen1h', needs rv32i extension
+.*Warning: invalid CSR `mstateen1h', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen1h', needs rv32i extension
+.*Warning: invalid CSR `mstateen1h', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen2h', needs rv32i extension
+.*Warning: invalid CSR `mstateen2h', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen2h', needs rv32i extension
+.*Warning: invalid CSR `mstateen2h', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen3h', needs rv32i extension
+.*Warning: invalid CSR `mstateen3h', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen3h', needs rv32i extension
+.*Warning: invalid CSR `mstateen3h', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen0h', needs rv32i extension
+.*Warning: invalid CSR `hstateen0h', needs `h' extension
+.*Warning: invalid CSR `hstateen0h', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen0h', needs rv32i extension
+.*Warning: invalid CSR `hstateen0h', needs `h' extension
+.*Warning: invalid CSR `hstateen0h', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen1h', needs rv32i extension
+.*Warning: invalid CSR `hstateen1h', needs `h' extension
+.*Warning: invalid CSR `hstateen1h', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen1h', needs rv32i extension
+.*Warning: invalid CSR `hstateen1h', needs `h' extension
+.*Warning: invalid CSR `hstateen1h', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen2h', needs rv32i extension
+.*Warning: invalid CSR `hstateen2h', needs `h' extension
+.*Warning: invalid CSR `hstateen2h', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen2h', needs rv32i extension
+.*Warning: invalid CSR `hstateen2h', needs `h' extension
+.*Warning: invalid CSR `hstateen2h', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen3h', needs rv32i extension
+.*Warning: invalid CSR `hstateen3h', needs `h' extension
+.*Warning: invalid CSR `hstateen3h', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen3h', needs rv32i extension
+.*Warning: invalid CSR `hstateen3h', needs `h' extension
+.*Warning: invalid CSR `hstateen3h', needs `smstateen' 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'
index cfcec35ebd89c429c002e7e91bd4884e8ba86e93..29a659af5929331345b4ccc69faccdef3524b204 100644 (file)
@@ -601,6 +601,46 @@ Disassembly of section .text:
 [      ]+[0-9a-f]+:[   ]+24459073[     ]+csrw[         ]+vsip,a1
 [      ]+[0-9a-f]+:[   ]+28002573[     ]+csrr[         ]+a0,vsatp
 [      ]+[0-9a-f]+:[   ]+28059073[     ]+csrw[         ]+vsatp,a1
+[      ]+[0-9a-f]+:[   ]+30c02573[     ]+csrr[         ]+a0,mstateen0
+[      ]+[0-9a-f]+:[   ]+30c59073[     ]+csrw[         ]+mstateen0,a1
+[      ]+[0-9a-f]+:[   ]+30d02573[     ]+csrr[         ]+a0,mstateen1
+[      ]+[0-9a-f]+:[   ]+30d59073[     ]+csrw[         ]+mstateen1,a1
+[      ]+[0-9a-f]+:[   ]+30e02573[     ]+csrr[         ]+a0,mstateen2
+[      ]+[0-9a-f]+:[   ]+30e59073[     ]+csrw[         ]+mstateen2,a1
+[      ]+[0-9a-f]+:[   ]+30f02573[     ]+csrr[         ]+a0,mstateen3
+[      ]+[0-9a-f]+:[   ]+30f59073[     ]+csrw[         ]+mstateen3,a1
+[      ]+[0-9a-f]+:[   ]+10c02573[     ]+csrr[         ]+a0,sstateen0
+[      ]+[0-9a-f]+:[   ]+10c59073[     ]+csrw[         ]+sstateen0,a1
+[      ]+[0-9a-f]+:[   ]+10d02573[     ]+csrr[         ]+a0,sstateen1
+[      ]+[0-9a-f]+:[   ]+10d59073[     ]+csrw[         ]+sstateen1,a1
+[      ]+[0-9a-f]+:[   ]+10e02573[     ]+csrr[         ]+a0,sstateen2
+[      ]+[0-9a-f]+:[   ]+10e59073[     ]+csrw[         ]+sstateen2,a1
+[      ]+[0-9a-f]+:[   ]+10f02573[     ]+csrr[         ]+a0,sstateen3
+[      ]+[0-9a-f]+:[   ]+10f59073[     ]+csrw[         ]+sstateen3,a1
+[      ]+[0-9a-f]+:[   ]+60c02573[     ]+csrr[         ]+a0,hstateen0
+[      ]+[0-9a-f]+:[   ]+60c59073[     ]+csrw[         ]+hstateen0,a1
+[      ]+[0-9a-f]+:[   ]+60d02573[     ]+csrr[         ]+a0,hstateen1
+[      ]+[0-9a-f]+:[   ]+60d59073[     ]+csrw[         ]+hstateen1,a1
+[      ]+[0-9a-f]+:[   ]+60e02573[     ]+csrr[         ]+a0,hstateen2
+[      ]+[0-9a-f]+:[   ]+60e59073[     ]+csrw[         ]+hstateen2,a1
+[      ]+[0-9a-f]+:[   ]+60f02573[     ]+csrr[         ]+a0,hstateen3
+[      ]+[0-9a-f]+:[   ]+60f59073[     ]+csrw[         ]+hstateen3,a1
+[      ]+[0-9a-f]+:[   ]+31c02573[     ]+csrr[         ]+a0,mstateen0h
+[      ]+[0-9a-f]+:[   ]+31c59073[     ]+csrw[         ]+mstateen0h,a1
+[      ]+[0-9a-f]+:[   ]+31d02573[     ]+csrr[         ]+a0,mstateen1h
+[      ]+[0-9a-f]+:[   ]+31d59073[     ]+csrw[         ]+mstateen1h,a1
+[      ]+[0-9a-f]+:[   ]+31e02573[     ]+csrr[         ]+a0,mstateen2h
+[      ]+[0-9a-f]+:[   ]+31e59073[     ]+csrw[         ]+mstateen2h,a1
+[      ]+[0-9a-f]+:[   ]+31f02573[     ]+csrr[         ]+a0,mstateen3h
+[      ]+[0-9a-f]+:[   ]+31f59073[     ]+csrw[         ]+mstateen3h,a1
+[      ]+[0-9a-f]+:[   ]+61c02573[     ]+csrr[         ]+a0,hstateen0h
+[      ]+[0-9a-f]+:[   ]+61c59073[     ]+csrw[         ]+hstateen0h,a1
+[      ]+[0-9a-f]+:[   ]+61d02573[     ]+csrr[         ]+a0,hstateen1h
+[      ]+[0-9a-f]+:[   ]+61d59073[     ]+csrw[         ]+hstateen1h,a1
+[      ]+[0-9a-f]+:[   ]+61e02573[     ]+csrr[         ]+a0,hstateen2h
+[      ]+[0-9a-f]+:[   ]+61e59073[     ]+csrw[         ]+hstateen2h,a1
+[      ]+[0-9a-f]+:[   ]+61f02573[     ]+csrr[         ]+a0,hstateen3h
+[      ]+[0-9a-f]+:[   ]+61f59073[     ]+csrw[         ]+hstateen3h,a1
 [      ]+[0-9a-f]+:[   ]+04302573[     ]+csrr[         ]+a0,utval
 [      ]+[0-9a-f]+:[   ]+04359073[     ]+csrw[         ]+utval,a1
 [      ]+[0-9a-f]+:[   ]+14302573[     ]+csrr[         ]+a0,stval
index d4716a29669680041e75643b7f9893520d133e87..1b66848aca1f83729243287fdefb6ec4b8adbb4f 100644 (file)
 .*Warning: invalid CSR `vsip', needs `h' extension
 .*Warning: invalid CSR `vsatp', needs `h' extension
 .*Warning: invalid CSR `vsatp', needs `h' extension
+.*Warning: invalid CSR `mstateen0', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen0', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen1', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen1', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen2', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen2', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen3', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen3', needs `smstateen' extension
+.*Warning: invalid CSR `sstateen0', needs `smstateen' extension
+.*Warning: invalid CSR `sstateen0', needs `smstateen' extension
+.*Warning: invalid CSR `sstateen1', needs `smstateen' extension
+.*Warning: invalid CSR `sstateen1', needs `smstateen' extension
+.*Warning: invalid CSR `sstateen2', needs `smstateen' extension
+.*Warning: invalid CSR `sstateen2', needs `smstateen' extension
+.*Warning: invalid CSR `sstateen3', needs `smstateen' extension
+.*Warning: invalid CSR `sstateen3', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen0', needs `h' extension
+.*Warning: invalid CSR `hstateen0', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen0', needs `h' extension
+.*Warning: invalid CSR `hstateen0', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen1', needs `h' extension
+.*Warning: invalid CSR `hstateen1', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen1', needs `h' extension
+.*Warning: invalid CSR `hstateen1', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen2', needs `h' extension
+.*Warning: invalid CSR `hstateen2', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen2', needs `h' extension
+.*Warning: invalid CSR `hstateen2', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen3', needs `h' extension
+.*Warning: invalid CSR `hstateen3', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen3', needs `h' extension
+.*Warning: invalid CSR `hstateen3', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen0h', needs rv32i extension
+.*Warning: invalid CSR `mstateen0h', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen0h', needs rv32i extension
+.*Warning: invalid CSR `mstateen0h', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen1h', needs rv32i extension
+.*Warning: invalid CSR `mstateen1h', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen1h', needs rv32i extension
+.*Warning: invalid CSR `mstateen1h', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen2h', needs rv32i extension
+.*Warning: invalid CSR `mstateen2h', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen2h', needs rv32i extension
+.*Warning: invalid CSR `mstateen2h', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen3h', needs rv32i extension
+.*Warning: invalid CSR `mstateen3h', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen3h', needs rv32i extension
+.*Warning: invalid CSR `mstateen3h', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen0h', needs rv32i extension
+.*Warning: invalid CSR `hstateen0h', needs `h' extension
+.*Warning: invalid CSR `hstateen0h', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen0h', needs rv32i extension
+.*Warning: invalid CSR `hstateen0h', needs `h' extension
+.*Warning: invalid CSR `hstateen0h', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen1h', needs rv32i extension
+.*Warning: invalid CSR `hstateen1h', needs `h' extension
+.*Warning: invalid CSR `hstateen1h', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen1h', needs rv32i extension
+.*Warning: invalid CSR `hstateen1h', needs `h' extension
+.*Warning: invalid CSR `hstateen1h', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen2h', needs rv32i extension
+.*Warning: invalid CSR `hstateen2h', needs `h' extension
+.*Warning: invalid CSR `hstateen2h', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen2h', needs rv32i extension
+.*Warning: invalid CSR `hstateen2h', needs `h' extension
+.*Warning: invalid CSR `hstateen2h', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen3h', needs rv32i extension
+.*Warning: invalid CSR `hstateen3h', needs `h' extension
+.*Warning: invalid CSR `hstateen3h', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen3h', needs rv32i extension
+.*Warning: invalid CSR `hstateen3h', needs `h' extension
+.*Warning: invalid CSR `hstateen3h', needs `smstateen' 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'
index 3c27ca2de2005674a0989cc7aaef415cf7765ab1..46ca519b31e3828c7b7d9051017780451f4326a2 100644 (file)
@@ -601,6 +601,46 @@ Disassembly of section .text:
 [      ]+[0-9a-f]+:[   ]+24459073[     ]+csrw[         ]+vsip,a1
 [      ]+[0-9a-f]+:[   ]+28002573[     ]+csrr[         ]+a0,vsatp
 [      ]+[0-9a-f]+:[   ]+28059073[     ]+csrw[         ]+vsatp,a1
+[      ]+[0-9a-f]+:[   ]+30c02573[     ]+csrr[         ]+a0,mstateen0
+[      ]+[0-9a-f]+:[   ]+30c59073[     ]+csrw[         ]+mstateen0,a1
+[      ]+[0-9a-f]+:[   ]+30d02573[     ]+csrr[         ]+a0,mstateen1
+[      ]+[0-9a-f]+:[   ]+30d59073[     ]+csrw[         ]+mstateen1,a1
+[      ]+[0-9a-f]+:[   ]+30e02573[     ]+csrr[         ]+a0,mstateen2
+[      ]+[0-9a-f]+:[   ]+30e59073[     ]+csrw[         ]+mstateen2,a1
+[      ]+[0-9a-f]+:[   ]+30f02573[     ]+csrr[         ]+a0,mstateen3
+[      ]+[0-9a-f]+:[   ]+30f59073[     ]+csrw[         ]+mstateen3,a1
+[      ]+[0-9a-f]+:[   ]+10c02573[     ]+csrr[         ]+a0,sstateen0
+[      ]+[0-9a-f]+:[   ]+10c59073[     ]+csrw[         ]+sstateen0,a1
+[      ]+[0-9a-f]+:[   ]+10d02573[     ]+csrr[         ]+a0,sstateen1
+[      ]+[0-9a-f]+:[   ]+10d59073[     ]+csrw[         ]+sstateen1,a1
+[      ]+[0-9a-f]+:[   ]+10e02573[     ]+csrr[         ]+a0,sstateen2
+[      ]+[0-9a-f]+:[   ]+10e59073[     ]+csrw[         ]+sstateen2,a1
+[      ]+[0-9a-f]+:[   ]+10f02573[     ]+csrr[         ]+a0,sstateen3
+[      ]+[0-9a-f]+:[   ]+10f59073[     ]+csrw[         ]+sstateen3,a1
+[      ]+[0-9a-f]+:[   ]+60c02573[     ]+csrr[         ]+a0,hstateen0
+[      ]+[0-9a-f]+:[   ]+60c59073[     ]+csrw[         ]+hstateen0,a1
+[      ]+[0-9a-f]+:[   ]+60d02573[     ]+csrr[         ]+a0,hstateen1
+[      ]+[0-9a-f]+:[   ]+60d59073[     ]+csrw[         ]+hstateen1,a1
+[      ]+[0-9a-f]+:[   ]+60e02573[     ]+csrr[         ]+a0,hstateen2
+[      ]+[0-9a-f]+:[   ]+60e59073[     ]+csrw[         ]+hstateen2,a1
+[      ]+[0-9a-f]+:[   ]+60f02573[     ]+csrr[         ]+a0,hstateen3
+[      ]+[0-9a-f]+:[   ]+60f59073[     ]+csrw[         ]+hstateen3,a1
+[      ]+[0-9a-f]+:[   ]+31c02573[     ]+csrr[         ]+a0,mstateen0h
+[      ]+[0-9a-f]+:[   ]+31c59073[     ]+csrw[         ]+mstateen0h,a1
+[      ]+[0-9a-f]+:[   ]+31d02573[     ]+csrr[         ]+a0,mstateen1h
+[      ]+[0-9a-f]+:[   ]+31d59073[     ]+csrw[         ]+mstateen1h,a1
+[      ]+[0-9a-f]+:[   ]+31e02573[     ]+csrr[         ]+a0,mstateen2h
+[      ]+[0-9a-f]+:[   ]+31e59073[     ]+csrw[         ]+mstateen2h,a1
+[      ]+[0-9a-f]+:[   ]+31f02573[     ]+csrr[         ]+a0,mstateen3h
+[      ]+[0-9a-f]+:[   ]+31f59073[     ]+csrw[         ]+mstateen3h,a1
+[      ]+[0-9a-f]+:[   ]+61c02573[     ]+csrr[         ]+a0,hstateen0h
+[      ]+[0-9a-f]+:[   ]+61c59073[     ]+csrw[         ]+hstateen0h,a1
+[      ]+[0-9a-f]+:[   ]+61d02573[     ]+csrr[         ]+a0,hstateen1h
+[      ]+[0-9a-f]+:[   ]+61d59073[     ]+csrw[         ]+hstateen1h,a1
+[      ]+[0-9a-f]+:[   ]+61e02573[     ]+csrr[         ]+a0,hstateen2h
+[      ]+[0-9a-f]+:[   ]+61e59073[     ]+csrw[         ]+hstateen2h,a1
+[      ]+[0-9a-f]+:[   ]+61f02573[     ]+csrr[         ]+a0,hstateen3h
+[      ]+[0-9a-f]+:[   ]+61f59073[     ]+csrw[         ]+hstateen3h,a1
 [      ]+[0-9a-f]+:[   ]+04302573[     ]+csrr[         ]+a0,0x43
 [      ]+[0-9a-f]+:[   ]+04359073[     ]+csrw[         ]+0x43,a1
 [      ]+[0-9a-f]+:[   ]+14302573[     ]+csrr[         ]+a0,stval
index ab291c53eaca41d9e162a6a9199ae4b1652647ab..90a67f04c27604c266d0f63f9e5e2d36f655ddde 100644 (file)
 .*Warning: invalid CSR `vsip', needs `h' extension
 .*Warning: invalid CSR `vsatp', needs `h' extension
 .*Warning: invalid CSR `vsatp', needs `h' extension
+.*Warning: invalid CSR `mstateen0', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen0', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen1', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen1', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen2', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen2', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen3', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen3', needs `smstateen' extension
+.*Warning: invalid CSR `sstateen0', needs `smstateen' extension
+.*Warning: invalid CSR `sstateen0', needs `smstateen' extension
+.*Warning: invalid CSR `sstateen1', needs `smstateen' extension
+.*Warning: invalid CSR `sstateen1', needs `smstateen' extension
+.*Warning: invalid CSR `sstateen2', needs `smstateen' extension
+.*Warning: invalid CSR `sstateen2', needs `smstateen' extension
+.*Warning: invalid CSR `sstateen3', needs `smstateen' extension
+.*Warning: invalid CSR `sstateen3', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen0', needs `h' extension
+.*Warning: invalid CSR `hstateen0', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen0', needs `h' extension
+.*Warning: invalid CSR `hstateen0', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen1', needs `h' extension
+.*Warning: invalid CSR `hstateen1', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen1', needs `h' extension
+.*Warning: invalid CSR `hstateen1', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen2', needs `h' extension
+.*Warning: invalid CSR `hstateen2', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen2', needs `h' extension
+.*Warning: invalid CSR `hstateen2', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen3', needs `h' extension
+.*Warning: invalid CSR `hstateen3', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen3', needs `h' extension
+.*Warning: invalid CSR `hstateen3', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen0h', needs rv32i extension
+.*Warning: invalid CSR `mstateen0h', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen0h', needs rv32i extension
+.*Warning: invalid CSR `mstateen0h', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen1h', needs rv32i extension
+.*Warning: invalid CSR `mstateen1h', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen1h', needs rv32i extension
+.*Warning: invalid CSR `mstateen1h', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen2h', needs rv32i extension
+.*Warning: invalid CSR `mstateen2h', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen2h', needs rv32i extension
+.*Warning: invalid CSR `mstateen2h', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen3h', needs rv32i extension
+.*Warning: invalid CSR `mstateen3h', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen3h', needs rv32i extension
+.*Warning: invalid CSR `mstateen3h', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen0h', needs rv32i extension
+.*Warning: invalid CSR `hstateen0h', needs `h' extension
+.*Warning: invalid CSR `hstateen0h', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen0h', needs rv32i extension
+.*Warning: invalid CSR `hstateen0h', needs `h' extension
+.*Warning: invalid CSR `hstateen0h', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen1h', needs rv32i extension
+.*Warning: invalid CSR `hstateen1h', needs `h' extension
+.*Warning: invalid CSR `hstateen1h', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen1h', needs rv32i extension
+.*Warning: invalid CSR `hstateen1h', needs `h' extension
+.*Warning: invalid CSR `hstateen1h', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen2h', needs rv32i extension
+.*Warning: invalid CSR `hstateen2h', needs `h' extension
+.*Warning: invalid CSR `hstateen2h', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen2h', needs rv32i extension
+.*Warning: invalid CSR `hstateen2h', needs `h' extension
+.*Warning: invalid CSR `hstateen2h', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen3h', needs rv32i extension
+.*Warning: invalid CSR `hstateen3h', needs `h' extension
+.*Warning: invalid CSR `hstateen3h', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen3h', needs rv32i extension
+.*Warning: invalid CSR `hstateen3h', needs `h' extension
+.*Warning: invalid CSR `hstateen3h', needs `smstateen' 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'
index cf9479db654b8cb068996fd21b44b79259697e99..da56a0b5668d175fa5922334fdfe913e608e90b0 100644 (file)
@@ -601,6 +601,46 @@ Disassembly of section .text:
 [      ]+[0-9a-f]+:[   ]+24459073[     ]+csrw[         ]+vsip,a1
 [      ]+[0-9a-f]+:[   ]+28002573[     ]+csrr[         ]+a0,vsatp
 [      ]+[0-9a-f]+:[   ]+28059073[     ]+csrw[         ]+vsatp,a1
+[      ]+[0-9a-f]+:[   ]+30c02573[     ]+csrr[         ]+a0,mstateen0
+[      ]+[0-9a-f]+:[   ]+30c59073[     ]+csrw[         ]+mstateen0,a1
+[      ]+[0-9a-f]+:[   ]+30d02573[     ]+csrr[         ]+a0,mstateen1
+[      ]+[0-9a-f]+:[   ]+30d59073[     ]+csrw[         ]+mstateen1,a1
+[      ]+[0-9a-f]+:[   ]+30e02573[     ]+csrr[         ]+a0,mstateen2
+[      ]+[0-9a-f]+:[   ]+30e59073[     ]+csrw[         ]+mstateen2,a1
+[      ]+[0-9a-f]+:[   ]+30f02573[     ]+csrr[         ]+a0,mstateen3
+[      ]+[0-9a-f]+:[   ]+30f59073[     ]+csrw[         ]+mstateen3,a1
+[      ]+[0-9a-f]+:[   ]+10c02573[     ]+csrr[         ]+a0,sstateen0
+[      ]+[0-9a-f]+:[   ]+10c59073[     ]+csrw[         ]+sstateen0,a1
+[      ]+[0-9a-f]+:[   ]+10d02573[     ]+csrr[         ]+a0,sstateen1
+[      ]+[0-9a-f]+:[   ]+10d59073[     ]+csrw[         ]+sstateen1,a1
+[      ]+[0-9a-f]+:[   ]+10e02573[     ]+csrr[         ]+a0,sstateen2
+[      ]+[0-9a-f]+:[   ]+10e59073[     ]+csrw[         ]+sstateen2,a1
+[      ]+[0-9a-f]+:[   ]+10f02573[     ]+csrr[         ]+a0,sstateen3
+[      ]+[0-9a-f]+:[   ]+10f59073[     ]+csrw[         ]+sstateen3,a1
+[      ]+[0-9a-f]+:[   ]+60c02573[     ]+csrr[         ]+a0,hstateen0
+[      ]+[0-9a-f]+:[   ]+60c59073[     ]+csrw[         ]+hstateen0,a1
+[      ]+[0-9a-f]+:[   ]+60d02573[     ]+csrr[         ]+a0,hstateen1
+[      ]+[0-9a-f]+:[   ]+60d59073[     ]+csrw[         ]+hstateen1,a1
+[      ]+[0-9a-f]+:[   ]+60e02573[     ]+csrr[         ]+a0,hstateen2
+[      ]+[0-9a-f]+:[   ]+60e59073[     ]+csrw[         ]+hstateen2,a1
+[      ]+[0-9a-f]+:[   ]+60f02573[     ]+csrr[         ]+a0,hstateen3
+[      ]+[0-9a-f]+:[   ]+60f59073[     ]+csrw[         ]+hstateen3,a1
+[      ]+[0-9a-f]+:[   ]+31c02573[     ]+csrr[         ]+a0,mstateen0h
+[      ]+[0-9a-f]+:[   ]+31c59073[     ]+csrw[         ]+mstateen0h,a1
+[      ]+[0-9a-f]+:[   ]+31d02573[     ]+csrr[         ]+a0,mstateen1h
+[      ]+[0-9a-f]+:[   ]+31d59073[     ]+csrw[         ]+mstateen1h,a1
+[      ]+[0-9a-f]+:[   ]+31e02573[     ]+csrr[         ]+a0,mstateen2h
+[      ]+[0-9a-f]+:[   ]+31e59073[     ]+csrw[         ]+mstateen2h,a1
+[      ]+[0-9a-f]+:[   ]+31f02573[     ]+csrr[         ]+a0,mstateen3h
+[      ]+[0-9a-f]+:[   ]+31f59073[     ]+csrw[         ]+mstateen3h,a1
+[      ]+[0-9a-f]+:[   ]+61c02573[     ]+csrr[         ]+a0,hstateen0h
+[      ]+[0-9a-f]+:[   ]+61c59073[     ]+csrw[         ]+hstateen0h,a1
+[      ]+[0-9a-f]+:[   ]+61d02573[     ]+csrr[         ]+a0,hstateen1h
+[      ]+[0-9a-f]+:[   ]+61d59073[     ]+csrw[         ]+hstateen1h,a1
+[      ]+[0-9a-f]+:[   ]+61e02573[     ]+csrr[         ]+a0,hstateen2h
+[      ]+[0-9a-f]+:[   ]+61e59073[     ]+csrw[         ]+hstateen2h,a1
+[      ]+[0-9a-f]+:[   ]+61f02573[     ]+csrr[         ]+a0,hstateen3h
+[      ]+[0-9a-f]+:[   ]+61f59073[     ]+csrw[         ]+hstateen3h,a1
 [      ]+[0-9a-f]+:[   ]+04302573[     ]+csrr[         ]+a0,ubadaddr
 [      ]+[0-9a-f]+:[   ]+04359073[     ]+csrw[         ]+ubadaddr,a1
 [      ]+[0-9a-f]+:[   ]+14302573[     ]+csrr[         ]+a0,sbadaddr
index b43169719d11bd7cc22e9c6ee869e89c8bf1f64a..7376c7c33ad761ddb96f88eac701fbd69f2552ed 100644 (file)
 .*Warning: invalid CSR `vsip', needs `h' extension
 .*Warning: invalid CSR `vsatp', needs `h' extension
 .*Warning: invalid CSR `vsatp', needs `h' extension
+.*Warning: invalid CSR `mstateen0', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen0', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen1', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen1', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen2', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen2', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen3', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen3', needs `smstateen' extension
+.*Warning: invalid CSR `sstateen0', needs `smstateen' extension
+.*Warning: invalid CSR `sstateen0', needs `smstateen' extension
+.*Warning: invalid CSR `sstateen1', needs `smstateen' extension
+.*Warning: invalid CSR `sstateen1', needs `smstateen' extension
+.*Warning: invalid CSR `sstateen2', needs `smstateen' extension
+.*Warning: invalid CSR `sstateen2', needs `smstateen' extension
+.*Warning: invalid CSR `sstateen3', needs `smstateen' extension
+.*Warning: invalid CSR `sstateen3', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen0', needs `h' extension
+.*Warning: invalid CSR `hstateen0', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen0', needs `h' extension
+.*Warning: invalid CSR `hstateen0', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen1', needs `h' extension
+.*Warning: invalid CSR `hstateen1', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen1', needs `h' extension
+.*Warning: invalid CSR `hstateen1', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen2', needs `h' extension
+.*Warning: invalid CSR `hstateen2', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen2', needs `h' extension
+.*Warning: invalid CSR `hstateen2', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen3', needs `h' extension
+.*Warning: invalid CSR `hstateen3', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen3', needs `h' extension
+.*Warning: invalid CSR `hstateen3', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen0h', needs rv32i extension
+.*Warning: invalid CSR `mstateen0h', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen0h', needs rv32i extension
+.*Warning: invalid CSR `mstateen0h', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen1h', needs rv32i extension
+.*Warning: invalid CSR `mstateen1h', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen1h', needs rv32i extension
+.*Warning: invalid CSR `mstateen1h', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen2h', needs rv32i extension
+.*Warning: invalid CSR `mstateen2h', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen2h', needs rv32i extension
+.*Warning: invalid CSR `mstateen2h', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen3h', needs rv32i extension
+.*Warning: invalid CSR `mstateen3h', needs `smstateen' extension
+.*Warning: invalid CSR `mstateen3h', needs rv32i extension
+.*Warning: invalid CSR `mstateen3h', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen0h', needs rv32i extension
+.*Warning: invalid CSR `hstateen0h', needs `h' extension
+.*Warning: invalid CSR `hstateen0h', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen0h', needs rv32i extension
+.*Warning: invalid CSR `hstateen0h', needs `h' extension
+.*Warning: invalid CSR `hstateen0h', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen1h', needs rv32i extension
+.*Warning: invalid CSR `hstateen1h', needs `h' extension
+.*Warning: invalid CSR `hstateen1h', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen1h', needs rv32i extension
+.*Warning: invalid CSR `hstateen1h', needs `h' extension
+.*Warning: invalid CSR `hstateen1h', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen2h', needs rv32i extension
+.*Warning: invalid CSR `hstateen2h', needs `h' extension
+.*Warning: invalid CSR `hstateen2h', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen2h', needs rv32i extension
+.*Warning: invalid CSR `hstateen2h', needs `h' extension
+.*Warning: invalid CSR `hstateen2h', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen3h', needs rv32i extension
+.*Warning: invalid CSR `hstateen3h', needs `h' extension
+.*Warning: invalid CSR `hstateen3h', needs `smstateen' extension
+.*Warning: invalid CSR `hstateen3h', needs rv32i extension
+.*Warning: invalid CSR `hstateen3h', needs `h' extension
+.*Warning: invalid CSR `hstateen3h', needs `smstateen' 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
index 0d0ec712c15a062dfe38946081d6d68d23a7308a..1a4a2be2c0f34ae2adec95e27851f64d4415450c 100644 (file)
        csr vsip
        csr vsatp
 
+       # Smstateen extension
+       csr mstateen0
+       csr mstateen1
+       csr mstateen2
+       csr mstateen3
+       csr sstateen0
+       csr sstateen1
+       csr sstateen2
+       csr sstateen3
+       csr hstateen0
+       csr hstateen1
+       csr hstateen2
+       csr hstateen3
+       csr mstateen0h
+       csr mstateen1h
+       csr mstateen2h
+       csr mstateen3h
+       csr hstateen0h
+       csr hstateen1h
+       csr hstateen2h
+       csr hstateen3h
+
        # Supported in previous priv spec, but dropped now
 
        csr ubadaddr            # 0x043 in 1.9.1, but the value is utval since 1.10
index 207215b79fcdfff751e89ac16e387075d2b3c67d..97a37bae01ccf721ddcc23cdd5004d3ab364b35c 100644 (file)
 #define CSR_UIP 0x44
 #define CSR_SEDELEG 0x102
 #define CSR_SIDELEG 0x103
+/* Smstateen extension */
+#define CSR_MSTATEEN0 0x30c
+#define CSR_MSTATEEN1 0x30d
+#define CSR_MSTATEEN2 0x30e
+#define CSR_MSTATEEN3 0x30f
+#define CSR_SSTATEEN0 0x10c
+#define CSR_SSTATEEN1 0x10d
+#define CSR_SSTATEEN2 0x10e
+#define CSR_SSTATEEN3 0x10f
+#define CSR_HSTATEEN0 0x60c
+#define CSR_HSTATEEN1 0x60d
+#define CSR_HSTATEEN2 0x60e
+#define CSR_HSTATEEN3 0x60f
+#define CSR_MSTATEEN0H 0x31c
+#define CSR_MSTATEEN1H 0x31d
+#define CSR_MSTATEEN2H 0x31e
+#define CSR_MSTATEEN3H 0x31f
+#define CSR_HSTATEEN0H 0x61c
+#define CSR_HSTATEEN1H 0x61d
+#define CSR_HSTATEEN2H 0x61e
+#define CSR_HSTATEEN3H 0x61f
 /* Unprivileged Floating-Point CSR addresses.  */
 #define CSR_FFLAGS 0x1
 #define CSR_FRM 0x2
@@ -3097,6 +3118,27 @@ DECLARE_CSR(vscause, CSR_VSCAUSE, CSR_CLASS_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_C
 DECLARE_CSR(vstval, CSR_VSTVAL, CSR_CLASS_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
 DECLARE_CSR(vsip, CSR_VSIP, CSR_CLASS_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
 DECLARE_CSR(vsatp, CSR_VSATP, CSR_CLASS_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
+/* Smstateen extension */
+DECLARE_CSR(mstateen0, CSR_MSTATEEN0, CSR_CLASS_SMSTATEEN, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
+DECLARE_CSR(mstateen1, CSR_MSTATEEN1, CSR_CLASS_SMSTATEEN, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
+DECLARE_CSR(mstateen2, CSR_MSTATEEN2, CSR_CLASS_SMSTATEEN, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
+DECLARE_CSR(mstateen3, CSR_MSTATEEN3, CSR_CLASS_SMSTATEEN, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
+DECLARE_CSR(sstateen0, CSR_SSTATEEN0, CSR_CLASS_SMSTATEEN, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
+DECLARE_CSR(sstateen1, CSR_SSTATEEN1, CSR_CLASS_SMSTATEEN, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
+DECLARE_CSR(sstateen2, CSR_SSTATEEN2, CSR_CLASS_SMSTATEEN, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
+DECLARE_CSR(sstateen3, CSR_SSTATEEN3, CSR_CLASS_SMSTATEEN, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
+DECLARE_CSR(hstateen0, CSR_HSTATEEN0, CSR_CLASS_SMSTATEEN_AND_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
+DECLARE_CSR(hstateen1, CSR_HSTATEEN1, CSR_CLASS_SMSTATEEN_AND_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
+DECLARE_CSR(hstateen2, CSR_HSTATEEN2, CSR_CLASS_SMSTATEEN_AND_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
+DECLARE_CSR(hstateen3, CSR_HSTATEEN3, CSR_CLASS_SMSTATEEN_AND_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
+DECLARE_CSR(mstateen0h, CSR_MSTATEEN0H, CSR_CLASS_SMSTATEEN_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
+DECLARE_CSR(mstateen1h, CSR_MSTATEEN1H, CSR_CLASS_SMSTATEEN_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
+DECLARE_CSR(mstateen2h, CSR_MSTATEEN2H, CSR_CLASS_SMSTATEEN_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
+DECLARE_CSR(mstateen3h, CSR_MSTATEEN3H, CSR_CLASS_SMSTATEEN_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
+DECLARE_CSR(hstateen0h, CSR_HSTATEEN0H, CSR_CLASS_SMSTATEEN_AND_H_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
+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)
 /* 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)