projects
/
riscv-isa-sim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ef4c1f8
)
add SUBVL CSR set
author
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Thu, 27 Jun 2019 06:34:11 +0000
(07:34 +0100)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Thu, 27 Jun 2019 06:34:11 +0000
(07:34 +0100)
riscv/processor.cc
patch
|
blob
|
history
diff --git
a/riscv/processor.cc
b/riscv/processor.cc
index 19ebffcb26c2174f58611da2961463bc4c78350e..09467bc3b164887c33e017563a90ded7352f2437 100644
(file)
--- a/
riscv/processor.cc
+++ b/
riscv/processor.cc
@@
-539,6
+539,12
@@
reg_t processor_t::set_csr(int which, reg_t val, bool imm_mode)
}
break;
}
+ case CSR_USVSUBVL:
+ state.sv().subvl = std::max(1, std::min(4, (int)val));
+ old_val = state.sv().subvl;
+ // TODO XXX throw exception if val attempted to be set == 0
+ fprintf(stderr, "set VL %lx\n", state.sv().vl);
+ break;
case CSR_USVVL:
state.sv().vl = std::min(state.sv().mvl, val + 1);
old_val = state.sv().mvl - 1;