From: Chris Hanson Date: Tue, 25 Jul 1989 08:46:06 +0000 (+0000) Subject: Alignment fixes. X-Git-Tag: 20090517-FFI~11943 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=db8388038237e0303d2c4104cebf0c4bd2bdd6c4;p=mit-scheme.git Alignment fixes. --- diff --git a/v7/src/microcode/bintopsb.c b/v7/src/microcode/bintopsb.c index ba5a7fab4..55e912010 100644 --- a/v7/src/microcode/bintopsb.c +++ b/v7/src/microcode/bintopsb.c @@ -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) } \ } +#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 */ /* 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", diff --git a/v7/src/microcode/fasload.c b/v7/src/microcode/fasload.c index ecc5bf436..25462cfc7 100644 --- a/v7/src/microcode/fasload.c +++ b/v7/src/microcode/fasload.c @@ -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(); diff --git a/v8/src/microcode/bintopsb.c b/v8/src/microcode/bintopsb.c index fece13dd0..ae53e6973 100644 --- a/v8/src/microcode/bintopsb.c +++ b/v8/src/microcode/bintopsb.c @@ -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) } \ } +#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 */ /* 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",