From 25ec278a0be5e3e09d396ef5be993e45b766790b Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Sat, 12 Jan 2013 22:09:48 -0600 Subject: 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. --- src/arch/x86/isa.cc | 6 ++++++ src/arch/x86/isa.hh | 1 + 2 files changed, 7 insertions(+) (limited to 'src/arch/x86') diff --git a/src/arch/x86/isa.cc b/src/arch/x86/isa.cc index 381dc5999..f65bc2392 100644 --- a/src/arch/x86/isa.cc +++ b/src/arch/x86/isa.cc @@ -387,6 +387,12 @@ ISA::unserialize(Checkpoint * cp, const std::string & section) NULL); } +void +ISA::startup(ThreadContext *tc) +{ + tc->getDecoderPtr()->setM5Reg(regVal[MISCREG_M5_REG]); +} + } X86ISA::ISA * diff --git a/src/arch/x86/isa.hh b/src/arch/x86/isa.hh index 7c5330ca3..e87d747bc 100644 --- a/src/arch/x86/isa.hh +++ b/src/arch/x86/isa.hh @@ -87,6 +87,7 @@ namespace X86ISA void serialize(std::ostream &os); void unserialize(Checkpoint *cp, const std::string §ion); + void startup(ThreadContext *tc); }; } -- cgit v1.2.3