Andreas Sandberg has submitted this change and it was merged. (
https://gem5-review.googlesource.com/c/public/gem5/+/15417 )
Change subject: sim-se: Correctly calculate next PC in clone
......................................................................
sim-se: Correctly calculate next PC in clone
The clone syscall doesn't propagate all state in the PCState object
when calculating the return PC of a newly created process. Instead of
creating a new PCState object from the next PC address, copy the old
PC and advance it.
Change-Id: Ice53831920bcb5d198865169ed2cca8d06e37cfe
Signed-off-by: Andreas Sandberg <[email protected]>
Cc: Giacomo Travaglini <[email protected]>
Cc: Javier Setoain <[email protected]>
Cc: Brandon Potter <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/c/15417
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Brandon Potter <[email protected]>
---
M src/sim/syscall_emul.hh
1 file changed, 3 insertions(+), 1 deletion(-)
Approvals:
Jason Lowe-Power: Looks good to me, approved
Brandon Potter: Looks good to me, approved
diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh
index 1ff0460..8480c7e 100644
--- a/src/sim/syscall_emul.hh
+++ b/src/sim/syscall_emul.hh
@@ -1402,7 +1402,9 @@
ctc->setIntReg(TheISA::SyscallPseudoReturnReg, 1);
#endif
- ctc->pcState(tc->nextInstAddr());
+ TheISA::PCState cpc = tc->pcState();
+ cpc.advance();
+ ctc->pcState(cpc);
ctc->activate();
return cp->pid();
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/15417
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: Ice53831920bcb5d198865169ed2cca8d06e37cfe
Gerrit-Change-Number: 15417
Gerrit-PatchSet: 3
Gerrit-Owner: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Brandon Potter <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-CC: Giacomo Travaglini <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev