Change MIPS's setSyscallReturn to use a thread context.
authorGabe Black <gblack@eecs.umich.edu>
Wed, 6 Dec 2006 10:41:08 +0000 (05:41 -0500)
committerGabe Black <gblack@eecs.umich.edu>
Wed, 6 Dec 2006 10:41:08 +0000 (05:41 -0500)
--HG--
extra : convert_revision : 618f8404ec5380615e28170d761b2fcdf9c07d96

src/arch/mips/syscallreturn.hh

index 0d36b333037f55478861dd366cd7e27a836e9066..47290b634b5f853ab039d5762b2dcd3814c9f4f3 100644 (file)
 #define __ARCH_MIPS_SYSCALLRETURN_HH__
 
 #include "sim/syscallreturn.hh"
+#include "cpu/thread_context.hh"
 
 namespace MipsISA
 {
-    static inline void setSyscallReturn(SyscallReturn return_value, RegFile *regs)
+    static inline void setSyscallReturn(SyscallReturn return_value,
+            ThreadContext *tc)
     {
         if (return_value.successful()) {
             // no error
-            regs->setIntReg(SyscallSuccessReg, 0);
-            regs->setIntReg(ReturnValueReg1, return_value.value());
+            tc->setIntReg(SyscallSuccessReg, 0);
+            tc->setIntReg(ReturnValueReg1, return_value.value());
         } else {
             // got an error, return details
-            regs->setIntReg(SyscallSuccessReg, (IntReg) -1);
-            regs->setIntReg(ReturnValueReg1, -return_value.value());
+            tc->setIntReg(SyscallSuccessReg, (IntReg) -1);
+            tc->setIntReg(ReturnValueReg1, -return_value.value());
         }
     }
 }