summaryrefslogtreecommitdiff
path: root/src/cpu/o3/dyn_inst_impl.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2011-09-19 02:46:48 -0700
committerGabe Black <gblack@eecs.umich.edu>2011-09-19 02:46:48 -0700
commit10c2e37f604280fb89d800839cc965204d096c59 (patch)
tree4f71f4ebc8d3c9c20d2f8058410974bf8e2e0608 /src/cpu/o3/dyn_inst_impl.hh
parent83aa47adca17be33d53da6734ea422e1e0e2a07c (diff)
downloadgem5-10c2e37f604280fb89d800839cc965204d096c59.tar.xz
Syscall: Make the syscall function available in both SE and FS modes.
In FS mode the syscall function will panic, but the interface will be consistent and code which calls syscall can be compiled in. This will allow, for instance, instructions that use syscall to be built unconditionally but then not returned by the decoder.
Diffstat (limited to 'src/cpu/o3/dyn_inst_impl.hh')
-rw-r--r--src/cpu/o3/dyn_inst_impl.hh8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cpu/o3/dyn_inst_impl.hh b/src/cpu/o3/dyn_inst_impl.hh
index eceb0b49f..500d63de8 100644
--- a/src/cpu/o3/dyn_inst_impl.hh
+++ b/src/cpu/o3/dyn_inst_impl.hh
@@ -188,11 +188,15 @@ BaseO3DynInst<Impl>::simPalCheck(int palFunc)
#endif
return this->cpu->simPalCheck(palFunc, this->threadNumber);
}
-#else
+#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
// 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.
@@ -202,6 +206,6 @@ BaseO3DynInst<Impl>::syscall(int64_t callnum)
if (!(curPC == newPC)) {
this->pcState(newPC);
}
-}
#endif
+}