summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorAndreas Sandberg <Andreas.Sandberg@ARM.com>2013-01-07 13:05:42 -0500
committerAndreas Sandberg <Andreas.Sandberg@ARM.com>2013-01-07 13:05:42 -0500
commit17b47d35e1d0dedca7a3336f1193b1a502bcd78b (patch)
tree3b37175b174a2cdad1020ff6dd917f32c1c10907 /src/arch
parent7eb0fb8b6ebffcb39b61964d4c7387455c262aae (diff)
downloadgem5-17b47d35e1d0dedca7a3336f1193b1a502bcd78b.tar.xz
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.
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/alpha/isa.cc4
-rw-r--r--src/arch/alpha/isa.hh5
-rw-r--r--src/arch/arm/isa.hh5
-rw-r--r--src/arch/mips/isa.hh6
-rw-r--r--src/arch/power/isa.hh10
-rw-r--r--src/arch/sparc/isa.cc10
-rw-r--r--src/arch/sparc/isa.hh5
-rw-r--r--src/arch/x86/isa.cc5
-rw-r--r--src/arch/x86/isa.hh5
9 files changed, 17 insertions, 38 deletions
diff --git a/src/arch/alpha/isa.cc b/src/arch/alpha/isa.cc
index f5660e4f2..9cfd840d9 100644
--- a/src/arch/alpha/isa.cc
+++ b/src/arch/alpha/isa.cc
@@ -53,7 +53,7 @@ ISA::params() const
}
void
-ISA::serialize(EventManager *em, std::ostream &os)
+ISA::serialize(std::ostream &os)
{
SERIALIZE_SCALAR(fpcr);
SERIALIZE_SCALAR(uniq);
@@ -63,7 +63,7 @@ ISA::serialize(EventManager *em, std::ostream &os)
}
void
-ISA::unserialize(EventManager *em, Checkpoint *cp, const std::string &section)
+ISA::unserialize(Checkpoint *cp, const std::string &section)
{
UNSERIALIZE_SCALAR(fpcr);
UNSERIALIZE_SCALAR(uniq);
diff --git a/src/arch/alpha/isa.hh b/src/arch/alpha/isa.hh
index 4e22c7eea..739b77286 100644
--- a/src/arch/alpha/isa.hh
+++ b/src/arch/alpha/isa.hh
@@ -88,9 +88,8 @@ namespace AlphaISA
memset(ipr, 0, sizeof(ipr));
}
- void serialize(EventManager *em, std::ostream &os);
- void unserialize(EventManager *em, Checkpoint *cp,
- const std::string &section);
+ void serialize(std::ostream &os);
+ void unserialize(Checkpoint *cp, const std::string &section);
int
flattenIntIndex(int reg)
diff --git a/src/arch/arm/isa.hh b/src/arch/arm/isa.hh
index 9701ce10e..f5fe5f834 100644
--- a/src/arch/arm/isa.hh
+++ b/src/arch/arm/isa.hh
@@ -180,13 +180,12 @@ namespace ArmISA
return reg;
}
- void serialize(EventManager *em, std::ostream &os)
+ void serialize(std::ostream &os)
{
DPRINTF(Checkpoint, "Serializing Arm Misc Registers\n");
SERIALIZE_ARRAY(miscRegs, NumMiscRegs);
}
- void unserialize(EventManager *em, Checkpoint *cp,
- const std::string &section)
+ void unserialize(Checkpoint *cp, const std::string &section)
{
DPRINTF(Checkpoint, "Unserializing Arm Misc Registers\n");
UNSERIALIZE_ARRAY(miscRegs, NumMiscRegs);
diff --git a/src/arch/mips/isa.hh b/src/arch/mips/isa.hh
index 3f4477132..2169c0de0 100644
--- a/src/arch/mips/isa.hh
+++ b/src/arch/mips/isa.hh
@@ -172,12 +172,6 @@ namespace MipsISA
{
return reg;
}
-
- void serialize(EventManager *em, std::ostream &os)
- {}
- void unserialize(EventManager *em, Checkpoint *cp,
- const std::string &section)
- {}
};
}
diff --git a/src/arch/power/isa.hh b/src/arch/power/isa.hh
index 446f918f1..a989d33a7 100644
--- a/src/arch/power/isa.hh
+++ b/src/arch/power/isa.hh
@@ -98,16 +98,6 @@ class ISA : public SimObject
return reg;
}
- void
- serialize(EventManager *em, std::ostream &os)
- {
- }
-
- void
- unserialize(EventManager *em, Checkpoint *cp, const std::string &section)
- {
- }
-
const Params *params() const;
ISA(Params *p);
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 &section)
+ISA::unserialize(Checkpoint *cp, const std::string &section)
{
UNSERIALIZE_SCALAR(asi);
UNSERIALIZE_SCALAR(tick);
@@ -781,15 +781,15 @@ ISA::unserialize(EventManager *em, Checkpoint *cp, const std::string &section)
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:
diff --git a/src/arch/x86/isa.cc b/src/arch/x86/isa.cc
index 852ce6bc8..381dc5999 100644
--- a/src/arch/x86/isa.cc
+++ b/src/arch/x86/isa.cc
@@ -370,14 +370,13 @@ ISA::setMiscReg(int miscReg, MiscReg val, ThreadContext * tc)
}
void
-ISA::serialize(EventManager *em, std::ostream & os)
+ISA::serialize(std::ostream & os)
{
SERIALIZE_ARRAY(regVal, NumMiscRegs);
}
void
-ISA::unserialize(EventManager *em, Checkpoint * cp,
- const std::string & section)
+ISA::unserialize(Checkpoint * cp, const std::string & section)
{
UNSERIALIZE_ARRAY(regVal, NumMiscRegs);
updateHandyM5Reg(regVal[MISCREG_EFER],
diff --git a/src/arch/x86/isa.hh b/src/arch/x86/isa.hh
index 39ed68ea5..7c5330ca3 100644
--- a/src/arch/x86/isa.hh
+++ b/src/arch/x86/isa.hh
@@ -85,9 +85,8 @@ namespace X86ISA
return reg;
}
- void serialize(EventManager *em, std::ostream &os);
- void unserialize(EventManager *em, Checkpoint *cp,
- const std::string &section);
+ void serialize(std::ostream &os);
+ void unserialize(Checkpoint *cp, const std::string &section);
};
}