+// See LICENSE for license details.
+
#include "sim.h"
#include "htif.h"
#include <sys/mman.h>
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);
+ if (args.size())
+ step_all(atoll(args[0].c_str()), 1, noisy);
else
- while(1) step_all(1,1,noisy);
+ while (1) step_all(1, 1, noisy);
}
void sim_t::interactive_run_proc_noisy(const std::string& cmd, const std::vector<std::string>& args)
if(a.size() == 2)
procs[p]->step(atoi(a[1].c_str()),noisy);
else
- while(1) procs[p]->step(1,noisy);
+ while (1) procs[p]->step(1, noisy);
}
void sim_t::interactive_quit(const std::string& cmd, const std::vector<std::string>& args)
{
- stop();
+ exit(0);
}
reg_t sim_t::get_pc(const std::vector<std::string>& args)
int p = atoi(args[0].c_str());
if(p >= (int)num_cores())
throw trap_illegal_instruction;
- mmu->set_vm_enabled(!!(procs[p]->sr & SR_VM));
+ mmu->set_sr(procs[p]->sr);
mmu->set_ptbr(procs[p]->mmu.get_ptbr());
addr_str = args[1];
}
std::vector<std::string> args2;
args2 = std::vector<std::string>(args.begin()+1,args.end()-1);
- while(1)
+ while (1)
{
reg_t current;
if(scmd == "reg")