projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d995575
)
X86: return -return_value.value() on failure.
author
Gabe Black
<gblack@eecs.umich.edu>
Sun, 29 Jul 2007 08:27:34 +0000
(
01:27
-0700)
committer
Gabe Black
<gblack@eecs.umich.edu>
Sun, 29 Jul 2007 08:27:34 +0000
(
01:27
-0700)
--HG--
extra : convert_revision :
d8e1486ff075b2917be62a0008f83fd6c9e4c09a
src/arch/x86/syscallreturn.hh
patch
|
blob
|
history
diff --git
a/src/arch/x86/syscallreturn.hh
b/src/arch/x86/syscallreturn.hh
index 6a7fdba58285a112ac792264501aa7f8751c26d7..be9715d2124738a57bf778d772193c4a7b43ebc3 100644
(file)
--- a/
src/arch/x86/syscallreturn.hh
+++ b/
src/arch/x86/syscallreturn.hh
@@
-67,7
+67,11
@@
namespace X86ISA
static inline void setSyscallReturn(SyscallReturn return_value,
ThreadContext * tc)
{
- tc->setIntReg(INTREG_RAX, return_value.value());
+ if (return_value.successful()) {
+ tc->setIntReg(INTREG_RAX, return_value.value());
+ } else {
+ tc->setIntReg(INTREG_RAX, -return_value.value());
+ }
}
};