From: Guillermo J. Rozas Date: Sat, 8 Jan 1994 17:05:00 +0000 (+0000) Subject: Fix cache-flushing bugs manifested on the MIPS R4000: X-Git-Tag: 20090517-FFI~7334 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=7ce27e4627bcb6755d346cd41fc70ea31210b36b;p=mit-scheme.git Fix cache-flushing bugs manifested on the MIPS R4000: - PUSH_D_CACHE_REGION was being called at the wrong time. --- diff --git a/v7/src/microcode/fasload.c b/v7/src/microcode/fasload.c index 6c653380c..918506c61 100644 --- a/v7/src/microcode/fasload.c +++ b/v7/src/microcode/fasload.c @@ -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);