From 17b47d35e1d0dedca7a3336f1193b1a502bcd78b Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Mon, 7 Jan 2013 13:05:42 -0500 Subject: arch: Move the ISA object to a separate section After making the ISA an independent SimObject, it is serialized automatically by the Python world. Previously, this just resulted in an empty ISA section. This patch moves the contents of the ISA to that section and removes the explicit ISA serialization from the thread contexts, which makes it behave like a normal SimObject during serialization. Note: This patch breaks checkpoint backwards compatibility! Use the cpt_upgrader.py utility to upgrade old checkpoints to the new format. --- src/arch/sparc/isa.cc | 10 +++++----- src/arch/sparc/isa.hh | 5 ++--- 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'src/arch/sparc') diff --git a/src/arch/sparc/isa.cc b/src/arch/sparc/isa.cc index 0c7e83e8e..4daf8775b 100644 --- a/src/arch/sparc/isa.cc +++ b/src/arch/sparc/isa.cc @@ -638,7 +638,7 @@ ISA::setMiscReg(int miscReg, MiscReg val, ThreadContext * tc) } void -ISA::serialize(EventManager *em, std::ostream &os) +ISA::serialize(std::ostream &os) { SERIALIZE_SCALAR(asi); SERIALIZE_SCALAR(tick); @@ -714,7 +714,7 @@ ISA::serialize(EventManager *em, std::ostream &os) } void -ISA::unserialize(EventManager *em, Checkpoint *cp, const std::string §ion) +ISA::unserialize(Checkpoint *cp, const std::string §ion) { UNSERIALIZE_SCALAR(asi); UNSERIALIZE_SCALAR(tick); @@ -781,15 +781,15 @@ ISA::unserialize(EventManager *em, Checkpoint *cp, const std::string §ion) if (tick_cmp) { tickCompare = new TickCompareEvent(this, tc); - em->schedule(tickCompare, tick_cmp); + schedule(tickCompare, tick_cmp); } if (stick_cmp) { sTickCompare = new STickCompareEvent(this, tc); - em->schedule(sTickCompare, stick_cmp); + schedule(sTickCompare, stick_cmp); } if (hstick_cmp) { hSTickCompare = new HSTickCompareEvent(this, tc); - em->schedule(hSTickCompare, hstick_cmp); + schedule(hSTickCompare, hstick_cmp); } } } diff --git a/src/arch/sparc/isa.hh b/src/arch/sparc/isa.hh index 654cb3507..3dd9f6109 100644 --- a/src/arch/sparc/isa.hh +++ b/src/arch/sparc/isa.hh @@ -167,10 +167,9 @@ class ISA : public SimObject void clear(); - void serialize(EventManager *em, std::ostream & os); + void serialize(std::ostream & os); - void unserialize(EventManager *em, Checkpoint *cp, - const std::string & section); + void unserialize(Checkpoint *cp, const std::string & section); protected: -- cgit v1.2.3