alter STATE CSR to support subvl
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 27 Jun 2019 06:36:00 +0000 (07:36 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 27 Jun 2019 06:36:00 +0000 (07:36 +0100)
riscv/processor.cc

index 09467bc3b164887c33e017563a90ded7352f2437..c6d604a67d3cc703992adf39f08589b222d3debb 100644 (file)
@@ -890,7 +890,8 @@ reg_t processor_t::get_csr(int which)
     case CSR_USVSTATE:
       return (state.sv().vl-1)            | ((state.sv().mvl-1)<<6) |
              (state.sv().srcoffs<<12)     | (state.sv().destoffs<<18) |
-             (state.sv().state_bank<<24)  | (state.sv().state_size<<26);
+             ((state.sv().subvl-1)<<24)   |
+             (state.sv().ssvoffs<<26)     | (state.sv().dsvoffs<<28);
     case CSR_USVMVL:
       return state.sv().mvl;
     case CSR_SVREGTOP: