summaryrefslogtreecommitdiff
path: root/sim/process.cc
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-02-19 03:20:05 -0500
committerGabe Black <gblack@eecs.umich.edu>2006-02-19 03:20:05 -0500
commitf721a4d9adb0cbed48ef8f18dc7455a3ed8f5a9b (patch)
tree335e7c747799099b12b38c94eceb1fd7a49c7148 /sim/process.cc
parented25d326174f8086a8224ecb9e798410db14cddb (diff)
parent14f2cdb1a14e9e6896939c210cdacef289d9c263 (diff)
downloadgem5-f721a4d9adb0cbed48ef8f18dc7455a3ed8f5a9b.tar.xz
Merge zizzer.eecs.umich.edu:/z/m5/Bitkeeper/m5
into zizzer.eecs.umich.edu:/z/m5/Bitkeeper/multiarch arch/alpha/faults.hh: ur Using cleaned up fault class deiffinitions --HG-- extra : convert_revision : a600950d539be2be73358f072aa5426456bf3d2d
Diffstat (limited to 'sim/process.cc')
-rw-r--r--sim/process.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/sim/process.cc b/sim/process.cc
index b2f3046fb..0a7e46082 100644
--- a/sim/process.cc
+++ b/sim/process.cc
@@ -46,6 +46,7 @@
#include "sim/fake_syscall.hh"
#include "sim/process.hh"
#include "sim/stats.hh"
+#include "sim/syscall_emul.hh"
#ifdef TARGET_ALPHA
#include "arch/alpha/alpha_tru64_process.hh"
@@ -351,6 +352,19 @@ LiveProcess::LiveProcess(const string &nm, ObjectFile *objFile,
init_regs->npc = prog_entry + sizeof(MachInst);
}
+void
+LiveProcess::syscall(ExecContext *xc)
+{
+ num_syscalls++;
+
+ int64_t callnum = xc->regs.intRegFile[ReturnValueReg];
+
+ SyscallDesc *desc = getDesc(callnum);
+ if (desc == NULL)
+ fatal("Syscall %d out of range", callnum);
+
+ desc->doSyscall(callnum, this, xc);
+}
LiveProcess *
LiveProcess::create(const string &nm,
@@ -395,6 +409,7 @@ LiveProcess::create(const string &nm,
}
+
BEGIN_DECLARE_SIM_OBJECT_PARAMS(LiveProcess)
VectorParam<string> cmd;