Alignment fixes.
authorChris Hanson <org/chris-hanson/cph>
Tue, 25 Jul 1989 08:46:06 +0000 (08:46 +0000)
committerChris Hanson <org/chris-hanson/cph>
Tue, 25 Jul 1989 08:46:06 +0000 (08:46 +0000)
v7/src/microcode/bintopsb.c
v7/src/microcode/fasload.c
v8/src/microcode/bintopsb.c

index ba5a7fab42e4b0dacead57b21d2cafdddbf3365f..55e912010fdfd7991784989d15648367b07240ce 100644 (file)
@@ -30,7 +30,7 @@ Technology nor of any adaptation thereof in any advertising,
 promotional, or sales literature without prior written consent from
 MIT in each case. */
 
-/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/bintopsb.c,v 9.38 1989/07/02 05:12:25 cph Exp $
+/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/bintopsb.c,v 9.39 1989/07/25 08:46:06 cph Rel $
  *
  * This File contains the code to translate internal format binary
  * files to portable format.
@@ -231,6 +231,7 @@ print_a_char(c, name)
   NFlonums += 1;                                                       \
   *Old_Address++ = Make_Non_Pointer(TC_BROKEN_HEART, (Obj));           \
   (Obj) += 1;                                                          \
+  Align_Float(FObj);                                                   \
   *(FObj)++ = Make_Non_Pointer(TC_BIG_FLONUM, 0);                      \
   *((double *) (FObj)) = *((double *) Old_Address);                    \
   (FObj) += float_to_pointer;                                          \
@@ -690,6 +691,8 @@ print_a_flonum(val)
   }                                                                    \
 }
 \f
+#ifdef CMPGCFILE
+
 #define Do_Compiled_Entry(Code, Rel, Fre, Scn, Obj, FObj)              \
 {                                                                      \
   long offset;                                                         \
@@ -722,6 +725,18 @@ print_a_flonum(val)
     Copy_Vector(Scn, Fre);                                             \
   }                                                                    \
 }
+
+#else /* no CMPGCFILE */
+
+#define Do_Compiled_Entry(Code, Rel, Fre, Scn, Obj, FObj)              \
+{                                                                      \
+  fprintf(stderr,                                                      \
+         "%s: Invoking Do_Compiled_Entry with no compiler support!\n", \
+         program_name);                                                \
+  quit(1);                                                             \
+}
+
+#endif /* CMPGCFILE */
 \f
 /* Common Pointer Code */
 
@@ -1198,6 +1213,19 @@ print_external_objects(from, count)
        from += 1;
        break;
 
+#ifdef FLOATING_ALIGNMENT
+
+      case TC_MANIFEST_NM_VECTOR:
+        if ((OBJECT_DATUM(*from)) == 0)
+       {
+         from += 1;
+         count += 1;
+         break;
+       }
+        /* fall through */
+
+#endif /* FLOATING_ALIGNMENT */
+
       default:
        fprintf(stderr,
                "%s: Bad Object to print externally %lx\n",
index ecc5bf436c33f935a743d3ea99cfdb81e617e69a..25462cfc7ae840886c5418884d138119c080a085 100644 (file)
@@ -30,7 +30,7 @@ Technology nor of any adaptation thereof in any advertising,
 promotional, or sales literature without prior written consent from
 MIT in each case. */
 
-/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/fasload.c,v 9.41 1989/06/16 09:41:53 cph Exp $
+/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/fasload.c,v 9.42 1989/07/25 08:45:49 cph Rel $
 
    The "fast loader" which reads in and relocates binary files and then
    interns symbols.  It is called with one argument: the (character
@@ -115,12 +115,6 @@ read_file_end()
 {
   Pointer *table;
 
-#if false
-  /* Aligning Free here confuses the counters. */
-
-  Align_Float(Free);
-#endif
-
   if ((Load_Data(Heap_Count, ((char *) Free))) != Heap_Count)
   {
     Close_Dump_File();
@@ -147,12 +141,6 @@ read_file_end()
   NORMALIZE_REGION(((char *) table), Primitive_Table_Size);
   Free += Primitive_Table_Size;
 
-#if false
-  /* Same */
-  
-  Align_Float(Free);
-#endif
-
   if (Close_Dump_File())
   {
     return (table);
@@ -513,6 +501,7 @@ load_file(from_band_load)
 
   load_renumber_table = Free;
   Free += Primitive_Table_Length;
+  Align_Float(Free);
   Orig_Heap = Free;
   Orig_Constant = Free_Constant;
   primitive_table = read_file_end();
index fece13dd0ec52b979858ae79bad380fbc8b63240..ae53e6973877ed9c90197f780ab2dd3794c3708a 100644 (file)
@@ -30,7 +30,7 @@ Technology nor of any adaptation thereof in any advertising,
 promotional, or sales literature without prior written consent from
 MIT in each case. */
 
-/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/bintopsb.c,v 9.38 1989/07/02 05:12:25 cph Exp $
+/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/bintopsb.c,v 9.39 1989/07/25 08:46:06 cph Rel $
  *
  * This File contains the code to translate internal format binary
  * files to portable format.
@@ -231,6 +231,7 @@ print_a_char(c, name)
   NFlonums += 1;                                                       \
   *Old_Address++ = Make_Non_Pointer(TC_BROKEN_HEART, (Obj));           \
   (Obj) += 1;                                                          \
+  Align_Float(FObj);                                                   \
   *(FObj)++ = Make_Non_Pointer(TC_BIG_FLONUM, 0);                      \
   *((double *) (FObj)) = *((double *) Old_Address);                    \
   (FObj) += float_to_pointer;                                          \
@@ -690,6 +691,8 @@ print_a_flonum(val)
   }                                                                    \
 }
 \f
+#ifdef CMPGCFILE
+
 #define Do_Compiled_Entry(Code, Rel, Fre, Scn, Obj, FObj)              \
 {                                                                      \
   long offset;                                                         \
@@ -722,6 +725,18 @@ print_a_flonum(val)
     Copy_Vector(Scn, Fre);                                             \
   }                                                                    \
 }
+
+#else /* no CMPGCFILE */
+
+#define Do_Compiled_Entry(Code, Rel, Fre, Scn, Obj, FObj)              \
+{                                                                      \
+  fprintf(stderr,                                                      \
+         "%s: Invoking Do_Compiled_Entry with no compiler support!\n", \
+         program_name);                                                \
+  quit(1);                                                             \
+}
+
+#endif /* CMPGCFILE */
 \f
 /* Common Pointer Code */
 
@@ -1198,6 +1213,19 @@ print_external_objects(from, count)
        from += 1;
        break;
 
+#ifdef FLOATING_ALIGNMENT
+
+      case TC_MANIFEST_NM_VECTOR:
+        if ((OBJECT_DATUM(*from)) == 0)
+       {
+         from += 1;
+         count += 1;
+         break;
+       }
+        /* fall through */
+
+#endif /* FLOATING_ALIGNMENT */
+
       default:
        fprintf(stderr,
                "%s: Bad Object to print externally %lx\n",