diff -r d0aacc54cee9 -r bb0b8cf71314 src/arch/alpha/decoder.hh --- a/src/arch/alpha/decoder.hh Mon Jan 21 09:20:18 2013 -0500 +++ b/src/arch/alpha/decoder.hh Mon Jan 21 09:11:51 2013 -0600 @@ -83,6 +83,8 @@ return instDone; } + void takeOverFrom(Decoder * old) {} + protected: /// A cache of decoded instruction objects. static GenericISA::BasicDecodeCache defaultCache; diff -r d0aacc54cee9 -r bb0b8cf71314 src/arch/arm/decoder.hh --- a/src/arch/arm/decoder.hh Mon Jan 21 09:20:18 2013 -0500 +++ b/src/arch/arm/decoder.hh Mon Jan 21 09:11:51 2013 -0600 @@ -116,6 +116,8 @@ fpscrStride = fpscr.stride; } + void takeOverFrom(Decoder *old) {} + protected: /// A cache of decoded instruction objects. static GenericISA::BasicDecodeCache defaultCache; diff -r d0aacc54cee9 -r bb0b8cf71314 src/arch/mips/decoder.hh --- a/src/arch/mips/decoder.hh Mon Jan 21 09:20:18 2013 -0500 +++ b/src/arch/mips/decoder.hh Mon Jan 21 09:11:51 2013 -0600 @@ -83,6 +83,8 @@ return instDone; } + void takeOverFrom(Decoder *old) {} + protected: /// A cache of decoded instruction objects. static GenericISA::BasicDecodeCache defaultCache; diff -r d0aacc54cee9 -r bb0b8cf71314 src/arch/power/decoder.hh --- a/src/arch/power/decoder.hh Mon Jan 21 09:20:18 2013 -0500 +++ b/src/arch/power/decoder.hh Mon Jan 21 09:11:51 2013 -0600 @@ -89,6 +89,9 @@ { return instDone; } + + void takeOverFrom(Decoder *old) {} + protected: /// A cache of decoded instruction objects. static GenericISA::BasicDecodeCache defaultCache; diff -r d0aacc54cee9 -r bb0b8cf71314 src/arch/sparc/decoder.hh --- a/src/arch/sparc/decoder.hh Mon Jan 21 09:20:18 2013 -0500 +++ b/src/arch/sparc/decoder.hh Mon Jan 21 09:11:51 2013 -0600 @@ -97,6 +97,8 @@ asi = _asi; } + void takeOverFrom(Decoder *old) {} + protected: /// A cache of decoded instruction objects. static GenericISA::BasicDecodeCache defaultCache; diff -r d0aacc54cee9 -r bb0b8cf71314 src/arch/x86/decoder.hh --- a/src/arch/x86/decoder.hh Mon Jan 21 09:20:18 2013 -0500 +++ b/src/arch/x86/decoder.hh Mon Jan 21 09:11:51 2013 -0600 @@ -250,6 +250,19 @@ } } + void takeOverFrom(Decoder *old) + { + mode = old->mode; + submode = old->submode; + emi.mode.mode = mode; + emi.mode.submode = submode; + altOp = old->altOp; + defOp = old->defOp; + altAddr = old->altAddr; + defAddr = old->defAddr; + stack = old->stack; + } + void reset() { state = ResetState; diff -r d0aacc54cee9 -r bb0b8cf71314 src/cpu/o3/thread_context_impl.hh --- a/src/cpu/o3/thread_context_impl.hh Mon Jan 21 09:20:18 2013 -0500 +++ b/src/cpu/o3/thread_context_impl.hh Mon Jan 21 09:11:51 2013 -0600 @@ -67,6 +67,9 @@ O3ThreadContext::takeOverFrom(ThreadContext *old_context) { ::takeOverFrom(*this, *old_context); + TheISA::Decoder *newDecoder = getDecoderPtr(); + TheISA::Decoder *oldDecoder = old_context->getDecoderPtr(); + newDecoder->takeOverFrom(oldDecoder); thread->kernelStats = old_context->getKernelStats(); thread->funcExeInst = old_context->readFuncExeInst(); diff -r d0aacc54cee9 -r bb0b8cf71314 src/cpu/simple_thread.cc --- a/src/cpu/simple_thread.cc Mon Jan 21 09:20:18 2013 -0500 +++ b/src/cpu/simple_thread.cc Mon Jan 21 09:11:51 2013 -0600 @@ -108,6 +108,7 @@ SimpleThread::takeOverFrom(ThreadContext *oldContext) { ::takeOverFrom(*tc, *oldContext); + decoder.takeOverFrom(oldContext->getDecoderPtr()); kernelStats = oldContext->getKernelStats(); funcExeInst = oldContext->readFuncExeInst();