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:
1b214d4
)
simplified default case and added comments
author
Scott Beamer
<sbeamer@eecs.berkeley.edu>
Mon, 13 Jul 2015 23:17:13 +0000
(16:17 -0700)
committer
Scott Beamer
<sbeamer@eecs.berkeley.edu>
Mon, 13 Jul 2015 23:17:13 +0000
(16:17 -0700)
riscv/interactive.cc
patch
|
blob
|
history
diff --git
a/riscv/interactive.cc
b/riscv/interactive.cc
index 6ae1892f001ea2c2ff9878a468eeb0c666727b88..07b2801fa6627b23675b9238ddcbb5ca3f84ceec 100644
(file)
--- a/
riscv/interactive.cc
+++ b/
riscv/interactive.cc
@@
-183,9
+183,8
@@
reg_t sim_t::get_reg(const std::vector<std::string>& args)
r = strtoul(args[1].c_str(), &ptr, 10);
if (*ptr) {
#define DECLARE_CSR(name, number) if (args[1] == #name) return p->get_csr(number);
- if (0) ;
- #include "encoding.h"
- else r = NXPR;
+ #include "encoding.h" // generates if's for all csrs
+ r = NXPR; // else case (csr name not found)
#undef DECLARE_CSR
}
}