summaryrefslogtreecommitdiff
path: root/sim/syscall_emul.cc
diff options
context:
space:
mode:
authorRon Dreslinski <rdreslin@umich.edu>2006-03-10 16:59:02 -0500
committerRon Dreslinski <rdreslin@umich.edu>2006-03-10 16:59:02 -0500
commit5ba4c8e96ef694431ff1715fbea7cd0e70e6b072 (patch)
tree4847c6c99043470e678ccafcdb5a0039f3ede3c6 /sim/syscall_emul.cc
parentd07115f97266185fea006854f6e5eea8bf992c4b (diff)
downloadgem5-5ba4c8e96ef694431ff1715fbea7cd0e70e6b072.tar.xz
It now runs hello world binary.
Fixed the exec context proxy class to have a getMemPort function. arch/alpha/linux/process.cc: arch/alpha/tru64/process.cc: kern/tru64/tru64.hh: sim/syscall_emul.cc: sim/syscall_emul.hh: Fix to use new exec context proxy --HG-- extra : convert_revision : eaa05dfab3fdb77627f6cf404a2569a44232f604
Diffstat (limited to 'sim/syscall_emul.cc')
-rw-r--r--sim/syscall_emul.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/sim/syscall_emul.cc b/sim/syscall_emul.cc
index 1d0b3a375..faad733a8 100644
--- a/sim/syscall_emul.cc
+++ b/sim/syscall_emul.cc
@@ -130,7 +130,7 @@ readFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc)
int bytes_read = read(fd, bufArg.bufferPtr(), nbytes);
if (bytes_read != -1)
- bufArg.copyOut(xc->port);
+ bufArg.copyOut(xc->getMemPort());
return bytes_read;
}
@@ -142,7 +142,7 @@ writeFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc)
int nbytes = xc->getSyscallArg(2);
BufferArg bufArg(xc->getSyscallArg(1), nbytes);
- bufArg.copyIn(xc->port);
+ bufArg.copyIn(xc->getMemPort());
int bytes_written = write(fd, bufArg.bufferPtr(), nbytes);
@@ -183,7 +183,7 @@ gethostnameFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc)
strncpy((char *)name.bufferPtr(), hostname, name_len);
- name.copyOut(xc->port);
+ name.copyOut(xc->getMemPort());
return 0;
}
@@ -193,7 +193,7 @@ unlinkFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc)
{
string path;
- if (xc->port->readStringFunctional(path, xc->getSyscallArg(0)) != NoFault)
+ if (xc->getMemPort()->readStringFunctional(path, xc->getSyscallArg(0)) != NoFault)
return (TheISA::IntReg)-EFAULT;
int result = unlink(path.c_str());
@@ -205,12 +205,12 @@ renameFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc)
{
string old_name;
- if (xc->port->readStringFunctional(old_name, xc->getSyscallArg(0)) != NoFault)
+ if (xc->getMemPort()->readStringFunctional(old_name, xc->getSyscallArg(0)) != NoFault)
return -EFAULT;
string new_name;
- if (xc->port->readStringFunctional(new_name, xc->getSyscallArg(1)) != NoFault)
+ if (xc->getMemPort()->readStringFunctional(new_name, xc->getSyscallArg(1)) != NoFault)
return -EFAULT;
int64_t result = rename(old_name.c_str(), new_name.c_str());
@@ -222,7 +222,7 @@ truncateFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc)
{
string path;
- if (xc->port->readStringFunctional(path, xc->getSyscallArg(0)) != NoFault)
+ if (xc->getMemPort()->readStringFunctional(path, xc->getSyscallArg(0)) != NoFault)
return -EFAULT;
off_t length = xc->getSyscallArg(1);
@@ -250,7 +250,7 @@ chownFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc)
{
string path;
- if (xc->port->readStringFunctional(path, xc->getSyscallArg(0)) != NoFault)
+ if (xc->getMemPort()->readStringFunctional(path, xc->getSyscallArg(0)) != NoFault)
return -EFAULT;
/* XXX endianess */