summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-11-07 23:33:59 -0500
committerGabe Black <gblack@eecs.umich.edu>2006-11-07 23:33:59 -0500
commit90408b7d029b94eae03121d913777f616ac1ce77 (patch)
tree2c3ac6e4e7a4c34a8fdb1ac60b7ccaeaf65723a4
parentc693c6ba9f9d641344db8a2a505484f5f8aa2645 (diff)
downloadgem5-90408b7d029b94eae03121d913777f616ac1ce77.tar.xz
Fixed to account for branch delay slots.
--HG-- extra : convert_revision : 36a91ad4ed56c61b6754548034a13c02cf580fc6
-rw-r--r--src/kern/system_events.cc5
1 files changed, 5 insertions, 0 deletions
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
}