From b90f810575679442d78c0e9cd0c98a057ba4871b Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Tue, 28 Oct 2003 12:55:12 -0800 Subject: Revamp serialization to make it easier. --HG-- extra : convert_revision : c57a538d7cf606dbdf5fa244f92da46bd830e335 --- cpu/exec_context.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'cpu/exec_context.cc') 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 @@ -97,6 +97,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) { -- cgit v1.2.3