diff options
author | Steve Reinhardt <stever@eecs.umich.edu> | 2003-10-28 12:55:12 -0800 |
---|---|---|
committer | Steve Reinhardt <stever@eecs.umich.edu> | 2003-10-28 12:55:12 -0800 |
commit | b90f810575679442d78c0e9cd0c98a057ba4871b (patch) | |
tree | 8882e14d0f8cbee6f7c630ecb2408b62974a32d2 /cpu/exec_context.cc | |
parent | cec7f73abf841a65bdce38d6eb67a643e4879335 (diff) | |
download | gem5-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.cc | 16 |
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 §ion) +{ + UNSERIALIZE_ARRAY(regs.intRegFile, NumIntRegs); + UNSERIALIZE_ARRAY(regs.floatRegFile.q, NumFloatRegs); +} + + +void ExecContext::setStatus(Status new_status) { #ifdef FULL_SYSTEM |