summaryrefslogtreecommitdiff
path: root/cpu/simple_cpu
diff options
context:
space:
mode:
Diffstat (limited to 'cpu/simple_cpu')
-rw-r--r--cpu/simple_cpu/simple_cpu.cc17
-rw-r--r--cpu/simple_cpu/simple_cpu.hh2
2 files changed, 3 insertions, 16 deletions
diff --git a/cpu/simple_cpu/simple_cpu.cc b/cpu/simple_cpu/simple_cpu.cc
index 83e9e1fa2..27576d558 100644
--- a/cpu/simple_cpu/simple_cpu.cc
+++ b/cpu/simple_cpu/simple_cpu.cc
@@ -246,22 +246,9 @@ SimpleCPU::serialize(ostream &os)
}
void
-SimpleCPU::unserialize(IniFile &db, const string &category)
+SimpleCPU::unserialize(const IniFile *db, const string &category)
{
- string data;
-
- for (int i = 0; i < NumIntRegs; i++) {
- stringstream buf;
- ccprintf(buf, "R%02d", i);
- db.findDefault(category, buf.str(), data);
- to_number(data,xc->regs.intRegFile[i]);
- }
- for (int i = 0; i < NumFloatRegs; i++) {
- stringstream buf;
- ccprintf(buf, "F%02d", i);
- db.findDefault(category, buf.str(), data);
- to_number(data.c_str(), xc->regs.floatRegFile.q[i]);
- }
+ xc->unserialize(db, category);
// Read in Special registers
diff --git a/cpu/simple_cpu/simple_cpu.hh b/cpu/simple_cpu/simple_cpu.hh
index fa7386106..aee8159ce 100644
--- a/cpu/simple_cpu/simple_cpu.hh
+++ b/cpu/simple_cpu/simple_cpu.hh
@@ -260,7 +260,7 @@ class SimpleCPU : public BaseCPU
void processCacheCompletion();
virtual void serialize(std::ostream &os);
- virtual void unserialize(IniFile &db, const std::string &section);
+ virtual void unserialize(const IniFile *db, const std::string &section);
template <class T>
Fault read(Addr addr, T& data, unsigned flags);