summaryrefslogtreecommitdiff
path: root/src/cpu/o3/dyn_inst_impl.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/o3/dyn_inst_impl.hh')
-rw-r--r--src/cpu/o3/dyn_inst_impl.hh10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/cpu/o3/dyn_inst_impl.hh b/src/cpu/o3/dyn_inst_impl.hh
index 500d63de8..76a456ee3 100644
--- a/src/cpu/o3/dyn_inst_impl.hh
+++ b/src/cpu/o3/dyn_inst_impl.hh
@@ -42,6 +42,7 @@
#include "base/cp_annotate.hh"
#include "cpu/o3/dyn_inst.hh"
+#include "sim/full_system.hh"
template <class Impl>
BaseO3DynInst<Impl>::BaseO3DynInst(StaticInstPtr staticInst,
@@ -143,7 +144,6 @@ BaseO3DynInst<Impl>::completeAcc(PacketPtr pkt)
return this->fault;
}
-#if FULL_SYSTEM
template <class Impl>
Fault
BaseO3DynInst<Impl>::hwrei()
@@ -188,15 +188,14 @@ BaseO3DynInst<Impl>::simPalCheck(int palFunc)
#endif
return this->cpu->simPalCheck(palFunc, this->threadNumber);
}
-#endif
template <class Impl>
void
BaseO3DynInst<Impl>::syscall(int64_t callnum)
{
-#if FULL_SYSTEM
- panic("Syscall emulation isn't available in FS mode.\n");
-#else
+ if (FullSystem)
+ panic("Syscall emulation isn't available in FS mode.\n");
+
// HACK: check CPU's nextPC before and after syscall. If it
// changes, update this instruction's nextPC because the syscall
// must have changed the nextPC.
@@ -206,6 +205,5 @@ BaseO3DynInst<Impl>::syscall(int64_t callnum)
if (!(curPC == newPC)) {
this->pcState(newPC);
}
-#endif
}