From cf0f625b47a8e0334fc3fe8c0c2cdf5aaaf3389e Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sat, 13 Oct 2018 00:54:32 -0700 Subject: cpu: dev: sim: gpu-compute: Banish some ISA specific register types. These types are IntReg, FloatReg, FloatRegBits, and MiscReg. There are some remaining types, specifically the vector registers and the CCReg. I'm less familiar with these new types of registers, and so will look at getting rid of them at some later time. Change-Id: Ide8f76b15c531286f61427330053b44074b8ac9b Reviewed-on: https://gem5-review.googlesource.com/c/13624 Reviewed-by: Gabe Black Maintainer: Gabe Black --- src/sim/process.cc | 4 ++-- src/sim/process.hh | 9 ++++----- src/sim/syscall_desc.cc | 2 +- src/sim/syscall_emul.hh | 4 ++-- 4 files changed, 9 insertions(+), 10 deletions(-) (limited to 'src/sim') diff --git a/src/sim/process.cc b/src/sim/process.cc index 5e9c2b5e7..62959b4c5 100644 --- a/src/sim/process.cc +++ b/src/sim/process.cc @@ -156,7 +156,7 @@ Process::Process(ProcessParams *params, EmulationPageTable *pTable, void Process::clone(ThreadContext *otc, ThreadContext *ntc, - Process *np, TheISA::IntReg flags) + Process *np, RegVal flags) { #ifndef CLONE_VM #define CLONE_VM 0 @@ -423,7 +423,7 @@ Process::syscall(int64_t callnum, ThreadContext *tc, Fault *fault) desc->doSyscall(callnum, this, tc, fault); } -IntReg +RegVal Process::getSyscallArg(ThreadContext *tc, int &i, int width) { return getSyscallArg(tc, i); diff --git a/src/sim/process.hh b/src/sim/process.hh index cb2a3e2be..c690e825e 100644 --- a/src/sim/process.hh +++ b/src/sim/process.hh @@ -73,10 +73,9 @@ class Process : public SimObject DrainState drain() override; virtual void syscall(int64_t callnum, ThreadContext *tc, Fault *fault); - virtual TheISA::IntReg getSyscallArg(ThreadContext *tc, int &i) = 0; - virtual TheISA::IntReg getSyscallArg(ThreadContext *tc, int &i, int width); - virtual void setSyscallArg(ThreadContext *tc, int i, - TheISA::IntReg val) = 0; + virtual RegVal getSyscallArg(ThreadContext *tc, int &i) = 0; + virtual RegVal getSyscallArg(ThreadContext *tc, int &i, int width); + virtual void setSyscallArg(ThreadContext *tc, int i, RegVal val) = 0; virtual void setSyscallReturn(ThreadContext *tc, SyscallReturn return_value) = 0; virtual SyscallDesc *getDesc(int callnum) = 0; @@ -163,7 +162,7 @@ class Process : public SimObject ThreadContext *new_tc, bool alloc_page); virtual void clone(ThreadContext *old_tc, ThreadContext *new_tc, - Process *new_p, TheISA::IntReg flags); + Process *new_p, RegVal flags); // thread contexts associated with this process std::vector contextIds; diff --git a/src/sim/syscall_desc.cc b/src/sim/syscall_desc.cc index 3696c1719..841998da5 100644 --- a/src/sim/syscall_desc.cc +++ b/src/sim/syscall_desc.cc @@ -49,7 +49,7 @@ void SyscallDesc::doSyscall(int callnum, Process *process, ThreadContext *tc, Fault *fault) { - TheISA::IntReg arg[6] M5_VAR_USED; + RegVal arg[6] M5_VAR_USED; /** * Step through the first six parameters for the system call and diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh index 91e115de0..3f06869aa 100644 --- a/src/sim/syscall_emul.hh +++ b/src/sim/syscall_emul.hh @@ -1275,8 +1275,8 @@ cloneFunc(SyscallDesc *desc, int callnum, Process *p, ThreadContext *tc) { int index = 0; - TheISA::IntReg flags = p->getSyscallArg(tc, index); - TheISA::IntReg newStack = p->getSyscallArg(tc, index); + RegVal flags = p->getSyscallArg(tc, index); + RegVal newStack = p->getSyscallArg(tc, index); Addr ptidPtr = p->getSyscallArg(tc, index); #if THE_ISA == RISCV_ISA or THE_ISA == ARM_ISA -- cgit v1.2.3