Boris Shingarov has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/40945 )
Change subject: arch-power: Fix process initialization
..
arch-power: Fix process initialization
During process initialization, special purpose registers
should either be explicitly set or cleared. These contain
flag bits which might have unforseen side effects on the
execution of a program.
Change-Id: If7c5af9a93283a53717cc8cbba4bf373a7e40560
Signed-off-by: Sandipan Das
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40945
Reviewed-by: Boris Shingarov
Maintainer: Boris Shingarov
Tested-by: kokoro
---
M src/arch/power/process.cc
1 file changed, 4 insertions(+), 0 deletions(-)
Approvals:
Boris Shingarov: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/arch/power/process.cc b/src/arch/power/process.cc
index 8ac5946..27f7607 100644
--- a/src/arch/power/process.cc
+++ b/src/arch/power/process.cc
@@ -338,6 +338,10 @@
//Set the stack pointer register
tc->setIntReg(StackPointerReg, stack_min);
+//Reset the special-purpose registers
+for (int i = 0; i < NumIntSpecialRegs; i++)
+tc->setIntReg(NumIntArchRegs + i, 0);
+
//Set the machine status for a typical userspace
Msr msr = 0;
msr.sf = is64bit;
10 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the
submitted one.
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/40945
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: If7c5af9a93283a53717cc8cbba4bf373a7e40560
Gerrit-Change-Number: 40945
Gerrit-PatchSet: 12
Gerrit-Owner: Sandipan Das
Gerrit-Reviewer: Boris Shingarov
Gerrit-Reviewer: kokoro
Gerrit-MessageType: merged
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s