fix MiscRegFile::readRegWithEffect, which neglected the MISCREGS.
authorLisa Hsu <hsul@eecs.umich.edu>
Wed, 13 Dec 2006 22:51:28 +0000 (17:51 -0500)
committerLisa Hsu <hsul@eecs.umich.edu>
Wed, 13 Dec 2006 22:51:28 +0000 (17:51 -0500)
--HG--
extra : convert_revision : 4fdffe01b8e63e24b97a2e4194c747e6cf5e25ba

src/arch/alpha/miscregfile.cc

index 962d4609fdcfe73797ddfb4f50db0c3bb12e2faf..67f6c98e473b693c569d93ffd23132dfb5603285 100644 (file)
@@ -89,12 +89,26 @@ namespace AlphaISA
     MiscReg
     MiscRegFile::readRegWithEffect(int misc_reg, ThreadContext *tc)
     {
+        switch(misc_reg) {
+          case MISCREG_FPCR:
+            return fpcr;
+          case MISCREG_UNIQ:
+            return uniq;
+          case MISCREG_LOCKFLAG:
+            return lock_flag;
+          case MISCREG_LOCKADDR:
+            return lock_addr;
+          case MISCREG_INTR:
+            return intr_flag;
 #if FULL_SYSTEM
-        return readIpr(misc_reg, tc);
+          default:
+            return readIpr(misc_reg, tc);
 #else
-        panic("No faulting misc regs in SE mode!");
-        return 0;
+          default:
+            panic("No faulting misc regs in SE mode!");
+            return 0;
 #endif
+        }
     }
 
     void