diff -r d8578ad4f448 -r 87790d4eab5e src/arch/x86/predecoder.hh --- a/src/arch/x86/predecoder.hh Fri Feb 11 07:58:04 2011 -0800 +++ b/src/arch/x86/predecoder.hh Fri Feb 11 08:03:56 2011 -0800 @@ -225,7 +225,11 @@ { assert(emiIsReady); emiIsReady = false; - nextPC.npc(nextPC.pc() + getInstSize()); + if (!nextPC.size()) { + Addr size = getInstSize(); + nextPC.size(size); + nextPC.npc(nextPC.pc() + size); + } return emi; } }; diff -r d8578ad4f448 -r 87790d4eab5e src/arch/x86/types.hh --- a/src/arch/x86/types.hh Fri Feb 11 07:58:04 2011 -0800 +++ b/src/arch/x86/types.hh Fri Feb 11 08:03:56 2011 -0800 @@ -222,7 +222,55 @@ return true; } - typedef GenericISA::UPCState PCState; + class PCState : public GenericISA::UPCState + { + protected: + typedef GenericISA::UPCState Base; + + uint8_t _size; + + public: + void + set(Addr val) + { + Base::set(val); + _size = 0; + } + + PCState() {} + PCState(Addr val) { set(val); } + + uint8_t size() const { return _size; } + void size(uint8_t newSize) { _size = newSize; } + + void + advance() + { + Base::advance(); + _size = 0; + } + + void + uEnd() + { + Base::uEnd(); + _size = 0; + } + + void + serialize(std::ostream &os) + { + Base::serialize(os); + SERIALIZE_SCALAR(_size); + } + + void + unserialize(Checkpoint *cp, const std::string §ion) + { + Base::unserialize(cp, section); + UNSERIALIZE_SCALAR(_size); + } + }; struct CoreSpecific { int core_type;