summaryrefslogtreecommitdiff
path: root/src/arch/alpha/syscallreturn.hh
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2008-09-27 21:03:48 -0700
committerNathan Binkert <nate@binkert.org>2008-09-27 21:03:48 -0700
commitcf7ddd8e8ac92cf5b90cd89a028414dd782c645a (patch)
treefa29e1720ee26311b351d94bba7019ed8bbd7241 /src/arch/alpha/syscallreturn.hh
parent82f5723c7a8b245e1f60190a78b7fe383c2caf9b (diff)
downloadgem5-cf7ddd8e8ac92cf5b90cd89a028414dd782c645a.tar.xz
style: Make a style pass over the whole arch/alpha directory.
Diffstat (limited to 'src/arch/alpha/syscallreturn.hh')
-rw-r--r--src/arch/alpha/syscallreturn.hh35
1 files changed, 18 insertions, 17 deletions
diff --git a/src/arch/alpha/syscallreturn.hh b/src/arch/alpha/syscallreturn.hh
index 47b4ac8c7..776f34fbf 100644
--- a/src/arch/alpha/syscallreturn.hh
+++ b/src/arch/alpha/syscallreturn.hh
@@ -35,24 +35,25 @@
#include "cpu/thread_context.hh"
#include "sim/syscallreturn.hh"
-namespace AlphaISA
+namespace AlphaISA {
+
+static inline void
+setSyscallReturn(SyscallReturn return_value, ThreadContext *tc)
{
- static inline void setSyscallReturn(SyscallReturn return_value,
- ThreadContext * tc)
- {
- // check for error condition. Alpha syscall convention is to
- // indicate success/failure in reg a3 (r19) and put the
- // return value itself in the standard return value reg (v0).
- if (return_value.successful()) {
- // no error
- tc->setIntReg(SyscallSuccessReg, 0);
- tc->setIntReg(ReturnValueReg, return_value.value());
- } else {
- // got an error, return details
- tc->setIntReg(SyscallSuccessReg, (IntReg)-1);
- tc->setIntReg(ReturnValueReg, -return_value.value());
- }
+ // check for error condition. Alpha syscall convention is to
+ // indicate success/failure in reg a3 (r19) and put the
+ // return value itself in the standard return value reg (v0).
+ if (return_value.successful()) {
+ // no error
+ tc->setIntReg(SyscallSuccessReg, 0);
+ tc->setIntReg(ReturnValueReg, return_value.value());
+ } else {
+ // got an error, return details
+ tc->setIntReg(SyscallSuccessReg, (IntReg)-1);
+ tc->setIntReg(ReturnValueReg, -return_value.value());
}
}
-#endif
+} // namespace AlphaISA
+
+#endif // __ARCH_ALPHA_SYSCALLRETURN_HH__