From: Gabe Black Date: Wed, 8 Nov 2006 04:33:59 +0000 (-0500) Subject: Fixed to account for branch delay slots. X-Git-Tag: m5_2.0_beta2~53^2~20 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=90408b7d029b94eae03121d913777f616ac1ce77;p=gem5.git Fixed to account for branch delay slots. --HG-- extra : convert_revision : 36a91ad4ed56c61b6754548034a13c02cf580fc6 --- diff --git a/src/kern/system_events.cc b/src/kern/system_events.cc index a6337a2fd..6fd9e1563 100644 --- a/src/kern/system_events.cc +++ b/src/kern/system_events.cc @@ -29,6 +29,8 @@ * Nathan Binkert */ +//For ISA_HAS_DELAY_SLOT +#include "arch/isa_traits.hh" #include "base/trace.hh" #include "cpu/thread_context.hh" #include "kern/system_events.hh" @@ -45,4 +47,7 @@ SkipFuncEvent::process(ThreadContext *tc) tc->setPC(newpc); tc->setNextPC(tc->readPC() + sizeof(TheISA::MachInst)); +#if ISA_HAS_DELAY_SLOT + tc->setNextPC(tc->readNextPC() + sizeof(TheISA::MachInst)); +#endif }