diff options
author | Andrew Waterman <waterman@cs.berkeley.edu> | 2013-03-29 18:35:25 -0700 |
---|---|---|
committer | Andrew Waterman <waterman@cs.berkeley.edu> | 2013-03-29 18:35:25 -0700 |
commit | b189b9b128ce619f9423009062a85ccb17b32db9 (patch) | |
tree | 519ee4bd22ea039d28690294461a02b2ce66635f /riscv/interactive.cc | |
parent | 983a062e287ebe0d69c17448e67da6223cf48080 (diff) | |
download | spike-b189b9b128ce619f9423009062a85ccb17b32db9.zip spike-b189b9b128ce619f9423009062a85ccb17b32db9.tar.gz spike-b189b9b128ce619f9423009062a85ccb17b32db9.tar.bz2 |
add load-reserved/store-conditional instructions
Diffstat (limited to 'riscv/interactive.cc')
-rw-r--r-- | riscv/interactive.cc | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/riscv/interactive.cc b/riscv/interactive.cc index 3f02910..af4c0bd 100644 --- a/riscv/interactive.cc +++ b/riscv/interactive.cc @@ -64,10 +64,8 @@ void sim_t::interactive_run_silent(const std::string& cmd, const std::vector<std void sim_t::interactive_run(const std::string& cmd, const std::vector<std::string>& args, bool noisy) { - if (args.size()) - step_all(atoll(args[0].c_str()), 1, noisy); - else - while (1) step_all(1, 1, noisy); + size_t steps = args.size() ? atoll(args[0].c_str()) : -1; + step(steps, noisy); } void sim_t::interactive_run_proc_noisy(const std::string& cmd, const std::vector<std::string>& args) @@ -89,10 +87,8 @@ void sim_t::interactive_run_proc(const std::string& cmd, const std::vector<std:: if(p >= (int)num_cores()) return; - if(a.size() == 2) - procs[p]->step(atoi(a[1].c_str()),noisy); - else - while (1) procs[p]->step(1, noisy); + size_t steps = a.size() > 1 ? atoll(a[1].c_str()) : -1; + procs[p]->step(steps, noisy); } void sim_t::interactive_quit(const std::string& cmd, const std::vector<std::string>& args) @@ -252,6 +248,6 @@ void sim_t::interactive_until(const std::string& cmd, const std::vector<std::str if(cmd == "while" && current != val) break; - step_all(1,1,false); + step(1, false); } } |