Fix cache-flushing bugs manifested on the MIPS R4000:
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Sat, 8 Jan 1994 17:05:00 +0000 (17:05 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Sat, 8 Jan 1994 17:05:00 +0000 (17:05 +0000)
- PUSH_D_CACHE_REGION was being called at the wrong time.

v7/src/microcode/fasload.c

index 6c653380c0a2e5f15ba527bcc6b03642b46072bd..918506c61ab518c19be2031d0e8f3c5324557b9e 100644 (file)
@@ -1,8 +1,8 @@
 /* -*-C-*-
 
-$Id: fasload.c,v 9.79 1993/12/07 20:35:59 gjr Exp $
+$Id: fasload.c,v 9.80 1994/01/08 17:05:00 gjr Exp $
 
-Copyright (c) 1987-1993 Massachusetts Institute of Technology
+Copyright (c) 1987-1994 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -267,8 +267,6 @@ DEFUN (read_file_end, (mode, prim_table_ptr, c_code_table_ptr),
     (checksum_area (((unsigned long *) Free),
                    Heap_Count,
                    computed_checksum));
-  if ((dumped_interface_version != 0) && (Heap_Count != 0))
-    PUSH_D_CACHE_REGION (Free, Heap_Count);
   NORMALIZE_REGION(((char *) Free), Heap_Count);
   Free += Heap_Count;
 
@@ -283,8 +281,6 @@ DEFUN (read_file_end, (mode, prim_table_ptr, c_code_table_ptr),
     (checksum_area (((unsigned long *) Free_Constant),
                    Const_Count,
                    computed_checksum));
-  if ((dumped_interface_version != 0) && (Const_Count != 0))
-    PUSH_D_CACHE_REGION (Free_Constant, Const_Count);
   NORMALIZE_REGION (((char *) Free_Constant), Const_Count);
   Free_Constant += Const_Count;
   SET_CONSTANT_TOP ();
@@ -785,6 +781,14 @@ DEFUN (load_file, (mode), int mode)
     Intern_Block (Orig_Constant, Constant_End);
   }
 
+  if (dumped_interface_version != 0)
+  {
+    if (primitive_table != Orig_Heap)
+      PUSH_D_CACHE_REGION (Orig_Heap, (primitive_table - Orig_Heap));
+    if (Constant_End != Orig_Constant)
+      PUSH_D_CACHE_REGION (Orig_Constant, (Constant_End - Orig_Constant));
+  }
+
   FASLOAD_RELOCATE_HOOK (Orig_Heap, primitive_table,
                         Orig_Constant, Constant_End);
   RELOCATE_INTO (temp, Dumped_Object);