diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2006-03-09 15:42:09 -0500 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2006-03-09 15:42:09 -0500 |
commit | ce3a6343b6c54e95d63403d46c9ddea384e49476 (patch) | |
tree | 2acc56fa5c2ea2230658ed9b23a17364a241fdab /arch/alpha/linux | |
parent | ab67095b2a43b5f2d44d1e1a517d1079ddf9f104 (diff) | |
download | gem5-ce3a6343b6c54e95d63403d46c9ddea384e49476.tar.xz |
no more common syscall emulation, now common for everyone
check abi-tag note section of elf binary for OS
add pseudo functions (moved from alpha and made to be generic)
move setsyscallreturn into isa traits
arch/alpha/SConscript:
no more common syscall emulation, now common for everyone
arch/alpha/isa_traits.hh:
move setsyscallreturn into isa description
arch/alpha/linux/process.cc:
arch/alpha/tru64/process.cc:
use generic functions rather than alpha specific ones
arch/sparc/isa_traits.hh:
have consts for generic pseudo syscalls
arch/sparc/linux/process.cc:
use generic functions
base/loader/elf_object.cc:
check abi-tag note section of elf binary for OS
cpu/exec_context.hh:
move syssyscallreturn into isa traits
sim/process.cc:
find call num with a more generic
sim/syscall_emul.cc:
sim/syscall_emul.hh:
add pseudo functions (moved from alpha and made to be generic)
--HG--
extra : convert_revision : 5a31024ecde7e39b830365ddd84593ea501a34d2
Diffstat (limited to 'arch/alpha/linux')
-rw-r--r-- | arch/alpha/linux/process.cc | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/arch/alpha/linux/process.cc b/arch/alpha/linux/process.cc index d78e6a4ee..2ebdbfc0f 100644 --- a/arch/alpha/linux/process.cc +++ b/arch/alpha/linux/process.cc @@ -26,7 +26,6 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "arch/alpha/common_syscall_emul.hh" #include "arch/alpha/linux/process.hh" #include "arch/alpha/isa_traits.hh" @@ -41,29 +40,7 @@ using namespace std; using namespace AlphaISA; -/// Target pipe() handler. Even though this is a generic Posix call, -/// the Alpha return convention is funky, so that makes it -/// Alpha-specific. -SyscallReturn -pipeFunc(SyscallDesc *desc, int callnum, Process *process, - ExecContext *xc) -{ - int fds[2], sim_fds[2]; - int pipe_retval = pipe(fds); - - if (pipe_retval < 0) { - // error - return pipe_retval; - } - sim_fds[0] = process->alloc_fd(fds[0]); - sim_fds[1] = process->alloc_fd(fds[1]); - - // Alpha Linux convention for pipe() is that fd[0] is returned as - // the return value of the function, and fd[1] is returned in r20. - xc->regs.intRegFile[20] = sim_fds[1]; - return sim_fds[0]; -} /// Target uname() handler. @@ -162,11 +139,11 @@ SyscallDesc AlphaLinuxProcess::syscallDescs[] = { /* 17 */ SyscallDesc("brk", obreakFunc), /* 18 */ SyscallDesc("osf_getfsstat", unimplementedFunc), /* 19 */ SyscallDesc("lseek", lseekFunc), - /* 20 */ SyscallDesc("getxpid", getpidFunc), + /* 20 */ SyscallDesc("getxpid", getpidPseudoFunc), /* 21 */ SyscallDesc("osf_mount", unimplementedFunc), /* 22 */ SyscallDesc("umount", unimplementedFunc), /* 23 */ SyscallDesc("setuid", setuidFunc), - /* 24 */ SyscallDesc("getxuid", getuidFunc), + /* 24 */ SyscallDesc("getxuid", getuidPseudoFunc), /* 25 */ SyscallDesc("exec_with_loader", unimplementedFunc), /* 26 */ SyscallDesc("osf_ptrace", unimplementedFunc), /* 27 */ SyscallDesc("osf_nrecvmsg", unimplementedFunc), @@ -184,12 +161,12 @@ SyscallDesc AlphaLinuxProcess::syscallDescs[] = { /* 39 */ SyscallDesc("setpgid", unimplementedFunc), /* 40 */ SyscallDesc("osf_old_lstat", unimplementedFunc), /* 41 */ SyscallDesc("dup", unimplementedFunc), - /* 42 */ SyscallDesc("pipe", pipeFunc), + /* 42 */ SyscallDesc("pipe", pipePseudoFunc), /* 43 */ SyscallDesc("osf_set_program_attributes", unimplementedFunc), /* 44 */ SyscallDesc("osf_profil", unimplementedFunc), /* 45 */ SyscallDesc("open", openFunc<Linux>), /* 46 */ SyscallDesc("osf_old_sigaction", unimplementedFunc), - /* 47 */ SyscallDesc("getxgid", getgidFunc), + /* 47 */ SyscallDesc("getxgid", getgidPseudoFunc), /* 48 */ SyscallDesc("osf_sigprocmask", ignoreFunc), /* 49 */ SyscallDesc("osf_getlogin", unimplementedFunc), /* 50 */ SyscallDesc("osf_setlogin", unimplementedFunc), |