Use the setSyscallReturn defined in arch rather than duplicating it here.
authorGabe Black <gblack@eecs.umich.edu>
Wed, 6 Dec 2006 16:38:39 +0000 (11:38 -0500)
committerGabe Black <gblack@eecs.umich.edu>
Wed, 6 Dec 2006 16:38:39 +0000 (11:38 -0500)
--HG--
extra : convert_revision : 862ece59aa253b52b6744a0a76738d5ee19561b3

src/cpu/o3/mips/cpu_impl.hh

index 08e9ba483b87e470224348ffe9a4302594e0a0f2..e7dbd3aba6a8623e65da6ee7905f91d47906d577 100644 (file)
@@ -220,16 +220,6 @@ template <class Impl>
 void
 MipsO3CPU<Impl>::setSyscallReturn(SyscallReturn return_value, int tid)
 {
-    // check for error condition.
-    if (return_value.successful()) {
-        // no error
-        this->setArchIntReg(TheISA::SyscallSuccessReg, 0, tid);
-        this->setArchIntReg(TheISA::ReturnValueReg, return_value.value(), tid);
-    } else {
-        // got an error, return details
-        this->setArchIntReg(TheISA::SyscallSuccessReg,
-                (TheISA::IntReg) -1, tid);
-        this->setArchIntReg(TheISA::ReturnValueReg, -return_value.value(), tid);
-    }
+    TheISA::setSyscallReturn(return_value, this->tcBase(tid));
 }
 #endif