summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cpu/simple/base.cc6
-rw-r--r--src/cpu/thread_state.cc4
2 files changed, 8 insertions, 2 deletions
diff --git a/src/cpu/simple/base.cc b/src/cpu/simple/base.cc
index cbb3980cb..253d33243 100644
--- a/src/cpu/simple/base.cc
+++ b/src/cpu/simple/base.cc
@@ -401,13 +401,15 @@ BaseSimpleCPU::preExecute()
StaticInstPtr instPtr = StaticInst::decode(makeExtMI(inst, thread->getTC()));
if (instPtr->isMacroOp()) {
curMacroStaticInst = instPtr;
- curStaticInst = curMacroStaticInst->fetchMicroOp(0);
+ curStaticInst = curMacroStaticInst->
+ fetchMicroOp(thread->readMicroPC());
} else {
curStaticInst = instPtr;
}
} else {
//Read the next micro op from the macro op
- curStaticInst = curMacroStaticInst->fetchMicroOp(thread->readMicroPC());
+ curStaticInst = curMacroStaticInst->
+ fetchMicroOp(thread->readMicroPC());
}
diff --git a/src/cpu/thread_state.cc b/src/cpu/thread_state.cc
index c644ae8d7..e6ebcc525 100644
--- a/src/cpu/thread_state.cc
+++ b/src/cpu/thread_state.cc
@@ -62,6 +62,8 @@ ThreadState::serialize(std::ostream &os)
// thread_num and cpu_id are deterministic from the config
SERIALIZE_SCALAR(funcExeInst);
SERIALIZE_SCALAR(inst);
+ SERIALIZE_SCALAR(microPC);
+ SERIALIZE_SCALAR(nextMicroPC);
#if FULL_SYSTEM
Tick quiesceEndTick = 0;
@@ -81,6 +83,8 @@ ThreadState::unserialize(Checkpoint *cp, const std::string &section)
// thread_num and cpu_id are deterministic from the config
UNSERIALIZE_SCALAR(funcExeInst);
UNSERIALIZE_SCALAR(inst);
+ UNSERIALIZE_SCALAR(microPC);
+ UNSERIALIZE_SCALAR(nextMicroPC);
#if FULL_SYSTEM
Tick quiesceEndTick;