summaryrefslogtreecommitdiff
path: root/src/arch/power
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/power')
-rw-r--r--src/arch/power/linux/process.cc7
-rw-r--r--src/arch/power/linux/process.hh2
-rw-r--r--src/arch/power/process.cc4
-rw-r--r--src/arch/power/process.hh2
4 files changed, 8 insertions, 7 deletions
diff --git a/src/arch/power/linux/process.cc b/src/arch/power/linux/process.cc
index b03ccfc8c..504d0e334 100644
--- a/src/arch/power/linux/process.cc
+++ b/src/arch/power/linux/process.cc
@@ -52,7 +52,8 @@ static SyscallReturn
unameFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
ThreadContext *tc)
{
- TypedBufferArg<Linux::utsname> name(process->getSyscallArg(tc, 0));
+ int index = 0;
+ TypedBufferArg<Linux::utsname> name(process->getSyscallArg(tc, index));
strcpy(name->sysname, "Linux");
strcpy(name->nodename, "m5.eecs.umich.edu");
@@ -437,12 +438,12 @@ PowerLinuxProcess::startup()
}
PowerISA::IntReg
-PowerLinuxProcess::getSyscallArg(ThreadContext *tc, int i)
+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);
+ return tc->readIntReg(ArgumentReg0 + i++);
}
void
diff --git a/src/arch/power/linux/process.hh b/src/arch/power/linux/process.hh
index 78b0eef7f..db6759a77 100644
--- a/src/arch/power/linux/process.hh
+++ b/src/arch/power/linux/process.hh
@@ -46,7 +46,7 @@ class PowerLinuxProcess : public PowerLiveProcess
void startup();
- PowerISA::IntReg getSyscallArg(ThreadContext *tc, int i);
+ PowerISA::IntReg getSyscallArg(ThreadContext *tc, int &i);
void setSyscallArg(ThreadContext *tc, int i, PowerISA::IntReg val);
/// Array of syscall descriptors, indexed by call number.
diff --git a/src/arch/power/process.cc b/src/arch/power/process.cc
index 8828a1a93..92f993e4c 100644
--- a/src/arch/power/process.cc
+++ b/src/arch/power/process.cc
@@ -266,10 +266,10 @@ PowerLiveProcess::argsInit(int intSize, int pageSize)
}
PowerISA::IntReg
-PowerLiveProcess::getSyscallArg(ThreadContext *tc, int i)
+PowerLiveProcess::getSyscallArg(ThreadContext *tc, int &i)
{
assert(i < 5);
- return tc->readIntReg(ArgumentReg0 + i);
+ return tc->readIntReg(ArgumentReg0 + i++);
}
void
diff --git a/src/arch/power/process.hh b/src/arch/power/process.hh
index dae776c4c..ede75f05f 100644
--- a/src/arch/power/process.hh
+++ b/src/arch/power/process.hh
@@ -50,7 +50,7 @@ class PowerLiveProcess : public LiveProcess
public:
void argsInit(int intSize, int pageSize);
- PowerISA::IntReg getSyscallArg(ThreadContext *tc, int i);
+ PowerISA::IntReg getSyscallArg(ThreadContext *tc, int &i);
void setSyscallArg(ThreadContext *tc, int i, PowerISA::IntReg val);
void setSyscallReturn(ThreadContext *tc, SyscallReturn return_value);
};