Removed unecessary constructor call at each return.
arch/alpha/isa_traits.hh:
updated copyright date
--HG--
extra : convert_revision : 30c5fc0eb94138ebd4ee047ebdbff5121f95e5f1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003-2004 The Regents of The University of Michigan
|
||||
* Copyright (c) 2003-2005 The Regents of The University of Michigan
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -79,7 +79,7 @@ ignoreFunc(SyscallDesc *desc, int callnum, Process *process,
|
||||
<< ", " << xc->getSyscallArg(1)
|
||||
<< ", ...)" << endl;
|
||||
|
||||
return SyscallReturn(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -89,14 +89,14 @@ exitFunc(SyscallDesc *desc, int callnum, Process *process,
|
||||
{
|
||||
new SimExitEvent("syscall caused exit", xc->getSyscallArg(0) & 0xff);
|
||||
|
||||
return SyscallReturn(1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
SyscallReturn
|
||||
getpagesizeFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc)
|
||||
{
|
||||
return SyscallReturn(VMPageSize);
|
||||
return VMPageSize;
|
||||
}
|
||||
|
||||
|
||||
@@ -109,7 +109,8 @@ obreakFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc)
|
||||
{
|
||||
p->brk_point = xc->getSyscallArg(0);
|
||||
}
|
||||
return SyscallReturn(p->brk_point);
|
||||
DPRINTF(SyscallVerbose, "Break Point changed to: %#X\n", p->brk_point);
|
||||
return p->brk_point;
|
||||
}
|
||||
|
||||
|
||||
@@ -117,7 +118,7 @@ SyscallReturn
|
||||
closeFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc)
|
||||
{
|
||||
int fd = p->sim_fd(xc->getSyscallArg(0));
|
||||
return SyscallReturn(close(fd));
|
||||
return close(fd);
|
||||
}
|
||||
|
||||
|
||||
@@ -133,7 +134,7 @@ readFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc)
|
||||
if (bytes_read != -1)
|
||||
bufArg.copyOut(xc->mem);
|
||||
|
||||
return SyscallReturn(bytes_read);
|
||||
return bytes_read;
|
||||
}
|
||||
|
||||
SyscallReturn
|
||||
@@ -149,7 +150,7 @@ writeFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc)
|
||||
|
||||
fsync(fd);
|
||||
|
||||
return SyscallReturn(bytes_written);
|
||||
return bytes_written;
|
||||
}
|
||||
|
||||
|
||||
@@ -162,8 +163,7 @@ lseekFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc)
|
||||
|
||||
off_t result = lseek(fd, offs, whence);
|
||||
|
||||
return (result == (off_t)-1) ? SyscallReturn(-errno) :
|
||||
SyscallReturn(result);
|
||||
return (result == (off_t)-1) ? -errno : result;
|
||||
}
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ SyscallReturn
|
||||
munmapFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc)
|
||||
{
|
||||
// given that we don't really implement mmap, munmap is really easy
|
||||
return SyscallReturn(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -187,7 +187,7 @@ gethostnameFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc)
|
||||
|
||||
name.copyOut(xc->mem);
|
||||
|
||||
return SyscallReturn(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
SyscallReturn
|
||||
@@ -199,7 +199,7 @@ unlinkFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc)
|
||||
return (TheISA::IntReg)-EFAULT;
|
||||
|
||||
int result = unlink(path.c_str());
|
||||
return (result == -1) ? SyscallReturn(-errno) : SyscallReturn(result);
|
||||
return (result == -1) ? -errno : result;
|
||||
}
|
||||
|
||||
SyscallReturn
|
||||
@@ -208,14 +208,14 @@ renameFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc)
|
||||
std::string old_name;
|
||||
|
||||
if (xc->mem->readString(old_name, xc->getSyscallArg(0)) != No_Fault)
|
||||
return SyscallReturn(-EFAULT);
|
||||
return -EFAULT;
|
||||
|
||||
std::string new_name;
|
||||
|
||||
if (xc->mem->readString(new_name, xc->getSyscallArg(1)) != No_Fault)
|
||||
return SyscallReturn(-EFAULT);
|
||||
return -EFAULT;
|
||||
|
||||
int64_t result = rename(old_name.c_str(),new_name.c_str());
|
||||
return (result == -1) ? SyscallReturn(-errno) : SyscallReturn(result);
|
||||
return (result == -1) ? -errno : result;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003-2004 The Regents of The University of Michigan
|
||||
* Copyright (c) 2003-2005 The Regents of The University of Michigan
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -251,7 +251,7 @@ ioctlFunc(SyscallDesc *desc, int callnum, Process *process,
|
||||
|
||||
if (fd < 0 || process->sim_fd(fd) < 0) {
|
||||
// doesn't map to any simulator fd: not a valid target fd
|
||||
return SyscallReturn(-EBADF);
|
||||
return -EBADF;
|
||||
}
|
||||
|
||||
switch (req) {
|
||||
@@ -263,7 +263,7 @@ ioctlFunc(SyscallDesc *desc, int callnum, Process *process,
|
||||
case OS::TIOCGETC:
|
||||
case OS::TIOCGETS:
|
||||
case OS::TIOCGETA:
|
||||
return SyscallReturn(-ENOTTY);
|
||||
return -ENOTTY;
|
||||
|
||||
default:
|
||||
fatal("Unsupported ioctl call: ioctl(%d, 0x%x, ...) @ 0x%llx\n", fd, req, xc->readPC());
|
||||
@@ -279,13 +279,13 @@ openFunc(SyscallDesc *desc, int callnum, Process *process,
|
||||
std::string path;
|
||||
|
||||
if (xc->mem->readString(path, xc->getSyscallArg(0)) != No_Fault)
|
||||
return SyscallReturn(-EFAULT);
|
||||
return -EFAULT;
|
||||
|
||||
if (path == "/dev/sysdev0") {
|
||||
// This is a memory-mapped high-resolution timer device on Alpha.
|
||||
// We don't support it, so just punt.
|
||||
DCOUT(SyscallWarnings) << "Ignoring open(" << path << ", ...)" << std::endl;
|
||||
return SyscallReturn(-ENOENT);
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
int tgtFlags = xc->getSyscallArg(1);
|
||||
@@ -311,7 +311,7 @@ openFunc(SyscallDesc *desc, int callnum, Process *process,
|
||||
// open the file
|
||||
int fd = open(path.c_str(), hostFlags, mode);
|
||||
|
||||
return (fd == -1) ? SyscallReturn(-errno) : SyscallReturn(process->open_fd(fd));
|
||||
return (fd == -1) ? -errno : process->open_fd(fd);
|
||||
}
|
||||
|
||||
|
||||
@@ -324,17 +324,17 @@ statFunc(SyscallDesc *desc, int callnum, Process *process,
|
||||
std::string path;
|
||||
|
||||
if (xc->mem->readString(path, xc->getSyscallArg(0)) != No_Fault)
|
||||
return SyscallReturn(-EFAULT);
|
||||
return -EFAULT;
|
||||
|
||||
struct stat hostBuf;
|
||||
int result = stat(path.c_str(), &hostBuf);
|
||||
|
||||
if (result < 0)
|
||||
return SyscallReturn(errno);
|
||||
return errno;
|
||||
|
||||
OS::copyOutStatBuf(xc->mem, xc->getSyscallArg(1), &hostBuf);
|
||||
|
||||
return SyscallReturn(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -347,17 +347,17 @@ lstatFunc(SyscallDesc *desc, int callnum, Process *process,
|
||||
std::string path;
|
||||
|
||||
if (xc->mem->readString(path, xc->getSyscallArg(0)) != No_Fault)
|
||||
return SyscallReturn(-EFAULT);
|
||||
return -EFAULT;
|
||||
|
||||
struct stat hostBuf;
|
||||
int result = lstat(path.c_str(), &hostBuf);
|
||||
|
||||
if (result < 0)
|
||||
return SyscallReturn(-errno);
|
||||
return -errno;
|
||||
|
||||
OS::copyOutStatBuf(xc->mem, xc->getSyscallArg(1), &hostBuf);
|
||||
|
||||
return SyscallReturn(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// Target fstat() handler.
|
||||
@@ -371,17 +371,17 @@ fstatFunc(SyscallDesc *desc, int callnum, Process *process,
|
||||
// DPRINTFR(SyscallVerbose, "fstat(%d, ...)\n", fd);
|
||||
|
||||
if (fd < 0)
|
||||
return SyscallReturn(-EBADF);
|
||||
return -EBADF;
|
||||
|
||||
struct stat hostBuf;
|
||||
int result = fstat(fd, &hostBuf);
|
||||
|
||||
if (result < 0)
|
||||
return SyscallReturn(-errno);
|
||||
return -errno;
|
||||
|
||||
OS::copyOutStatBuf(xc->mem, xc->getSyscallArg(1), &hostBuf);
|
||||
|
||||
return SyscallReturn(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -419,7 +419,7 @@ mmapFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc)
|
||||
"This will break if not /dev/zero.", xc->getSyscallArg(4));
|
||||
}
|
||||
|
||||
return SyscallReturn(start);
|
||||
return start;
|
||||
}
|
||||
|
||||
/// Target getrlimit() handler.
|
||||
@@ -444,7 +444,7 @@ getrlimitFunc(SyscallDesc *desc, int callnum, Process *process,
|
||||
}
|
||||
|
||||
rlp.copyOut(xc->mem);
|
||||
return SyscallReturn(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// Target gettimeofday() handler.
|
||||
@@ -460,7 +460,7 @@ gettimeofdayFunc(SyscallDesc *desc, int callnum, Process *process,
|
||||
|
||||
tp.copyOut(xc->mem);
|
||||
|
||||
return SyscallReturn(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -501,7 +501,7 @@ getrusageFunc(SyscallDesc *desc, int callnum, Process *process,
|
||||
|
||||
rup.copyOut(xc->mem);
|
||||
|
||||
return SyscallReturn(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif // __SIM_SYSCALL_EMUL_HH__
|
||||
|
||||
Reference in New Issue
Block a user