summaryrefslogtreecommitdiff
path: root/src/arch/mips/utility.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/mips/utility.cc')
-rw-r--r--src/arch/mips/utility.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/arch/mips/utility.cc b/src/arch/mips/utility.cc
index 4723d6301..ac90ce45e 100644
--- a/src/arch/mips/utility.cc
+++ b/src/arch/mips/utility.cc
@@ -38,6 +38,7 @@
#include "base/misc.hh"
#if FULL_SYSTEM
+#include "arch/mips/registers.hh"
#include "arch/mips/vtophys.hh"
#include "mem/vport.hh"
#endif
@@ -52,16 +53,16 @@ uint64_t
getArgument(ThreadContext *tc, int number, bool fp)
{
#if FULL_SYSTEM
- if (number < NumArgumentRegs) {
+ if (number < 4) {
if (fp)
- return tc->readFloatRegBits(ArgumentReg[number]);
+ return tc->readFloatRegBits(FirstArgumentReg + number);
else
- return tc->readIntReg(ArgumentReg[number]);
+ return tc->readIntReg(FirstArgumentReg + number);
} else {
Addr sp = tc->readIntReg(StackPointerReg);
VirtualPort *vp = tc->getVirtPort();
uint64_t arg = vp->read<uint64_t>(sp +
- (number-NumArgumentRegs) * sizeof(uint64_t));
+ (number - 4) * sizeof(uint64_t));
return arg;
}
#else