X86: Get rid of the unused getAllocator on the python base microop class.
[gem5.git] / src / arch / sparc / utility.hh
index 9a84a82b33da5a352de1f18537296ef2edaab93c..2b90593715449c995a6fd2185e188fa6f0b7449c 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "arch/sparc/faults.hh"
 #include "arch/sparc/isa_traits.hh"
+#include "arch/sparc/registers.hh"
 #include "arch/sparc/tlb.hh"
 #include "base/misc.hh"
 #include "base/bitfield.hh"
@@ -47,8 +48,8 @@ namespace SparcISA
     static inline bool
     inUserMode(ThreadContext *tc)
     {
-        return !(tc->readMiscRegNoEffect(MISCREG_PSTATE & (1 << 2)) ||
-                tc->readMiscRegNoEffect(MISCREG_HPSTATE & (1 << 2)));
+        return !((tc->readMiscRegNoEffect(MISCREG_PSTATE) & (1 << 2)) ||
+                 (tc->readMiscRegNoEffect(MISCREG_HPSTATE) & (1 << 2)));
     }
 
     inline bool isCallerSaveIntegerRegister(unsigned int reg) {
@@ -115,6 +116,10 @@ namespace SparcISA
 #endif
     }
 
+    void copyRegs(ThreadContext *src, ThreadContext *dest);
+
+    void copyMiscRegs(ThreadContext *src, ThreadContext *dest);
+
 } // namespace SparcISA
 
 #endif