StaticInst: Fix decode cache initialization. Cache functionality was negated.
authorVincentius Robby <acolyte@umich.edu>
Sat, 4 Aug 2007 18:25:17 +0000 (14:25 -0400)
committerVincentius Robby <acolyte@umich.edu>
Sat, 4 Aug 2007 18:25:17 +0000 (14:25 -0400)
--HG--
extra : convert_revision : fe313718dba8236f3e9bceb49f8c5efccfc06a06

src/cpu/static_inst.hh

index f32b61ee5b3e2c470ec0bf00173d5202499daa23..2e1ebd76633a9dd08c5df5791859cef06adf0fe8 100644 (file)
@@ -353,9 +353,7 @@ class StaticInst : public StaticInstBase
     StaticInst(const char *_mnemonic, ExtMachInst _machInst, OpClass __opClass)
         : StaticInstBase(__opClass),
           machInst(_machInst), mnemonic(_mnemonic), cachedDisassembly(0)
-    {
-        memset(&recentDecodes, 0, 2 * sizeof(cacheElement));
-    }
+    { }
 
   public:
 
@@ -459,6 +457,9 @@ class StaticInst : public StaticInstBase
     struct cacheElement {
         Addr page_addr;
         AddrDecodePage *decodePage;
+
+        cacheElement()
+          :decodePage(NULL) { }
     } ;
 
     /// An array of recently decoded instructions.