diff options
author | Steve Reinhardt <stever@eecs.umich.edu> | 2006-03-12 15:51:48 -0500 |
---|---|---|
committer | Steve Reinhardt <stever@eecs.umich.edu> | 2006-03-12 15:51:48 -0500 |
commit | 84a6044f31b9e2209bd49ae1d184289a0fa947bd (patch) | |
tree | ee5b7334949b28bcb8fe0ea2560135ea78b5066f /kern | |
parent | 71c2c962dbaf4e04d64a117b5b333a3c039423ad (diff) | |
download | gem5-84a6044f31b9e2209bd49ae1d184289a0fa947bd.tar.xz |
Add "using namespace TheISA" to syscall emulation functions so they pick up the right definitions of htog/gtoh etc.
--HG--
extra : convert_revision : 7ee949a2151f9a8d158815a7dffba6c19779f282
Diffstat (limited to 'kern')
-rw-r--r-- | kern/linux/linux.hh | 6 | ||||
-rw-r--r-- | kern/tru64/tru64.hh | 26 |
2 files changed, 32 insertions, 0 deletions
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<Linux::tgt_stat> 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<Linux::tgt_stat> 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<Linux::tgt_stat64> 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<T> 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<T> 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<Tru64::pre_F64_stat> 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<Tru64::sigcontext> 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<Tru64::vm_stack> 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<Tru64::nxm_task_attr> attrp(xc->getSyscallArg(0)); TypedBufferArg<Addr> 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<Tru64::nxm_thread_attr> attrp(xc->getSyscallArg(0)); TypedBufferArg<uint64_t> 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<uint64_t> 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<uint64_t> 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<uint64_t> condp(cond_addr); |