diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2008-02-14 16:14:35 -0500 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2008-02-14 16:14:35 -0500 |
commit | 9faec83ac59a4c0912a7ce8e5612aaabf715a5be (patch) | |
tree | c2a4fa84db0f14d1843f5f4add0d2f9d73f71bdc /src/cpu/simple/base.hh | |
parent | fc38e9c630e62c97aa633c32933d43d027211989 (diff) | |
download | gem5-9faec83ac59a4c0912a7ce8e5612aaabf715a5be.tar.xz |
CPU: move the PC Events code to a place where the code won't be executed multiple times if an instruction faults.
--HG--
extra : convert_revision : 19c8e46a4eea206517be7ed4131ab9df0fe00e68
Diffstat (limited to 'src/cpu/simple/base.hh')
-rw-r--r-- | src/cpu/simple/base.hh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cpu/simple/base.hh b/src/cpu/simple/base.hh index 82f73e5dd..8c162a846 100644 --- a/src/cpu/simple/base.hh +++ b/src/cpu/simple/base.hh @@ -44,6 +44,7 @@ #include "mem/port.hh" #include "mem/request.hh" #include "sim/eventq.hh" +#include "sim/system.hh" // forward declarations #if FULL_SYSTEM @@ -86,6 +87,14 @@ class BaseSimpleCPU : public BaseCPU protected: Trace::InstRecord *traceData; + inline void checkPcEventQueue() { + Addr oldpc; + do { + oldpc = thread->readPC(); + system->pcEventQueue.service(tc); + } while (oldpc != thread->readPC()); + } + public: void post_interrupt(int int_num, int index); |