Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/23462 )
Change subject: arch,sim: Get rid of the now unused getSyscallArg method.
......................................................................
arch,sim: Get rid of the now unused getSyscallArg method.
Change-Id: I2f78420d8687da7530feb66784fe3e6d2357baf8
---
M src/arch/alpha/process.cc
M src/arch/alpha/process.hh
M src/arch/arm/freebsd/process.hh
M src/arch/arm/linux/process.hh
M src/arch/arm/process.cc
M src/arch/arm/process.hh
M src/arch/mips/process.cc
M src/arch/mips/process.hh
M src/arch/power/linux/process.cc
M src/arch/power/linux/process.hh
M src/arch/power/process.cc
M src/arch/power/process.hh
M src/arch/riscv/process.cc
M src/arch/riscv/process.hh
M src/arch/sparc/process.cc
M src/arch/sparc/process.hh
M src/arch/x86/process.cc
M src/arch/x86/process.hh
M src/sim/process.cc
M src/sim/process.hh
20 files changed, 0 insertions(+), 167 deletions(-)
diff --git a/src/arch/alpha/process.cc b/src/arch/alpha/process.cc
index 8571f0e..6f3ee1e 100644
--- a/src/arch/alpha/process.cc
+++ b/src/arch/alpha/process.cc
@@ -215,13 +215,6 @@
tc->setMiscRegNoEffect(IPR_MCSR, 0);
}
-RegVal
-AlphaProcess::getSyscallArg(ThreadContext *tc, int &i)
-{
- assert(i < 6);
- return tc->readIntReg(FirstArgumentReg + i++);
-}
-
void
AlphaProcess::setSyscallReturn(ThreadContext *tc, SyscallReturn sysret)
{
diff --git a/src/arch/alpha/process.hh b/src/arch/alpha/process.hh
index 8ff72bc..b973d87 100644
--- a/src/arch/alpha/process.hh
+++ b/src/arch/alpha/process.hh
@@ -50,9 +50,6 @@
void argsInit(int intSize, int pageSize);
public:
- RegVal getSyscallArg(ThreadContext *tc, int &i) override;
- /// Explicitly import the otherwise hidden getSyscallArg
- using Process::getSyscallArg;
void setSyscallReturn(ThreadContext *tc,
SyscallReturn return_value) override;
diff --git a/src/arch/arm/freebsd/process.hh
b/src/arch/arm/freebsd/process.hh
index 8c28232..8ff3ec5 100644
--- a/src/arch/arm/freebsd/process.hh
+++ b/src/arch/arm/freebsd/process.hh
@@ -97,9 +97,6 @@
void syscall(ThreadContext *tc, Fault *fault) override;
- /// Explicitly import the otherwise hidden getSyscallArg
- using ArmProcess::getSyscallArg;
-
/// A page to hold "kernel" provided functions. The name might be
wrong.
static const Addr commPage;
diff --git a/src/arch/arm/linux/process.hh b/src/arch/arm/linux/process.hh
index 8f13279..8f2a496 100644
--- a/src/arch/arm/linux/process.hh
+++ b/src/arch/arm/linux/process.hh
@@ -99,9 +99,6 @@
void syscall(ThreadContext *tc, Fault *fault) override;
- /// Explicitly import the otherwise hidden getSyscallArg
- using ArmProcess::getSyscallArg;
-
/// A page to hold "kernel" provided functions. The name might be
wrong.
static const Addr commPage;
diff --git a/src/arch/arm/process.cc b/src/arch/arm/process.cc
index 6657f54..03275a9 100644
--- a/src/arch/arm/process.cc
+++ b/src/arch/arm/process.cc
@@ -481,45 +481,6 @@
0, 1, 2, 3, 4, 5, 6
};
-RegVal
-ArmProcess32::getSyscallArg(ThreadContext *tc, int &i)
-{
- assert(i < 6);
- return tc->readIntReg(ArgumentReg0 + i++);
-}
-
-RegVal
-ArmProcess64::getSyscallArg(ThreadContext *tc, int &i)
-{
- assert(i < 8);
- return tc->readIntReg(ArgumentReg0 + i++);
-}
-
-RegVal
-ArmProcess32::getSyscallArg(ThreadContext *tc, int &i, int width)
-{
- assert(width == 32 || width == 64);
- if (width == 32)
- return getSyscallArg(tc, i);
-
- // 64 bit arguments are passed starting in an even register
- if (i % 2 != 0)
- i++;
-
- // Registers r0-r6 can be used
- assert(i < 5);
- uint64_t val;
- val = tc->readIntReg(ArgumentReg0 + i++);
- val |= ((uint64_t)tc->readIntReg(ArgumentReg0 + i++) << 32);
- return val;
-}
-
-RegVal
-ArmProcess64::getSyscallArg(ThreadContext *tc, int &i, int width)
-{
- return getSyscallArg(tc, i);
-}
-
void
ArmProcess32::setSyscallReturn(ThreadContext *tc, SyscallReturn sysret)
{
diff --git a/src/arch/arm/process.hh b/src/arch/arm/process.hh
index b90a051..1553fe0 100644
--- a/src/arch/arm/process.hh
+++ b/src/arch/arm/process.hh
@@ -88,8 +88,6 @@
public:
- RegVal getSyscallArg(ThreadContext *tc, int &i, int width) override;
- RegVal getSyscallArg(ThreadContext *tc, int &i) override;
void setSyscallReturn(ThreadContext *tc,
SyscallReturn return_value) override;
@@ -137,8 +135,6 @@
public:
- RegVal getSyscallArg(ThreadContext *tc, int &i, int width) override;
- RegVal getSyscallArg(ThreadContext *tc, int &i) override;
void setSyscallReturn(ThreadContext *tc,
SyscallReturn return_value) override;
diff --git a/src/arch/mips/process.cc b/src/arch/mips/process.cc
index 8e279cf..6f8ee95 100644
--- a/src/arch/mips/process.cc
+++ b/src/arch/mips/process.cc
@@ -193,13 +193,6 @@
}
-RegVal
-MipsProcess::getSyscallArg(ThreadContext *tc, int &i)
-{
- assert(i < 6);
- return tc->readIntReg(FirstArgumentReg + i++);
-}
-
void
MipsProcess::setSyscallReturn(ThreadContext *tc, SyscallReturn sysret)
{
diff --git a/src/arch/mips/process.hh b/src/arch/mips/process.hh
index 20fbacf..2ca8462 100644
--- a/src/arch/mips/process.hh
+++ b/src/arch/mips/process.hh
@@ -52,9 +52,6 @@
void argsInit(int pageSize);
public:
- RegVal getSyscallArg(ThreadContext *tc, int &i);
- /// Explicitly import the otherwise hidden getSyscallArg
- using Process::getSyscallArg;
void setSyscallReturn(ThreadContext *tc, SyscallReturn return_value);
struct SyscallABI : public GenericSyscallABI64
diff --git a/src/arch/power/linux/process.cc
b/src/arch/power/linux/process.cc
index 13d7c85..9de05b9 100644
--- a/src/arch/power/linux/process.cc
+++ b/src/arch/power/linux/process.cc
@@ -472,12 +472,3 @@
{
doSyscall(tc->readIntReg(0), tc, fault);
}
-
-RegVal
-PowerLinuxProcess::getSyscallArg(ThreadContext *tc, int &i)
-{
- // Linux apparently allows more parameter than the ABI says it should.
- // This limit may need to be increased even further.
- assert(i < 6);
- return tc->readIntReg(ArgumentReg0 + i++);
-}
diff --git a/src/arch/power/linux/process.hh
b/src/arch/power/linux/process.hh
index 1c9230d..2c194c2 100644
--- a/src/arch/power/linux/process.hh
+++ b/src/arch/power/linux/process.hh
@@ -49,10 +49,6 @@
void syscall(ThreadContext *tc, Fault *fault) override;
- RegVal getSyscallArg(ThreadContext *tc, int &i);
- /// Explicitly import the otherwise hidden getSyscallArg
- using Process::getSyscallArg;
-
/// Array of syscall descriptors, indexed by call number.
static SyscallDescABI<SyscallABI> syscallDescs[];
diff --git a/src/arch/power/process.cc b/src/arch/power/process.cc
index c095879..82feb46 100644
--- a/src/arch/power/process.cc
+++ b/src/arch/power/process.cc
@@ -272,13 +272,6 @@
memState->setStackMin(roundDown(stack_min, pageSize));
}
-RegVal
-PowerProcess::getSyscallArg(ThreadContext *tc, int &i)
-{
- assert(i < 5);
- return tc->readIntReg(ArgumentReg0 + i++);
-}
-
void
PowerProcess::setSyscallReturn(ThreadContext *tc, SyscallReturn sysret)
{
diff --git a/src/arch/power/process.hh b/src/arch/power/process.hh
index db43461..062c5a9 100644
--- a/src/arch/power/process.hh
+++ b/src/arch/power/process.hh
@@ -51,9 +51,6 @@
public:
void argsInit(int intSize, int pageSize);
- RegVal getSyscallArg(ThreadContext *tc, int &i);
- /// Explicitly import the otherwise hidden getSyscallArg
- using Process::getSyscallArg;
void setSyscallReturn(ThreadContext *tc, SyscallReturn return_value);
struct SyscallABI : public GenericSyscallABI64
diff --git a/src/arch/riscv/process.cc b/src/arch/riscv/process.cc
index adc3982..59147b3 100644
--- a/src/arch/riscv/process.cc
+++ b/src/arch/riscv/process.cc
@@ -247,18 +247,6 @@
memState->setStackMin(roundDown(memState->getStackMin(), pageSize));
}
-RegVal
-RiscvProcess::getSyscallArg(ThreadContext *tc, int &i)
-{
- // If a larger index is requested than there are syscall argument
- // registers, return 0
- RegVal retval = 0;
- if (i < SyscallArgumentRegs.size())
- retval = tc->readIntReg(SyscallArgumentRegs[i]);
- i++;
- return retval;
-}
-
void
RiscvProcess::setSyscallReturn(ThreadContext *tc, SyscallReturn sysret)
{
diff --git a/src/arch/riscv/process.hh b/src/arch/riscv/process.hh
index 1782b52..2c62fa8 100644
--- a/src/arch/riscv/process.hh
+++ b/src/arch/riscv/process.hh
@@ -52,9 +52,6 @@
void argsInit(int pageSize);
public:
- RegVal getSyscallArg(ThreadContext *tc, int &i) override;
- /// Explicitly import the otherwise hidden getSyscallArg
- using Process::getSyscallArg;
void setSyscallReturn(ThreadContext *tc,
SyscallReturn return_value) override;
diff --git a/src/arch/sparc/process.cc b/src/arch/sparc/process.cc
index 50167c7..42abd9c 100644
--- a/src/arch/sparc/process.cc
+++ b/src/arch/sparc/process.cc
@@ -496,20 +496,6 @@
static const int FirstArgumentReg = 8;
-RegVal
-Sparc32Process::getSyscallArg(ThreadContext *tc, int &i)
-{
- assert(i < 6);
- return bits(tc->readIntReg(FirstArgumentReg + i++), 31, 0);
-}
-
-RegVal
-Sparc64Process::getSyscallArg(ThreadContext *tc, int &i)
-{
- assert(i < 6);
- return tc->readIntReg(FirstArgumentReg + i++);
-}
-
void
SparcProcess::setSyscallReturn(ThreadContext *tc, SyscallReturn sysret)
{
diff --git a/src/arch/sparc/process.hh b/src/arch/sparc/process.hh
index d3d6866..f9b5beb 100644
--- a/src/arch/sparc/process.hh
+++ b/src/arch/sparc/process.hh
@@ -154,10 +154,6 @@
void flushWindows(ThreadContext *tc);
- RegVal getSyscallArg(ThreadContext *tc, int &i);
- /// Explicitly import the otherwise hidden getSyscallArg
- using Process::getSyscallArg;
-
struct SyscallABI : public GenericSyscallABI32,
public SparcProcess::SyscallABI
{};
@@ -222,10 +218,6 @@
void flushWindows(ThreadContext *tc);
- RegVal getSyscallArg(ThreadContext *tc, int &i);
- /// Explicitly import the otherwise hidden getSyscallArg
- using Process::getSyscallArg;
-
struct SyscallABI : public GenericSyscallABI64,
public SparcProcess::SyscallABI
{};
diff --git a/src/arch/x86/process.cc b/src/arch/x86/process.cc
index df22f23..4264ecf 100644
--- a/src/arch/x86/process.cc
+++ b/src/arch/x86/process.cc
@@ -1048,13 +1048,6 @@
tc->setIntReg(INTREG_RAX, retval.encodedValue());
}
-RegVal
-X86_64Process::getSyscallArg(ThreadContext *tc, int &i)
-{
- assert(i < NumArgumentRegs);
- return tc->readIntReg(ArgumentReg[i++]);
-}
-
void
X86_64Process::clone(ThreadContext *old_tc, ThreadContext *new_tc,
Process *p, RegVal flags)
@@ -1063,24 +1056,6 @@
((X86_64Process*)p)->vsyscallPage = vsyscallPage;
}
-RegVal
-I386Process::getSyscallArg(ThreadContext *tc, int &i)
-{
- assert(i < NumArgumentRegs32);
- return tc->readIntReg(ArgumentReg32[i++]);
-}
-
-RegVal
-I386Process::getSyscallArg(ThreadContext *tc, int &i, int width)
-{
- assert(width == 32 || width == 64);
- assert(i < NumArgumentRegs);
- uint64_t retVal = tc->readIntReg(ArgumentReg32[i++]) & mask(32);
- if (width == 64)
- retVal |= ((uint64_t)tc->readIntReg(ArgumentReg[i++]) << 32);
- return retVal;
-}
-
void
I386Process::clone(ThreadContext *old_tc, ThreadContext *new_tc,
Process *p, RegVal flags)
diff --git a/src/arch/x86/process.hh b/src/arch/x86/process.hh
index 4c424cd..7236ce1 100644
--- a/src/arch/x86/process.hh
+++ b/src/arch/x86/process.hh
@@ -135,9 +135,6 @@
void argsInit(int pageSize);
void initState() override;
- RegVal getSyscallArg(ThreadContext *tc, int &i) override;
- /// Explicitly import the otherwise hidden getSyscallArg
- using Process::getSyscallArg;
void clone(ThreadContext *old_tc, ThreadContext *new_tc,
Process *process, RegVal flags) override;
};
@@ -176,8 +173,6 @@
void argsInit(int pageSize);
void initState() override;
- RegVal getSyscallArg(ThreadContext *tc, int &i) override;
- RegVal getSyscallArg(ThreadContext *tc, int &i, int width)
override;
void clone(ThreadContext *old_tc, ThreadContext *new_tc,
Process *process, RegVal flags) override;
};
diff --git a/src/sim/process.cc b/src/sim/process.cc
index e7f682a..4c5814f 100644
--- a/src/sim/process.cc
+++ b/src/sim/process.cc
@@ -448,12 +448,6 @@
desc->doSyscall(callnum, tc, fault);
}
-RegVal
-Process::getSyscallArg(ThreadContext *tc, int &i, int width)
-{
- return getSyscallArg(tc, i);
-}
-
EmulatedDriver *
Process::findDriver(std::string filename)
{
diff --git a/src/sim/process.hh b/src/sim/process.hh
index 70be3ab..0f346aa 100644
--- a/src/sim/process.hh
+++ b/src/sim/process.hh
@@ -78,8 +78,6 @@
DrainState drain() override;
virtual void syscall(ThreadContext *tc, Fault *fault) = 0;
- virtual RegVal getSyscallArg(ThreadContext *tc, int &i) = 0;
- virtual RegVal getSyscallArg(ThreadContext *tc, int &i, int width);
virtual void setSyscallReturn(ThreadContext *tc,
SyscallReturn return_value) = 0;
virtual SyscallDesc *getDesc(int callnum) = 0;
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/23462
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I2f78420d8687da7530feb66784fe3e6d2357baf8
Gerrit-Change-Number: 23462
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <gabebl...@google.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev