summaryrefslogtreecommitdiff
path: root/src/arch/mips
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2019-11-24 23:17:58 -0800
committerGabe Black <gabeblack@google.com>2019-12-10 23:58:14 +0000
commit5e295bada66326a2d1a8e04bd4b21fea7c5b9c69 (patch)
tree483425b63b59c0d913d145ff28bcb9378d309aca /src/arch/mips
parent8bb10463f4a7483bb84d71a293e38c4a172f68fa (diff)
downloadgem5-5e295bada66326a2d1a8e04bd4b21fea7c5b9c69.tar.xz
arch: Stop using setSyscallArg to set argc and argv.
In Alpha and MIPS, the argc and argv values should be in what happens to be the first and second syscall argument registers, but that's not by definition. The process objects of both those ISAs know what registers to use intrinsically, so there's also no reason to call out to a helper method which acts as a part of the Process's interface to the rest of gem5. Jira Issue: https://gem5.atlassian.net/browse/GEM5-187 Change-Id: Id8fa38ab1fc2ac6436e94ad41303439973fded10 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23173 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/arch/mips')
-rw-r--r--src/arch/mips/process.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/arch/mips/process.cc b/src/arch/mips/process.cc
index ca4f79afd..2e66cac82 100644
--- a/src/arch/mips/process.cc
+++ b/src/arch/mips/process.cc
@@ -185,8 +185,8 @@ MipsProcess::argsInit(int pageSize)
ThreadContext *tc = system->getThreadContext(contextIds[0]);
- setSyscallArg(tc, 0, argc);
- setSyscallArg(tc, 1, argv_array_base);
+ tc->setIntReg(FirstArgumentReg, argc);
+ tc->setIntReg(FirstArgumentReg + 1, argv_array_base);
tc->setIntReg(StackPointerReg, memState->getStackMin());
tc->pcState(getStartPC());