sparc,sim: Remove special handling of SPARC in the clone system call.

We can set the extra syscall return values in the ISA specific archClone
function. We don't need a special #ifdef to handle them.

Change-Id: I82904b3d4bdf211c89d271d7277a60151191cdfc
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34167
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Ciro Santilli <ciro.santilli@arm.com>
This commit is contained in:
Gabe Black
2020-09-06 19:03:12 -07:00
parent 43cbcd93ac
commit 007abdec6b
2 changed files with 5 additions and 5 deletions

View File

@@ -230,6 +230,11 @@ class SparcLinux : public Linux
if (stack)
ctc->setIntReg(SparcISA::StackPointerReg, stack);
// Set these extra values. Since "clone" doesn't return two values,
// we can set these and they won't be clobbered by the syscall ABI.
ptc->setIntReg(SparcISA::SyscallPseudoReturnReg, 0);
ctc->setIntReg(SparcISA::SyscallPseudoReturnReg, 1);
}
};

View File

@@ -1506,11 +1506,6 @@ cloneFunc(SyscallDesc *desc, ThreadContext *tc, RegVal flags, RegVal newStack,
desc->returnInto(ctc, 0);
#if THE_ISA == SPARC_ISA
tc->setIntReg(TheISA::SyscallPseudoReturnReg, 0);
ctc->setIntReg(TheISA::SyscallPseudoReturnReg, 1);
#endif
TheISA::PCState cpc = tc->pcState();
if (!p->kvmInSE)
cpc.advance();