Made the alpha setSyscallReturn take a ThreadContext pointer instead of a RegFile *.
authorGabe Black <gblack@eecs.umich.edu>
Wed, 6 Dec 2006 16:33:37 +0000 (11:33 -0500)
committerGabe Black <gblack@eecs.umich.edu>
Wed, 6 Dec 2006 16:33:37 +0000 (11:33 -0500)
--HG--
extra : convert_revision : 021a1fe6760df1daf6299d46060371a5310f008a

src/arch/alpha/syscallreturn.hh

index 88a6bf4997692e10c1122d899a2e395190605d1c..47b4ac8c7493f97c7abc7d4dec30b65d117686b8 100644 (file)
 #ifndef __ARCH_ALPHA_SYSCALLRETURN_HH__
 #define __ARCH_ALPHA_SYSCALLRETURN_HH__
 
+#include "cpu/thread_context.hh"
 #include "sim/syscallreturn.hh"
 
 namespace AlphaISA
 {
-    static inline void setSyscallReturn(SyscallReturn return_value, RegFile *regs)
+    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
-            regs->setIntReg(SyscallSuccessReg, 0);
-            regs->setIntReg(ReturnValueReg, return_value.value());
+            tc->setIntReg(SyscallSuccessReg, 0);
+            tc->setIntReg(ReturnValueReg, return_value.value());
         } else {
             // got an error, return details
-            regs->setIntReg(SyscallSuccessReg, (IntReg)-1);
-            regs->setIntReg(ReturnValueReg, -return_value.value());
+            tc->setIntReg(SyscallSuccessReg, (IntReg)-1);
+            tc->setIntReg(ReturnValueReg, -return_value.value());
         }
     }
 }