From: Steve Reinhardt Date: Sun, 12 Mar 2006 20:51:48 +0000 (-0500) Subject: Add "using namespace TheISA" to syscall emulation functions so they pick up the right... X-Git-Tag: m5_2.0_beta1~182 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=84a6044f31b9e2209bd49ae1d184289a0fa947bd;p=gem5.git Add "using namespace TheISA" to syscall emulation functions so they pick up the right definitions of htog/gtoh etc. --HG-- extra : convert_revision : 7ee949a2151f9a8d158815a7dffba6c19779f282 --- diff --git a/kern/linux/linux.hh b/kern/linux/linux.hh index 4244eb369..9237084fc 100644 --- a/kern/linux/linux.hh +++ b/kern/linux/linux.hh @@ -244,6 +244,8 @@ class Linux { static void copyOutStatBuf(TranslatingPort *mem, Addr addr, hst_stat *host) { + using namespace TheISA; + TypedBufferArg tgt(addr); tgt->st_dev = htog(host->st_dev); @@ -268,6 +270,8 @@ class Linux { static void copyOutStatBuf(TranslatingPort *mem, Addr addr, hst_stat64 *host) { + using namespace TheISA; + TypedBufferArg tgt(addr); tgt->st_dev = htog(host->st_dev); @@ -293,6 +297,8 @@ class Linux { static void copyOutStat64Buf(TranslatingPort *mem, int fd, Addr addr, hst_stat64 *host) { + using namespace TheISA; + TypedBufferArg tgt(addr); // fd == 1 checks are because libc does some checks diff --git a/kern/tru64/tru64.hh b/kern/tru64/tru64.hh index fcce99879..68846815e 100644 --- a/kern/tru64/tru64.hh +++ b/kern/tru64/tru64.hh @@ -544,6 +544,8 @@ class Tru64 { static void copyOutStatBuf(TranslatingPort *mem, Addr addr, global_stat *host) { + using namespace TheISA; + TypedBufferArg tgt(addr); tgt->st_dev = htog(host->st_dev); @@ -570,6 +572,8 @@ class Tru64 { static void copyOutStatfsBuf(TranslatingPort *mem, Addr addr, global_statfs *host) { + using namespace TheISA; + TypedBufferArg tgt(addr); #if defined(__OpenBSD__) || defined(__APPLE__) || defined(__FreeBSD__) @@ -627,6 +631,8 @@ class Tru64 { static void copyOutPreF64StatBuf(TranslatingPort *mem, Addr addr, struct stat *host) { + using namespace TheISA; + TypedBufferArg tgt(addr); tgt->st_dev = htog(host->st_dev); @@ -656,6 +662,8 @@ class Tru64 { getdirentriesFunc(SyscallDesc *desc, int callnum, Process *process, ExecContext *xc) { + using namespace TheISA; + #ifdef __CYGWIN__ panic("getdirent not implemented on cygwin!"); #else @@ -715,6 +723,8 @@ class Tru64 { sigreturnFunc(SyscallDesc *desc, int callnum, Process *process, ExecContext *xc) { + using namespace TheISA; + using TheISA::RegFile; TypedBufferArg sc(xc->getSyscallArg(0)); @@ -741,6 +751,8 @@ class Tru64 { tableFunc(SyscallDesc *desc, int callnum, Process *process, ExecContext *xc) { + using namespace TheISA; + int id = xc->getSyscallArg(0); // table ID int index = xc->getSyscallArg(1); // index into table // arg 2 is buffer pointer; type depends on table ID @@ -782,6 +794,8 @@ class Tru64 { stack_createFunc(SyscallDesc *desc, int callnum, Process *process, ExecContext *xc) { + using namespace TheISA; + TypedBufferArg argp(xc->getSyscallArg(0)); argp.copyIn(xc->getMemPort()); @@ -810,6 +824,8 @@ class Tru64 { nxm_task_initFunc(SyscallDesc *desc, int callnum, Process *process, ExecContext *xc) { + using namespace TheISA; + TypedBufferArg attrp(xc->getSyscallArg(0)); TypedBufferArg configptr_ptr(xc->getSyscallArg(1)); @@ -921,6 +937,8 @@ class Tru64 { init_exec_context(ExecContext *ec, Tru64::nxm_thread_attr *attrp, uint64_t uniq_val) { + using namespace TheISA; + ec->clearArchRegs(); ec->setIntReg(TheISA::ArgumentReg0, gtoh(attrp->registers.a0)); @@ -939,6 +957,8 @@ class Tru64 { nxm_thread_createFunc(SyscallDesc *desc, int callnum, Process *process, ExecContext *xc) { + using namespace TheISA; + TypedBufferArg attrp(xc->getSyscallArg(0)); TypedBufferArg kidp(xc->getSyscallArg(1)); int thread_index = xc->getSyscallArg(2); @@ -1157,6 +1177,8 @@ class Tru64 { static void m5_lock_mutex(Addr uaddr, Process *process, ExecContext *xc) { + using namespace TheISA; + TypedBufferArg lockp(uaddr); lockp.copyIn(xc->getMemPort()); @@ -1211,6 +1233,8 @@ class Tru64 { m5_mutex_trylockFunc(SyscallDesc *desc, int callnum, Process *process, ExecContext *xc) { + using namespace TheISA; + Addr uaddr = xc->getSyscallArg(0); TypedBufferArg lockp(uaddr); @@ -1268,6 +1292,8 @@ class Tru64 { m5_cond_waitFunc(SyscallDesc *desc, int callnum, Process *process, ExecContext *xc) { + using namespace TheISA; + Addr cond_addr = xc->getSyscallArg(0); Addr lock_addr = xc->getSyscallArg(1); TypedBufferArg condp(cond_addr);