changeset f133ba654050 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=f133ba654050
description:
        x86: logSize and lruSeq are now optional ckpt params

diffstat:

 src/arch/x86/pagetable.cc |  16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diffs (39 lines):

diff -r 09dcdb40b109 -r f133ba654050 src/arch/x86/pagetable.cc
--- a/src/arch/x86/pagetable.cc Tue Jul 10 22:51:54 2012 -0700
+++ b/src/arch/x86/pagetable.cc Tue Jul 10 22:51:54 2012 -0700
@@ -37,6 +37,7 @@
  * Authors: Gabe Black
  */
 
+#include <cmath>
 #include "arch/x86/isa_traits.hh"
 #include "arch/x86/pagetable.hh"
 #include "sim/serialize.hh"
@@ -69,14 +70,25 @@
 {
     UNSERIALIZE_SCALAR(paddr);
     UNSERIALIZE_SCALAR(vaddr);
-    UNSERIALIZE_SCALAR(logBytes);
+    //
+    // The logBytes scalar variable replaced the previous size variable.
+    // The following code maintains backwards compatibility with previous
+    // checkpoints using the old size variable.
+    //
+    if (UNSERIALIZE_OPT_SCALAR(logBytes) == false) {
+        int size;
+        UNSERIALIZE_SCALAR(size);
+        logBytes = log2(size);
+    }
     UNSERIALIZE_SCALAR(writable);
     UNSERIALIZE_SCALAR(user);
     UNSERIALIZE_SCALAR(uncacheable);
     UNSERIALIZE_SCALAR(global);
     UNSERIALIZE_SCALAR(patBit);
     UNSERIALIZE_SCALAR(noExec);
-    UNSERIALIZE_SCALAR(lruSeq);
+    if (UNSERIALIZE_OPT_SCALAR(lruSeq) == false) {
+        lruSeq = 0;
+    }
 }
 
 }
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to