summaryrefslogtreecommitdiff
path: root/cpu/base_cpu.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cpu/base_cpu.cc')
-rw-r--r--cpu/base_cpu.cc19
1 files changed, 17 insertions, 2 deletions
diff --git a/cpu/base_cpu.cc b/cpu/base_cpu.cc
index fe88891d6..3ee7a3892 100644
--- a/cpu/base_cpu.cc
+++ b/cpu/base_cpu.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003 The Regents of The University of Michigan
+ * Copyright (c) 2002-2004 The Regents of The University of Michigan
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -130,7 +130,7 @@ BaseCPU::BaseCPU(const string &_name, int _number_of_threads,
void
BaseCPU::regStats()
{
- using namespace Statistics;
+ using namespace Stats;
numCycles
.name(name() + ".numCycles")
@@ -242,6 +242,21 @@ BaseCPU::clear_interrupts()
intstatus = 0;
}
+
+void
+BaseCPU::serialize(std::ostream &os)
+{
+ SERIALIZE_ARRAY(interrupts, NumInterruptLevels);
+ SERIALIZE_SCALAR(intstatus);
+}
+
+void
+BaseCPU::unserialize(Checkpoint *cp, const std::string &section)
+{
+ UNSERIALIZE_ARRAY(interrupts, NumInterruptLevels);
+ UNSERIALIZE_SCALAR(intstatus);
+}
+
#endif // FULL_SYSTEM
DEFINE_SIM_OBJECT_CLASS_NAME("BaseCPU", BaseCPU)