summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
authorSteve Reinhardt <steve.reinhardt@amd.com>2009-04-21 08:17:36 -0700
committerSteve Reinhardt <steve.reinhardt@amd.com>2009-04-21 08:17:36 -0700
commit52b6764f31cab46204d5fdf6d0191428a8408bb1 (patch)
tree8c0ae8d04cb0e3a2b6b2fc3a7c6a0be5a44d3927 /src/sim
parentb0e9654f8621729400ba627ed8c9bd0bf3833f7a (diff)
downloadgem5-52b6764f31cab46204d5fdf6d0191428a8408bb1.tar.xz
syscall: Resolve conflicts between m5threads and Gabe's recent SE changes.
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/syscall_emul.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/sim/syscall_emul.cc b/src/sim/syscall_emul.cc
index d3161de26..6928b9e4a 100644
--- a/src/sim/syscall_emul.cc
+++ b/src/sim/syscall_emul.cc
@@ -659,12 +659,12 @@ cloneFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
ThreadContext *tc)
{
DPRINTF(SyscallVerbose, "In sys_clone:\n");
- DPRINTF(SyscallVerbose, " Flags=%llx\n", tc->getSyscallArg(0));
- DPRINTF(SyscallVerbose, " Child stack=%llx\n", tc->getSyscallArg(1));
+ DPRINTF(SyscallVerbose, " Flags=%llx\n", process->getSyscallArg(tc, 0));
+ DPRINTF(SyscallVerbose, " Child stack=%llx\n", process->getSyscallArg(tc, 1));
- if (tc->getSyscallArg(0) != 0x10f00) {
- warn("This sys_clone implementation assumes flags CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD (0x10f00), and may not work correctly with given flags 0x%llx\n", tc->getSyscallArg(0));
+ if (process->getSyscallArg(tc, 0) != 0x10f00) {
+ warn("This sys_clone implementation assumes flags CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD (0x10f00), and may not work correctly with given flags 0x%llx\n", process->getSyscallArg(tc, 0));
}
ThreadContext* ctc; //child thread context
@@ -697,14 +697,14 @@ cloneFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
#endif
//Set up stack register
- ctc->setIntReg(TheISA::StackPointerReg, tc->getSyscallArg(1));
+ ctc->setIntReg(TheISA::StackPointerReg, process->getSyscallArg(tc, 1));
//Set up syscall return values in parent and child
ctc->setIntReg(ReturnValueReg, 0); //return value, child
//Alpha needs SyscallSuccessReg=0 in child
#if THE_ISA == ALPHA_ISA
- ctc->setIntReg(SyscallSuccessReg, 0);
+ ctc->setIntReg(TheISA::SyscallSuccessReg, 0);
#endif
//In SPARC/Linux, clone returns 0 on pseudo-return register if parent, non-zero if child