diff options
Diffstat (limited to 'cpu')
-rw-r--r-- | cpu/exec_context.cc | 4 | ||||
-rw-r--r-- | cpu/exec_context.hh | 2 | ||||
-rw-r--r-- | cpu/simple_cpu/simple_cpu.cc | 9 | ||||
-rw-r--r-- | cpu/simple_cpu/simple_cpu.hh | 4 |
4 files changed, 10 insertions, 9 deletions
diff --git a/cpu/exec_context.cc b/cpu/exec_context.cc index b869a8c4d..195c9daad 100644 --- a/cpu/exec_context.cc +++ b/cpu/exec_context.cc @@ -108,10 +108,10 @@ ExecContext::serialize(ostream &os) void -ExecContext::unserialize(const IniFile *db, const std::string §ion) +ExecContext::unserialize(Checkpoint *cp, const std::string §ion) { UNSERIALIZE_ENUM(_status); - regs.unserialize(db, section); + regs.unserialize(cp, section); // thread_num and cpu_id are deterministic from the config UNSERIALIZE_SCALAR(func_exe_insn); } diff --git a/cpu/exec_context.hh b/cpu/exec_context.hh index 6938b369f..cb826a15e 100644 --- a/cpu/exec_context.hh +++ b/cpu/exec_context.hh @@ -142,7 +142,7 @@ class ExecContext void regStats(const std::string &name); void serialize(std::ostream &os); - void unserialize(const IniFile *db, const std::string §ion); + void unserialize(Checkpoint *cp, const std::string §ion); #ifdef FULL_SYSTEM bool validInstAddr(Addr addr) { return true; } diff --git a/cpu/simple_cpu/simple_cpu.cc b/cpu/simple_cpu/simple_cpu.cc index 3179b7b1f..519a8cd4d 100644 --- a/cpu/simple_cpu/simple_cpu.cc +++ b/cpu/simple_cpu/simple_cpu.cc @@ -262,6 +262,7 @@ SimpleCPU::serialize(ostream &os) { SERIALIZE_ENUM(_status); SERIALIZE_SCALAR(inst); + nameOut(os, csprintf("%s.xc", name())); xc->serialize(os); nameOut(os, csprintf("%s.tickEvent", name())); tickEvent.serialize(os); @@ -270,14 +271,14 @@ SimpleCPU::serialize(ostream &os) } void -SimpleCPU::unserialize(const IniFile *db, const string §ion) +SimpleCPU::unserialize(Checkpoint *cp, const string §ion) { UNSERIALIZE_ENUM(_status); UNSERIALIZE_SCALAR(inst); - xc->unserialize(db, section); - tickEvent.unserialize(db, csprintf("%s.tickEvent", name())); + xc->unserialize(cp, csprintf("%s.xc", section)); + tickEvent.unserialize(cp, csprintf("%s.tickEvent", section)); cacheCompletionEvent - .unserialize(db, csprintf("%s.cacheCompletionEvent", name())); + .unserialize(cp, csprintf("%s.cacheCompletionEvent", section)); } void diff --git a/cpu/simple_cpu/simple_cpu.hh b/cpu/simple_cpu/simple_cpu.hh index 61831cb3c..61c9143ba 100644 --- a/cpu/simple_cpu/simple_cpu.hh +++ b/cpu/simple_cpu/simple_cpu.hh @@ -49,7 +49,7 @@ class GDBListener; #endif // FULL_SYSTEM class MemInterface; -class IniFile; +class Checkpoint; namespace Trace { class InstRecord; @@ -259,7 +259,7 @@ class SimpleCPU : public BaseCPU void processCacheCompletion(); virtual void serialize(std::ostream &os); - virtual void unserialize(const IniFile *db, const std::string §ion); + virtual void unserialize(Checkpoint *cp, const std::string §ion); template <class T> Fault read(Addr addr, T& data, unsigned flags); |