diff options
Diffstat (limited to 'src/sim')
-rw-r--r-- | src/sim/process.cc | 3 | ||||
-rw-r--r-- | src/sim/syscall_emul.cc | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/sim/process.cc b/src/sim/process.cc index 9cdc5b9f5..f989300a3 100644 --- a/src/sim/process.cc +++ b/src/sim/process.cc @@ -358,7 +358,10 @@ LiveProcess::argsInit(int intSize, int pageSize) Addr prog_entry = objFile->entryPoint(); threadContexts[0]->setPC(prog_entry); threadContexts[0]->setNextPC(prog_entry + sizeof(MachInst)); + +#if THE_ISA != ALPHA_ISA //e.g. MIPS or Sparc threadContexts[0]->setNextNPC(prog_entry + (2 * sizeof(MachInst))); +#endif num_processes++; } diff --git a/src/sim/syscall_emul.cc b/src/sim/syscall_emul.cc index 848b6f869..e72890612 100644 --- a/src/sim/syscall_emul.cc +++ b/src/sim/syscall_emul.cc @@ -27,7 +27,6 @@ * * Authors: Steve Reinhardt * Ali Saidi - * Korey Sewell */ #include <fcntl.h> @@ -92,7 +91,9 @@ SyscallReturn exitFunc(SyscallDesc *desc, int callnum, Process *process, ThreadContext *tc) { - exitSimLoop("target called exit()", tc->getSyscallArg(0) & 0xff); + if (tc->exit()) { + exitSimLoop("target called exit()", tc->getSyscallArg(0) & 0xff); + } return 1; } |