summaryrefslogtreecommitdiff
path: root/src/cpu/base.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/base.hh')
-rw-r--r--src/cpu/base.hh19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/cpu/base.hh b/src/cpu/base.hh
index f6c0da3d3..8250338cc 100644
--- a/src/cpu/base.hh
+++ b/src/cpu/base.hh
@@ -48,20 +48,17 @@
#include <vector>
+#include "arch/interrupts.hh"
#include "arch/isa_traits.hh"
#include "arch/microcode_rom.hh"
#include "base/statistics.hh"
-#include "config/full_system.hh"
#include "config/the_isa.hh"
#include "mem/mem_object.hh"
#include "sim/eventq.hh"
+#include "sim/full_system.hh"
#include "sim/insttracer.hh"
-#if FULL_SYSTEM
-#include "arch/interrupts.hh"
-#endif
-
-struct BaseCPUParams;
+class BaseCPUParams;
class BranchPred;
class CheckerCPU;
class ThreadContext;
@@ -173,7 +170,6 @@ class BaseCPU : public MemObject
TheISA::MicrocodeRom microcodeRom;
-#if FULL_SYSTEM
protected:
TheISA::Interrupts *interrupts;
@@ -190,7 +186,8 @@ class BaseCPU : public MemObject
postInterrupt(int int_num, int index)
{
interrupts->post(int_num, index);
- wakeup();
+ if (FullSystem)
+ wakeup();
}
void
@@ -208,7 +205,7 @@ class BaseCPU : public MemObject
bool
checkInterrupts(ThreadContext *tc) const
{
- return interrupts->checkInterrupts(tc);
+ return FullSystem && interrupts->checkInterrupts(tc);
}
class ProfileEvent : public Event
@@ -222,7 +219,6 @@ class BaseCPU : public MemObject
void process();
};
ProfileEvent *profileEvent;
-#endif
protected:
std::vector<ThreadContext *> threadContexts;
@@ -305,7 +301,6 @@ class BaseCPU : public MemObject
Tick phase;
-#if FULL_SYSTEM
/**
* Serialize this object to the given output stream.
* @param os The stream to serialize to.
@@ -319,8 +314,6 @@ class BaseCPU : public MemObject
*/
virtual void unserialize(Checkpoint *cp, const std::string &section);
-#endif
-
/**
* Return pointer to CPU's branch predictor (NULL if none).
* @return Branch predictor pointer.