diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2011-09-19 02:46:48 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2011-09-19 02:46:48 -0700 |
commit | 10c2e37f604280fb89d800839cc965204d096c59 (patch) | |
tree | 4f71f4ebc8d3c9c20d2f8058410974bf8e2e0608 /src/cpu/simple | |
parent | 83aa47adca17be33d53da6734ea422e1e0e2a07c (diff) | |
download | gem5-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/simple')
-rw-r--r-- | src/cpu/simple/base.hh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/cpu/simple/base.hh b/src/cpu/simple/base.hh index b27ebf998..ad281aa2b 100644 --- a/src/cpu/simple/base.hh +++ b/src/cpu/simple/base.hh @@ -402,9 +402,17 @@ class BaseSimpleCPU : public BaseCPU #if FULL_SYSTEM Fault hwrei() { return thread->hwrei(); } bool simPalCheck(int palFunc) { return thread->simPalCheck(palFunc); } +#endif + + void + syscall(int64_t callnum) + { +#if FULL_SYSTEM + panic("Syscall emulation isn't available in FS mode.\n"); #else - void syscall(int64_t callnum) { thread->syscall(callnum); } + thread->syscall(callnum); #endif + } bool misspeculating() { return thread->misspeculating(); } ThreadContext *tcBase() { return tc; } |