summaryrefslogtreecommitdiff
path: root/cpu/exec_context.cc
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2003-10-28 12:55:12 -0800
committerSteve Reinhardt <stever@eecs.umich.edu>2003-10-28 12:55:12 -0800
commitb90f810575679442d78c0e9cd0c98a057ba4871b (patch)
tree8882e14d0f8cbee6f7c630ecb2408b62974a32d2 /cpu/exec_context.cc
parentcec7f73abf841a65bdce38d6eb67a643e4879335 (diff)
downloadgem5-b90f810575679442d78c0e9cd0c98a057ba4871b.tar.xz
Revamp serialization to make it easier.
--HG-- extra : convert_revision : c57a538d7cf606dbdf5fa244f92da46bd830e335
Diffstat (limited to 'cpu/exec_context.cc')
-rw-r--r--cpu/exec_context.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/cpu/exec_context.cc b/cpu/exec_context.cc
index a4670f291..8cfd0a0ea 100644
--- a/cpu/exec_context.cc
+++ b/cpu/exec_context.cc
@@ -98,6 +98,22 @@ ExecContext::takeOverFrom(ExecContext *oldContext)
void
+ExecContext::serialize(ostream &os)
+{
+ SERIALIZE_ARRAY(regs.intRegFile, NumIntRegs);
+ SERIALIZE_ARRAY(regs.floatRegFile.q, NumFloatRegs);
+}
+
+
+void
+ExecContext::unserialize(IniFile &db, const std::string &section)
+{
+ UNSERIALIZE_ARRAY(regs.intRegFile, NumIntRegs);
+ UNSERIALIZE_ARRAY(regs.floatRegFile.q, NumFloatRegs);
+}
+
+
+void
ExecContext::setStatus(Status new_status)
{
#ifdef FULL_SYSTEM