summaryrefslogtreecommitdiff
path: root/src/cpu/simple
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2013-01-12 22:09:48 -0600
committerNilay Vaish <nilay@cs.wisc.edu>2013-01-12 22:09:48 -0600
commit25ec278a0be5e3e09d396ef5be993e45b766790b (patch)
tree1e053058f01fd0414c87b989f12c497fe6024f0a /src/cpu/simple
parentfe3fbe624e9524ba5fdc55586e40eaa700c81c78 (diff)
downloadgem5-25ec278a0be5e3e09d396ef5be993e45b766790b.tar.xz
x86: Changes to decoder, corrects 9376
The changes made by the changeset 9376 were not quite correct. The patch made changes to the code which resulted in decoder not getting initialized correctly when the state was restored from a checkpoint. This patch adds a startup function to each ISA object. For x86, this function sets the required state in the decoder. For other ISAs, the function is empty right now.
Diffstat (limited to 'src/cpu/simple')
-rw-r--r--src/cpu/simple/base.cc7
-rw-r--r--src/cpu/simple/base.hh2
2 files changed, 9 insertions, 0 deletions
diff --git a/src/cpu/simple/base.cc b/src/cpu/simple/base.cc
index 13e08a6cb..4db1c6c10 100644
--- a/src/cpu/simple/base.cc
+++ b/src/cpu/simple/base.cc
@@ -515,6 +515,13 @@ BaseSimpleCPU::advancePC(Fault fault)
}
}
+void
+BaseSimpleCPU::startup()
+{
+ BaseCPU::startup();
+ thread->startup();
+}
+
/*Fault
BaseSimpleCPU::CacheOp(uint8_t Op, Addr EffAddr)
{
diff --git a/src/cpu/simple/base.hh b/src/cpu/simple/base.hh
index 18b97c42f..7e84dcc16 100644
--- a/src/cpu/simple/base.hh
+++ b/src/cpu/simple/base.hh
@@ -172,6 +172,8 @@ class BaseSimpleCPU : public BaseCPU
virtual void regStats();
virtual void resetStats();
+ virtual void startup();
+
// number of simulated instructions
Counter numInst;
Counter startNumInst;