summaryrefslogtreecommitdiff
path: root/src/cpu/o3
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-02-27 09:22:14 -0800
committerGabe Black <gblack@eecs.umich.edu>2009-02-27 09:22:14 -0800
commit9a000c51736d97c1109be296ea7d1fd41d84debb (patch)
tree9fbc6648a69d4f6156c4259d7f1e32bd7732405e /src/cpu/o3
parent60aab03e854c0d955127d12c63f4c99a36d19d80 (diff)
downloadgem5-9a000c51736d97c1109be296ea7d1fd41d84debb.tar.xz
Processes: Make getting and setting system call arguments part of a process object.
Diffstat (limited to 'src/cpu/o3')
-rw-r--r--src/cpu/o3/cpu.cc35
-rw-r--r--src/cpu/o3/cpu.hh11
-rwxr-xr-xsrc/cpu/o3/thread_context.hh9
-rwxr-xr-xsrc/cpu/o3/thread_context_impl.hh25
4 files changed, 0 insertions, 80 deletions
diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc
index 4f6d5d41c..1d7fb97c0 100644
--- a/src/cpu/o3/cpu.cc
+++ b/src/cpu/o3/cpu.cc
@@ -420,34 +420,6 @@ FullO3CPU<Impl>::FullO3CPU(DerivO3CPUParams *params)
lockFlag = false;
}
-#if !FULL_SYSTEM
-
-template <class Impl>
-TheISA::IntReg
-FullO3CPU<Impl>::getSyscallArg(int i, int tid)
-{
- assert(i < TheISA::NumArgumentRegs);
- TheISA::IntReg idx = TheISA::flattenIntIndex(this->tcBase(tid),
- TheISA::ArgumentReg[i]);
- TheISA::IntReg val = this->readArchIntReg(idx, tid);
-#if THE_ISA == SPARC_ISA
- if (bits(this->readMiscRegNoEffect(SparcISA::MISCREG_PSTATE, tid), 3, 3))
- val = bits(val, 31, 0);
-#endif
- return val;
-}
-
-template <class Impl>
-void
-FullO3CPU<Impl>::setSyscallArg(int i, TheISA::IntReg val, int tid)
-{
- assert(i < TheISA::NumArgumentRegs);
- TheISA::IntReg idx = TheISA::flattenIntIndex(this->tcBase(tid),
- TheISA::ArgumentReg[i]);
- this->setArchIntReg(idx, val, tid);
-}
-#endif
-
template <class Impl>
FullO3CPU<Impl>::~FullO3CPU()
{
@@ -1000,13 +972,6 @@ FullO3CPU<Impl>::syscall(int64_t callnum, int tid)
--(this->thread[tid]->funcExeInst);
}
-template <class Impl>
-void
-FullO3CPU<Impl>::setSyscallReturn(SyscallReturn return_value, int tid)
-{
- TheISA::setSyscallReturn(return_value, this->tcBase(tid));
-}
-
#endif
template <class Impl>
diff --git a/src/cpu/o3/cpu.hh b/src/cpu/o3/cpu.hh
index 683e4284f..f4ed28e8e 100644
--- a/src/cpu/o3/cpu.hh
+++ b/src/cpu/o3/cpu.hh
@@ -193,13 +193,6 @@ class FullO3CPU : public BaseO3CPU
activateThreadEvent[tid].squash();
}
-#if !FULL_SYSTEM
- TheISA::IntReg getSyscallArg(int i, int tid);
-
- /** Used to shift args for indirect syscall. */
- void setSyscallArg(int i, TheISA::IntReg val, int tid);
-#endif
-
/** The tick event used for scheduling CPU ticks. */
ActivateThreadEvent activateThreadEvent[Impl::MaxThreads];
@@ -354,10 +347,6 @@ class FullO3CPU : public BaseO3CPU
* @todo: Determine if this needs to be virtual.
*/
void syscall(int64_t callnum, int tid);
-
- /** Sets the return value of a syscall. */
- void setSyscallReturn(SyscallReturn return_value, int tid);
-
#endif
/** Starts draining the CPU's pipeline of all instructions in
diff --git a/src/cpu/o3/thread_context.hh b/src/cpu/o3/thread_context.hh
index 6de773ff1..f3058925d 100755
--- a/src/cpu/o3/thread_context.hh
+++ b/src/cpu/o3/thread_context.hh
@@ -247,15 +247,6 @@ class O3ThreadContext : public ThreadContext
virtual bool misspeculating() { return false; }
#if !FULL_SYSTEM
- /** Gets a syscall argument by index. */
- virtual IntReg getSyscallArg(int i);
-
- /** Sets a syscall argument. */
- virtual void setSyscallArg(int i, IntReg val);
-
- /** Sets the syscall return value. */
- virtual void setSyscallReturn(SyscallReturn return_value);
-
/** Executes a syscall in SE mode. */
virtual void syscall(int64_t callnum)
{ return cpu->syscall(callnum, thread->threadId()); }
diff --git a/src/cpu/o3/thread_context_impl.hh b/src/cpu/o3/thread_context_impl.hh
index 12b2d1b31..fc8b66b83 100755
--- a/src/cpu/o3/thread_context_impl.hh
+++ b/src/cpu/o3/thread_context_impl.hh
@@ -482,28 +482,3 @@ O3ThreadContext<Impl>::setMiscReg(int misc_reg,
}
}
-#if !FULL_SYSTEM
-
-template <class Impl>
-TheISA::IntReg
-O3ThreadContext<Impl>::getSyscallArg(int i)
-{
- return cpu->getSyscallArg(i, thread->threadId());
-}
-
-template <class Impl>
-void
-O3ThreadContext<Impl>::setSyscallArg(int i, IntReg val)
-{
- cpu->setSyscallArg(i, val, thread->threadId());
-}
-
-template <class Impl>
-void
-O3ThreadContext<Impl>::setSyscallReturn(SyscallReturn return_value)
-{
- cpu->setSyscallReturn(return_value, thread->threadId());
-}
-
-#endif // FULL_SYSTEM
-