diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2006-02-19 00:47:45 -0500 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2006-02-19 00:47:45 -0500 |
commit | 14f2cdb1a14e9e6896939c210cdacef289d9c263 (patch) | |
tree | cdf7705980fb776a518d40e4fa3869fc0bead2cf /sim/process.cc | |
parent | a611b8100379e28728c1084801413954c973e734 (diff) | |
parent | 00d58aeb4dc0569bc3d1273d90867148e6500ad9 (diff) | |
download | gem5-14f2cdb1a14e9e6896939c210cdacef289d9c263.tar.xz |
Merge zizzer:/bk/m5
into pb15.local:/Users/ali/work/m5.head
--HG--
extra : convert_revision : 774e4afbb0f9c3ae62843138b6d7195ea184ff92
Diffstat (limited to 'sim/process.cc')
-rw-r--r-- | sim/process.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sim/process.cc b/sim/process.cc index 59d122b48..3ae3abb52 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" @@ -350,6 +351,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, @@ -394,6 +408,7 @@ LiveProcess::create(const string &nm, } + BEGIN_DECLARE_SIM_OBJECT_PARAMS(LiveProcess) VectorParam<string> cmd; |