diff options
author | Rupert Swarbrick <rswarbrick@gmail.com> | 2022-02-18 15:45:21 +0000 |
---|---|---|
committer | Rupert Swarbrick <rswarbrick@gmail.com> | 2022-03-12 21:51:01 +0000 |
commit | cb632586bdb1b57ea4e5a5543e21bbb257e47f3b (patch) | |
tree | 17720758321ebccff687f9d642ac5d14c49df95b /riscv/interactive.cc | |
parent | 59ec157568d2a52feeec568ac042362db1c5ddbc (diff) | |
download | spike-cb632586bdb1b57ea4e5a5543e21bbb257e47f3b.zip spike-cb632586bdb1b57ea4e5a5543e21bbb257e47f3b.tar.gz spike-cb632586bdb1b57ea4e5a5543e21bbb257e47f3b.tar.bz2 |
Construct an isa_parser_t and pass it to processor_t constructor
This is a minor change, turning processor_t from a child class of
isa_parser_t into a class that contains an isa_parser_t as a field.
The point is that it is a step toward separating out
"configuration" (and ISA string parsing) from processor state. This
should be helpful for rejigging things so that we construct more from
a supplied device tree.
Diffstat (limited to 'riscv/interactive.cc')
-rw-r--r-- | riscv/interactive.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/riscv/interactive.cc b/riscv/interactive.cc index 172cd33..88eb86b 100644 --- a/riscv/interactive.cc +++ b/riscv/interactive.cc @@ -273,7 +273,7 @@ void sim_t::interactive_pc(const std::string& cmd, const std::vector<std::string throw trap_interactive(); processor_t *p = get_core(args[0]); - int max_xlen = p->get_max_xlen(); + int max_xlen = p->get_isa().get_max_xlen(); std::ostream out(sout_.rdbuf()); out << std::hex << std::setfill('0') << "0x" << std::setw(max_xlen/4) @@ -379,7 +379,7 @@ void sim_t::interactive_reg(const std::string& cmd, const std::vector<std::strin throw trap_interactive(); processor_t *p = get_core(args[0]); - int max_xlen = p->get_max_xlen(); + int max_xlen = p->get_isa().get_max_xlen(); std::ostream out(sout_.rdbuf()); out << std::hex; @@ -481,7 +481,7 @@ reg_t sim_t::get_mem(const std::vector<std::string>& args) void sim_t::interactive_mem(const std::string& cmd, const std::vector<std::string>& args) { - int max_xlen = procs[0]->get_max_xlen(); + int max_xlen = procs[0]->get_isa().get_max_xlen(); std::ostream out(sout_.rdbuf()); out << std::hex << "0x" << std::setfill('0') << std::setw(max_xlen/4) @@ -541,7 +541,7 @@ void sim_t::interactive_until(const std::string& cmd, const std::vector<std::str throw trap_interactive(); // mask bits above max_xlen - int max_xlen = procs[strtol(args[1].c_str(),NULL,10)]->get_max_xlen(); + int max_xlen = procs[strtol(args[1].c_str(),NULL,10)]->get_isa().get_max_xlen(); if (max_xlen == 32) val &= 0xFFFFFFFF; std::vector<std::string> args2; |