summaryrefslogtreecommitdiff
path: root/src/arch/power/process.cc
diff options
context:
space:
mode:
authorTimothy M. Jones <tjones1@inf.ed.ac.uk>2010-07-22 18:54:37 +0100
committerTimothy M. Jones <tjones1@inf.ed.ac.uk>2010-07-22 18:54:37 +0100
commit97d245278d4b4bee844c141c3b6f370e27f73a45 (patch)
tree530c5a892d889d6d6a45dbfbd90bd88500915175 /src/arch/power/process.cc
parent607f5198004934c115af7975812a2d69bd005f7e (diff)
downloadgem5-97d245278d4b4bee844c141c3b6f370e27f73a45.tar.xz
Power: The condition register should be set or cleared upon a system call
return to indicate success or failure.
Diffstat (limited to 'src/arch/power/process.cc')
-rw-r--r--src/arch/power/process.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/arch/power/process.cc b/src/arch/power/process.cc
index 92f993e4c..12b216e50 100644
--- a/src/arch/power/process.cc
+++ b/src/arch/power/process.cc
@@ -284,5 +284,12 @@ void
PowerLiveProcess::setSyscallReturn(ThreadContext *tc,
SyscallReturn return_value)
{
+ Cr cr = tc->readIntReg(INTREG_CR);
+ if (return_value.successful()) {
+ cr.cr0.so = 0;
+ } else {
+ cr.cr0.so = 1;
+ }
+ tc->setIntReg(INTREG_CR, cr);
tc->setIntReg(ReturnValueReg, return_value.value());
}