arch: Get rid of the now unused setSyscallArg.
Setting syscall args isn't really something we need to do in gem5, since that will be taken care of by the code actually calling the syscall. We just need to be able to retrieve the value it put there. Jira Issue: https://gem5.atlassian.net/browse/GEM5-187 Change-Id: I0bb6d5d0207a7892414a722b3788cb70ee509582 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23174 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
This commit is contained in:
@@ -222,13 +222,6 @@ AlphaProcess::getSyscallArg(ThreadContext *tc, int &i)
|
||||
return tc->readIntReg(FirstArgumentReg + i++);
|
||||
}
|
||||
|
||||
void
|
||||
AlphaProcess::setSyscallArg(ThreadContext *tc, int i, RegVal val)
|
||||
{
|
||||
assert(i < 6);
|
||||
tc->setIntReg(FirstArgumentReg + i, val);
|
||||
}
|
||||
|
||||
void
|
||||
AlphaProcess::setSyscallReturn(ThreadContext *tc, SyscallReturn sysret)
|
||||
{
|
||||
|
||||
@@ -52,7 +52,6 @@ class AlphaProcess : public Process
|
||||
RegVal getSyscallArg(ThreadContext *tc, int &i) override;
|
||||
/// Explicitly import the otherwise hidden getSyscallArg
|
||||
using Process::getSyscallArg;
|
||||
void setSyscallArg(ThreadContext *tc, int i, RegVal val) override;
|
||||
void setSyscallReturn(ThreadContext *tc,
|
||||
SyscallReturn return_value) override;
|
||||
|
||||
|
||||
@@ -512,21 +512,6 @@ ArmProcess64::getSyscallArg(ThreadContext *tc, int &i, int width)
|
||||
return getSyscallArg(tc, i);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ArmProcess32::setSyscallArg(ThreadContext *tc, int i, RegVal val)
|
||||
{
|
||||
assert(i < 6);
|
||||
tc->setIntReg(ArgumentReg0 + i, val);
|
||||
}
|
||||
|
||||
void
|
||||
ArmProcess64::setSyscallArg(ThreadContext *tc, int i, RegVal val)
|
||||
{
|
||||
assert(i < 8);
|
||||
tc->setIntReg(ArgumentReg0 + i, val);
|
||||
}
|
||||
|
||||
void
|
||||
ArmProcess32::setSyscallReturn(ThreadContext *tc, SyscallReturn sysret)
|
||||
{
|
||||
|
||||
@@ -89,7 +89,6 @@ class ArmProcess32 : public ArmProcess
|
||||
|
||||
RegVal getSyscallArg(ThreadContext *tc, int &i, int width) override;
|
||||
RegVal getSyscallArg(ThreadContext *tc, int &i) override;
|
||||
void setSyscallArg(ThreadContext *tc, int i, RegVal val) override;
|
||||
void setSyscallReturn(ThreadContext *tc,
|
||||
SyscallReturn return_value) override;
|
||||
};
|
||||
@@ -109,7 +108,6 @@ class ArmProcess64 : public ArmProcess
|
||||
|
||||
RegVal getSyscallArg(ThreadContext *tc, int &i, int width) override;
|
||||
RegVal getSyscallArg(ThreadContext *tc, int &i) override;
|
||||
void setSyscallArg(ThreadContext *tc, int i, RegVal val) override;
|
||||
void setSyscallReturn(ThreadContext *tc,
|
||||
SyscallReturn return_value) override;
|
||||
};
|
||||
|
||||
@@ -200,13 +200,6 @@ MipsProcess::getSyscallArg(ThreadContext *tc, int &i)
|
||||
return tc->readIntReg(FirstArgumentReg + i++);
|
||||
}
|
||||
|
||||
void
|
||||
MipsProcess::setSyscallArg(ThreadContext *tc, int i, RegVal val)
|
||||
{
|
||||
assert(i < 6);
|
||||
tc->setIntReg(FirstArgumentReg + i, val);
|
||||
}
|
||||
|
||||
void
|
||||
MipsProcess::setSyscallReturn(ThreadContext *tc, SyscallReturn sysret)
|
||||
{
|
||||
|
||||
@@ -54,7 +54,6 @@ class MipsProcess : public Process
|
||||
RegVal getSyscallArg(ThreadContext *tc, int &i);
|
||||
/// Explicitly import the otherwise hidden getSyscallArg
|
||||
using Process::getSyscallArg;
|
||||
void setSyscallArg(ThreadContext *tc, int i, RegVal val);
|
||||
void setSyscallReturn(ThreadContext *tc, SyscallReturn return_value);
|
||||
};
|
||||
|
||||
|
||||
@@ -476,12 +476,3 @@ PowerLinuxProcess::getSyscallArg(ThreadContext *tc, int &i)
|
||||
assert(i < 6);
|
||||
return tc->readIntReg(ArgumentReg0 + i++);
|
||||
}
|
||||
|
||||
void
|
||||
PowerLinuxProcess::setSyscallArg(ThreadContext *tc, int i, RegVal val)
|
||||
{
|
||||
// Linux apparently allows more parameter than the ABI says it should.
|
||||
// This limit may need to be increased even further.
|
||||
assert(i < 6);
|
||||
tc->setIntReg(ArgumentReg0 + i, val);
|
||||
}
|
||||
|
||||
@@ -48,7 +48,6 @@ class PowerLinuxProcess : public PowerProcess
|
||||
RegVal getSyscallArg(ThreadContext *tc, int &i);
|
||||
/// Explicitly import the otherwise hidden getSyscallArg
|
||||
using Process::getSyscallArg;
|
||||
void setSyscallArg(ThreadContext *tc, int i, RegVal val);
|
||||
|
||||
/// Array of syscall descriptors, indexed by call number.
|
||||
static SyscallDesc syscallDescs[];
|
||||
|
||||
@@ -279,13 +279,6 @@ PowerProcess::getSyscallArg(ThreadContext *tc, int &i)
|
||||
return tc->readIntReg(ArgumentReg0 + i++);
|
||||
}
|
||||
|
||||
void
|
||||
PowerProcess::setSyscallArg(ThreadContext *tc, int i, RegVal val)
|
||||
{
|
||||
assert(i < 5);
|
||||
tc->setIntReg(ArgumentReg0 + i, val);
|
||||
}
|
||||
|
||||
void
|
||||
PowerProcess::setSyscallReturn(ThreadContext *tc, SyscallReturn sysret)
|
||||
{
|
||||
|
||||
@@ -53,7 +53,6 @@ class PowerProcess : public Process
|
||||
RegVal getSyscallArg(ThreadContext *tc, int &i);
|
||||
/// Explicitly import the otherwise hidden getSyscallArg
|
||||
using Process::getSyscallArg;
|
||||
void setSyscallArg(ThreadContext *tc, int i, RegVal val);
|
||||
void setSyscallReturn(ThreadContext *tc, SyscallReturn return_value);
|
||||
};
|
||||
|
||||
|
||||
@@ -259,12 +259,6 @@ RiscvProcess::getSyscallArg(ThreadContext *tc, int &i)
|
||||
return retval;
|
||||
}
|
||||
|
||||
void
|
||||
RiscvProcess::setSyscallArg(ThreadContext *tc, int i, RegVal val)
|
||||
{
|
||||
tc->setIntReg(SyscallArgumentRegs[i], val);
|
||||
}
|
||||
|
||||
void
|
||||
RiscvProcess::setSyscallReturn(ThreadContext *tc, SyscallReturn sysret)
|
||||
{
|
||||
|
||||
@@ -54,7 +54,6 @@ class RiscvProcess : public Process
|
||||
RegVal getSyscallArg(ThreadContext *tc, int &i) override;
|
||||
/// Explicitly import the otherwise hidden getSyscallArg
|
||||
using Process::getSyscallArg;
|
||||
void setSyscallArg(ThreadContext *tc, int i, RegVal val) override;
|
||||
void setSyscallReturn(ThreadContext *tc,
|
||||
SyscallReturn return_value) override;
|
||||
|
||||
|
||||
@@ -505,13 +505,6 @@ Sparc32Process::getSyscallArg(ThreadContext *tc, int &i)
|
||||
return bits(tc->readIntReg(FirstArgumentReg + i++), 31, 0);
|
||||
}
|
||||
|
||||
void
|
||||
Sparc32Process::setSyscallArg(ThreadContext *tc, int i, RegVal val)
|
||||
{
|
||||
assert(i < 6);
|
||||
tc->setIntReg(FirstArgumentReg + i, bits(val, 31, 0));
|
||||
}
|
||||
|
||||
RegVal
|
||||
Sparc64Process::getSyscallArg(ThreadContext *tc, int &i)
|
||||
{
|
||||
@@ -519,13 +512,6 @@ Sparc64Process::getSyscallArg(ThreadContext *tc, int &i)
|
||||
return tc->readIntReg(FirstArgumentReg + i++);
|
||||
}
|
||||
|
||||
void
|
||||
Sparc64Process::setSyscallArg(ThreadContext *tc, int i, RegVal val)
|
||||
{
|
||||
assert(i < 6);
|
||||
tc->setIntReg(FirstArgumentReg + i, val);
|
||||
}
|
||||
|
||||
void
|
||||
SparcProcess::setSyscallReturn(ThreadContext *tc, SyscallReturn sysret)
|
||||
{
|
||||
|
||||
@@ -111,8 +111,6 @@ class Sparc32Process : public SparcProcess
|
||||
RegVal getSyscallArg(ThreadContext *tc, int &i);
|
||||
/// Explicitly import the otherwise hidden getSyscallArg
|
||||
using Process::getSyscallArg;
|
||||
|
||||
void setSyscallArg(ThreadContext *tc, int i, RegVal val);
|
||||
};
|
||||
|
||||
class Sparc64Process : public SparcProcess
|
||||
@@ -154,8 +152,6 @@ class Sparc64Process : public SparcProcess
|
||||
RegVal getSyscallArg(ThreadContext *tc, int &i);
|
||||
/// Explicitly import the otherwise hidden getSyscallArg
|
||||
using Process::getSyscallArg;
|
||||
|
||||
void setSyscallArg(ThreadContext *tc, int i, RegVal val);
|
||||
};
|
||||
|
||||
#endif // __SPARC_PROCESS_HH__
|
||||
|
||||
@@ -1068,13 +1068,6 @@ X86_64Process::getSyscallArg(ThreadContext *tc, int &i)
|
||||
return tc->readIntReg(ArgumentReg[i++]);
|
||||
}
|
||||
|
||||
void
|
||||
X86_64Process::setSyscallArg(ThreadContext *tc, int i, RegVal val)
|
||||
{
|
||||
assert(i < NumArgumentRegs);
|
||||
return tc->setIntReg(ArgumentReg[i], val);
|
||||
}
|
||||
|
||||
void
|
||||
X86_64Process::clone(ThreadContext *old_tc, ThreadContext *new_tc,
|
||||
Process *p, RegVal flags)
|
||||
@@ -1101,13 +1094,6 @@ I386Process::getSyscallArg(ThreadContext *tc, int &i, int width)
|
||||
return retVal;
|
||||
}
|
||||
|
||||
void
|
||||
I386Process::setSyscallArg(ThreadContext *tc, int i, RegVal val)
|
||||
{
|
||||
assert(i < NumArgumentRegs);
|
||||
return tc->setIntReg(ArgumentReg[i], val);
|
||||
}
|
||||
|
||||
void
|
||||
I386Process::clone(ThreadContext *old_tc, ThreadContext *new_tc,
|
||||
Process *p, RegVal flags)
|
||||
|
||||
@@ -138,7 +138,6 @@ namespace X86ISA
|
||||
RegVal getSyscallArg(ThreadContext *tc, int &i) override;
|
||||
/// Explicitly import the otherwise hidden getSyscallArg
|
||||
using Process::getSyscallArg;
|
||||
void setSyscallArg(ThreadContext *tc, int i, RegVal val) override;
|
||||
void clone(ThreadContext *old_tc, ThreadContext *new_tc,
|
||||
Process *process, RegVal flags) override;
|
||||
};
|
||||
@@ -181,7 +180,6 @@ namespace X86ISA
|
||||
Fault *fault) override;
|
||||
RegVal getSyscallArg(ThreadContext *tc, int &i) override;
|
||||
RegVal getSyscallArg(ThreadContext *tc, int &i, int width) override;
|
||||
void setSyscallArg(ThreadContext *tc, int i, RegVal val) override;
|
||||
void clone(ThreadContext *old_tc, ThreadContext *new_tc,
|
||||
Process *process, RegVal flags) override;
|
||||
};
|
||||
|
||||
@@ -77,7 +77,6 @@ class Process : public SimObject
|
||||
virtual void syscall(int64_t callnum, ThreadContext *tc, Fault *fault);
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user