From 3863128a8aa478c4fe936439465ed5e20e2f077d Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sat, 8 Sep 1990 00:10:48 +0000 Subject: [PATCH] * Eliminate BELL, USHORT_SIZE, ULONG_SIZE, DBFLT_SIZE, UNSIGNED_SHIFT, FLONUM_EXPT_SIZE, FLONUM_MANTISSA_BITS, MAX_FLONUM_EXPONENT, quick. * Rename `Exit_Scheme' macros to upper case. * New macro UNSIGNED_SHIFT_BUG has opposite meaning of old UNSIGNED_SHIFT -- it says that the compiler uses arithmetic right shift on the `unsigned long' type. * Redo MIPS configuration to handle non-DEC machines. * Add configurations for i386 and NeXT. * Eliminate `term_type' definition -- HP's compiler no longer has this problem. * Change `FIXNUM_TO_LONG' to use more efficient conversion suggested by Aubrey Jaffer. --- v7/src/microcode/bitstr.c | 6 +- v7/src/microcode/boot.c | 6 +- v7/src/microcode/cmpintmd/hppa.h | 7 +- v7/src/microcode/cmpintmd/mc68k.h | 7 +- v7/src/microcode/cmpintmd/mips.h | 7 +- v7/src/microcode/config.h | 552 ++++++++++++------------------ v7/src/microcode/default.h | 18 +- v7/src/microcode/object.h | 31 +- v7/src/microcode/scheme.h | 4 +- v7/src/microcode/term.c | 4 +- v7/src/microcode/version.h | 4 +- v7/src/microcode/wsize.c | 23 +- v8/src/microcode/cmpintmd/hppa.h | 7 +- v8/src/microcode/object.h | 31 +- v8/src/microcode/version.h | 4 +- 15 files changed, 276 insertions(+), 435 deletions(-) diff --git a/v7/src/microcode/bitstr.c b/v7/src/microcode/bitstr.c index 2195f560c..39beb2464 100644 --- a/v7/src/microcode/bitstr.c +++ b/v7/src/microcode/bitstr.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/bitstr.c,v 9.44 1990/06/14 19:54:00 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/bitstr.c,v 9.45 1990/09/08 00:09:43 cph Exp $ Copyright (c) 1987, 1988, 1989, 1990 Massachusetts Institute of Technology @@ -627,8 +627,8 @@ long_significant_bits (number) { return ((number < 0) - ? ULONG_SIZE - : (count_significant_bits (number, (ULONG_SIZE - 1)))); + ? ((sizeof (long)) * CHAR_BIT) + : (count_significant_bits (number, (((sizeof (long)) * CHAR_BIT) - 1)))); } SCHEME_OBJECT diff --git a/v7/src/microcode/boot.c b/v7/src/microcode/boot.c index 3c9f9ae58..7e2fb9d01 100644 --- a/v7/src/microcode/boot.c +++ b/v7/src/microcode/boot.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/boot.c,v 9.62 1990/07/28 18:56:36 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/boot.c,v 9.63 1990/09/08 00:09:49 cph Exp $ Copyright (c) 1988, 1989, 1990 Massachusetts Institute of Technology @@ -292,7 +292,7 @@ DEFUN (find_image_parameters, (file_name, cold_load_p, supplied_p), /* Exit is done in a different way on some operating systems (eg. VMS) */ -Exit_Scheme_Declarations; +EXIT_SCHEME_DECLARATIONS; forward void Start_Scheme (); forward void Enter_Interpreter (); @@ -309,7 +309,7 @@ main (argc, argv) CONST char * file_name; extern void compiler_initialize (); - Init_Exit_Scheme(); + INIT_EXIT_SCHEME (); Saved_argc = argc; Saved_argv = argv; diff --git a/v7/src/microcode/cmpintmd/hppa.h b/v7/src/microcode/cmpintmd/hppa.h index bee2d3466..d0c09668d 100644 --- a/v7/src/microcode/cmpintmd/hppa.h +++ b/v7/src/microcode/cmpintmd/hppa.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/cmpintmd/hppa.h,v 1.16 1990/08/17 23:39:55 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/cmpintmd/hppa.h,v 1.17 1990/09/08 00:09:56 cph Exp $ Copyright (c) 1989, 1990 Massachusetts Institute of Technology @@ -702,8 +702,9 @@ do { \ #define FORMAT_WORD_LOW_BYTE(word) \ (SIGN_EXTEND_FIELD((((unsigned long) (word)) & 0xff), 8)) -#define FORMAT_WORD_HIGH_BYTE(word) \ - (SIGN_EXTEND_FIELD((((unsigned long) (word)) >> 8), (USHORT_SIZE - 8))) +#define FORMAT_WORD_HIGH_BYTE(word) \ + (SIGN_EXTEND_FIELD((((unsigned long) (word)) >> 8), \ + (((sizeof (format_word)) * CHAR_BIT) - 8))) #define COMPILED_ENTRY_FORMAT_HIGH(addr) \ (FORMAT_WORD_HIGH_BYTE(COMPILED_ENTRY_FORMAT_WORD(addr))) diff --git a/v7/src/microcode/cmpintmd/mc68k.h b/v7/src/microcode/cmpintmd/mc68k.h index c4a857116..70d57f344 100644 --- a/v7/src/microcode/cmpintmd/mc68k.h +++ b/v7/src/microcode/cmpintmd/mc68k.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/cmpintmd/mc68k.h,v 1.15 1990/06/28 18:15:30 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/cmpintmd/mc68k.h,v 1.16 1990/09/08 00:10:03 cph Exp $ Copyright (c) 1989, 1990 Massachusetts Institute of Technology @@ -466,8 +466,9 @@ mc68k_reset_hook () #define FORMAT_WORD_HIGH_BYTE(word) \ (SIGN_EXTEND_FIELD((((unsigned long) (word)) >> 8), \ (((sizeof (format_word)) * CHAR_BIT) - 8))) -#define FORMAT_WORD_HIGH_BYTE(word) \ - (SIGN_EXTEND_FIELD((((unsigned long) (word)) >> 8), (USHORT_SIZE - 8))) + +#define COMPILED_ENTRY_FORMAT_HIGH(addr) \ + (FORMAT_WORD_HIGH_BYTE(COMPILED_ENTRY_FORMAT_WORD(addr))) #define COMPILED_ENTRY_FORMAT_LOW(addr) \ (FORMAT_WORD_LOW_BYTE(COMPILED_ENTRY_FORMAT_WORD(addr))) diff --git a/v7/src/microcode/cmpintmd/mips.h b/v7/src/microcode/cmpintmd/mips.h index f096d6a3f..090d987da 100644 --- a/v7/src/microcode/cmpintmd/mips.h +++ b/v7/src/microcode/cmpintmd/mips.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/cmpintmd/mips.h,v 1.6 1990/08/17 23:28:46 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/cmpintmd/mips.h,v 1.7 1990/09/08 00:10:10 cph Rel $ Copyright (c) 1989, 1990 Massachusetts Institute of Technology @@ -524,8 +524,9 @@ do { \ #define FORMAT_WORD_LOW_BYTE(word) \ (SIGN_EXTEND_FIELD((((unsigned long) (word)) & 0xff), 8)) -#define FORMAT_WORD_HIGH_BYTE(word) \ - (SIGN_EXTEND_FIELD((((unsigned long) (word)) >> 8), (USHORT_SIZE - 8))) +#define FORMAT_WORD_HIGH_BYTE(word) \ + (SIGN_EXTEND_FIELD((((unsigned long) (word)) >> 8), \ + (((sizeof (format_word)) * CHAR_BIT) - 8))) #define COMPILED_ENTRY_FORMAT_HIGH(addr) \ (FORMAT_WORD_HIGH_BYTE(COMPILED_ENTRY_FORMAT_WORD(addr))) diff --git a/v7/src/microcode/config.h b/v7/src/microcode/config.h index 82feb4093..f475df1b7 100644 --- a/v7/src/microcode/config.h +++ b/v7/src/microcode/config.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/config.h,v 9.55 1990/06/20 17:39:15 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/config.h,v 9.56 1990/09/08 00:10:16 cph Exp $ Copyright (c) 1987, 1988, 1989, 1990 Massachusetts Institute of Technology @@ -65,7 +65,7 @@ MIT in each case. */ /* #define USE_STACKLETS */ #endif #endif - + /* Some configuration consistency testing */ #ifdef COMPILE_STEPPER @@ -89,15 +89,11 @@ typedef char Boolean; /* This is the Scheme object type; it should be called `SCHEME_OBJECT'. The various fields are defined in "object.h". */ typedef unsigned long SCHEME_OBJECT; - -/* This definition makes the value of `OBJECT_LENGTH' available to - the preprocessor. */ -#define OBJECT_LENGTH ULONG_SIZE +#define OBJECT_LENGTH (CHAR_BIT * (sizeof (unsigned long))) /* Operating System / Machine dependencies: - For each implementation, be sure to specify FASL_INTERNAL_FORMAT, - the various sizes, and the floating point information. + For each implementation, be sure to specify FASL_INTERNAL_FORMAT. Make sure that there is an appropriate FASL_. If there isn't, add one to the list below. @@ -115,76 +111,45 @@ typedef unsigned long SCHEME_OBJECT; CHAR_BIT is the size of a character in bits. - USHORT_SIZE is the size of an unsigned short in bits. It should - be equivalent to (sizeof(unsigned short) * CHAR_BIT), but is - available to the preprocessor. - - ULONG_SIZE is the size of an unsigned long in bits. - - ******** The following flonum constants have been superseded by the - use of "float.h". ******** - - FLONUM_EXPT_SIZE is the number of bits in the largest positive - exponent of a (double) floating point number. - Note that if excess exponents are used in the representation, - this number is one less than the size in bits of the exponent field. - - FLONUM_MANTISSA_BITS is the number of bits in the (positive) mantissa - of a (double) floating point number. It includes the hidden bit if - the representation uses them. - - Thus 2+FLONUM_EXPT_SIZE+FLONUM_MANTISSA_BITS(-1 if hidden bit is - used) should be no greater than the size in bits of a (double) - floating point number. Note that - MAX_FLONUM_EXPONENT = (2^FLONUM_EXPONENT_SIZE) - 1 - FLOATING_ALIGNMENT should be defined ONLY if the system requires floating point numbers (double) to be aligned more strictly than - SCHEME_OBJECTs (long). The value must be a mask of the low order - bits which are required to be zero for the storage address. For - example, a value of 0x7 requires octabyte alignment on a machine - where addresses are specified in bytes. The alignment must be an - integral multiple of the length of a long. + SCHEME_OBJECTs (unsigned long). The value must be a mask of the + low order bits which are required to be zero for the storage + address. For example, a value of 0x7 requires octabyte alignment + on a machine where addresses are specified in bytes. The alignment + must be an integral multiple of the length of a long. VAX_BYTE_ORDER should be defined ONLY if the least significant byte of a longword in memory lies at the lowest address, not defined - otherwise (ie. Motorola MC68020, with opposite convention, or - PDP-10 with word addressing). */ - -/* + otherwise (i.e. Motorola MC68020, with opposite convention, or + PDP-10 with word addressing). + Other flags (the safe option is NOT to define them, which will sacrifice speed for safety): - b32 should be defined for machines whose word size - (CHAR_BIT*sizeof(long)) is 32 bits. The information is redundant, - but some C compilers do not do constant folding when shifts are - involved, so it sometimes makes a big difference to define the - constants directly rather than in terms of other constants. - Similar things can be done for other word sizes. - HEAP_IN_LOW_MEMORY should be defined if malloc returns the lowest available memory and thus all addresses will fit in the datum portion of a Scheme object. The datum portion of a Scheme object is 8 bits less than the length of a C long. - UNSIGNED_SHIFT is defined if right shifting an unsigned long - (i.e. SCHEME_OBJECT) results in a logical (vs. arithmetic) shift. - Setting the flag allows faster type code extraction. + b32 says that objects are 32 bits long. The information is + redundant, but some C compilers do not do constant folding when + shifts are involved, so it sometimes makes a big difference to + define the constants directly rather than in terms of other + constants. Similar things can be done for other word sizes. - BELL is the character which rings the terminal bell. + The following switches say whether to use the system-provided + library routines rather than the emulated versions in the Scheme + sources. The library routines should be more accurate and probably + more efficient. - The following switches are used to use the system provided library - routines rather than the emulated versions in the Scheme sources. - The system provided ones should be more accurate and probably more - efficient. - - HAS_FLOOR should be defined if the system has the double precision + HAS_FLOOR should be defined if the system has the double-precision procedures floor and ceil. On Unix, look for floor(3M). - HAS_FREXP should be defined if the system has the double precision + HAS_FREXP should be defined if the system has the double-precision procedures ldexp and frexp. On Unix, look for frexp(3C). - HAS_MODF should be defined if the system has the double precision + HAS_MODF should be defined if the system has the double-precision procedure modf. On Unix, look for frexp(3C). **** This flag is new as of 22-SEP-89; please comment out any incorrect #define's as we haven't been able to test this on all machines. @@ -203,13 +168,9 @@ typedef unsigned long SCHEME_OBJECT; #define FASL_PDP10 1 #define FASL_VAX 2 #define FASL_68020 3 -#define FASL_HP_9000_300 FASL_68020 -#define FASL_SUN_3 FASL_68020 #define FASL_68000 4 -#define FASL_HP_9000_200 FASL_68000 -#define FASL_SUN_2 FASL_68000 #define FASL_HP_9000_500 5 -/* #define FASL_SUN 6 */ +#define FASL_I386 6 #define FASL_BFLY 7 #define FASL_CYBER 8 #define FASL_CELERITY 9 @@ -217,58 +178,18 @@ typedef unsigned long SCHEME_OBJECT; #define FASL_UMAX 11 #define FASL_PYR 12 #define FASL_ALLIANT 13 -#define FASL_SUN4 14 +#define FASL_SPARC 14 #define FASL_MIPS 15 -/* These (pdp10 and nu) haven't worked in a while. - * Should be upgraded or flushed some day. - */ - -#ifdef pdp10 -#define MACHINE_TYPE "pdp10" -#define HEAP_IN_LOW_MEMORY -#define CHAR_BIT 36 / * Ugh! Supposedly fixed in newer Cs * / -#define BELL '\007' -#define FASL_INTERNAL_FORMAT FASL_PDP10 -#endif - -#ifdef nu -#define MACHINE_TYPE "nu" -#define HEAP_IN_LOW_MEMORY -#define CHAR_BIT 8 -#define USHORT_SIZE 16 -#define ULONG_SIZE 32 -#define BELL '\007' -#define FASL_INTERNAL_FORMAT FASL_68000 -/* #define FLONUM_EXPT_SIZE 7 */ -/* #define FLONUM_MANTISSA_BITS 56 */ -/* #define MAX_FLONUM_EXPONENT 127 */ -#define HAS_FREXP -#ifdef quick -/* Bignum code fails for certain variables in registers because of a - compiler bug! -*/ -#undef quick -#define quick -#endif -#endif - #ifdef vax /* Amazingly unix and vms agree on all these */ #define MACHINE_TYPE "vax" -#define HEAP_IN_LOW_MEMORY -#define UNSIGNED_SHIFT -#define VAX_BYTE_ORDER -#define CHAR_BIT 8 -#define USHORT_SIZE 16 -#define ULONG_SIZE 32 -#define BELL '\007' #define FASL_INTERNAL_FORMAT FASL_VAX -/* #define FLONUM_EXPT_SIZE 7 */ -/* #define FLONUM_MANTISSA_BITS 56 D format */ -/* #define MAX_FLONUM_EXPONENT 127 */ +#define VAX_BYTE_ORDER +#define b32 +#define HEAP_IN_LOW_MEMORY #define HAS_FLOOR #define HAS_FREXP #define HAS_MODF @@ -294,95 +215,113 @@ typedef unsigned long SCHEME_OBJECT; /* This eliminates a spurious warning from the C compiler. */ #define main_type - -/* exit(0) produces horrible message on VMS */ +/* exit(0) produces horrible message on VMS */ #define NORMAL_EXIT 1 -#define Exit_Scheme_Declarations static jmp_buf Exit_Point +#define EXIT_SCHEME_DECLARATIONS static jmp_buf exit_scheme_jmp_buf -#define Init_Exit_Scheme() \ +#define INIT_EXIT_SCHEME() \ { \ - int Which_Way = setjmp(Exit_Point); \ - if (Which_Way == NORMAL_EXIT) \ + int which_way = (setjmp (exit_scheme_jmp_buf)); \ + if (which_way == NORMAL_EXIT) \ return; \ } -#define Exit_Scheme(value) \ -if (value != 0) \ - exit(value); \ -longjmp(Exit_Point, NORMAL_EXIT) +#define EXIT_SCHEME(value) \ +{ \ + if (value != 0) \ + exit (value); \ + longjmp (exit_scheme_jmp_buf, NORMAL_EXIT); \ +} -#else /* not VMS ie. unix */ +#else /* not vms */ /* Vax Unix C compiler bug */ #define HAVE_DOUBLE_TO_LONG_BUG -#endif /* VMS */ +#endif /* not vms */ #endif /* vax */ +#ifdef hpux + +#define HAS_FLOOR +#define HAS_FREXP +#define HAS_MODF + #ifdef hp9000s300 #define MACHINE_TYPE "hp9000s300" -#define HEAP_IN_LOW_MEMORY -#define UNSIGNED_SHIFT -#define CHAR_BIT 8 -#define USHORT_SIZE 16 -#define ULONG_SIZE 32 -#define BELL '\007' #ifdef MC68020 #define FASL_INTERNAL_FORMAT FASL_68020 -#else /* not MC68020 */ +#else #define FASL_INTERNAL_FORMAT FASL_68000 -#endif /* MC68020 */ -/* #define FLONUM_EXPT_SIZE 10 */ -/* #define FLONUM_MANTISSA_BITS 53 */ -/* #define MAX_FLONUM_EXPONENT 1023 */ -#define HAS_FLOOR -#define HAS_FREXP -#define HAS_MODF -/* C compiler bug in GC_Type */ -#define term_type int #endif +#define b32 +#define HEAP_IN_LOW_MEMORY +#endif /* hp9000s300 */ + +#ifdef hp9000s800 +#define MACHINE_TYPE "hp9000s800" +#define FASL_INTERNAL_FORMAT FASL_HP_SPECTRUM +#define FLOATING_ALIGNMENT 0x7 +#define b32 + +/* Heap resides in data space, pointed at by space register 5. + Short pointers must have their high two bits set to 01 so that + it is interpreted as space register 5, 2nd quadrant. + + This is kludged by the definitions below, and is still considered + HEAP_IN_LOW_MEMORY. */ + +#define HEAP_IN_LOW_MEMORY + +#define HPPA_QUAD_BIT 0x40000000 + +#define DATUM_TO_ADDRESS(datum) \ + ((SCHEME_OBJECT *) (((unsigned long) (datum)) | HPPA_QUAD_BIT)) + +#define ADDRESS_TO_DATUM(address) \ + ((SCHEME_OBJECT) (((unsigned long) (address)) & (~(HPPA_QUAD_BIT)))) + +/* HPPA compiled binaries are large! */ + +#ifdef HAS_COMPILER_SUPPORT +#ifndef CONSTANT_SIZE +#define CONSTANT_SIZE 600 /* Default Kcells for constant */ +#endif +#endif + +#ifndef COMPILER_CONSTANT_SIZE +#define COMPILER_CONSTANT_SIZE 1300 +#endif + +#endif /* hp9000s800 */ #ifdef hp9000s500 #define MACHINE_TYPE "hp9000s500" +#define FASL_INTERNAL_FORMAT FASL_HP_9000_500 +#define b32 + /* An unfortunate fact of life on this machine: the C heap is in high memory thus HEAP_IN_LOW_MEMORY is not - defined and the whole thing runs slowly. *Sigh* -*/ -#define UNSIGNED_SHIFT -#define CHAR_BIT 8 -#define USHORT_SIZE 16 -#define ULONG_SIZE 32 -#define BELL '\007' -#define FASL_INTERNAL_FORMAT FASL_HP_9000_500 -/* #define FLONUM_EXPT_SIZE 10 */ -/* #define FLONUM_MANTISSA_BITS 53 */ -/* #define MAX_FLONUM_EXPONENT 1023 */ -#define HAS_FLOOR -#define HAS_FREXP -#define HAS_MODF + defined and the whole thing runs slowly. */ /* C Compiler bug when constant folding and anchor pointing */ #define And2(x, y) ((x) ? (y) : false) #define And3(x, y, z) ((x) ? ((y) ? (z) : false) : false) #define Or2(x, y) ((x) ? true : (y)) #define Or3(x, y, z) ((x) ? true : ((y) ? true : (z))) -#endif + +#endif /* hp9000s500 */ + +#endif /* hpux */ -#ifdef sun4 +#ifdef sparc #define MACHINE_TYPE "sun4" +#define FASL_INTERNAL_FORMAT FASL_SPARC +#define FLOATING_ALIGNMENT 0x7 +#define b32 #define HEAP_IN_LOW_MEMORY -#define UNSIGNED_SHIFT -#define CHAR_BIT 8 -#define USHORT_SIZE 16 -#define ULONG_SIZE 32 -#define BELL '\007' -#define FASL_INTERNAL_FORMAT FASL_SUN4 -/* #define FLONUM_EXPT_SIZE 10 */ -/* #define FLONUM_MANTISSA_BITS 53 */ -/* #define MAX_FLONUM_EXPONENT 1023 */ -#define FLOATING_ALIGNMENT 0x7 /* Low 3 MBZ for float storage */ #define HAS_FLOOR #define HAS_FREXP #define HAS_MODF @@ -391,16 +330,9 @@ longjmp(Exit_Point, NORMAL_EXIT) #ifdef sun3 #define MACHINE_TYPE "sun3" -#define HEAP_IN_LOW_MEMORY -#define UNSIGNED_SHIFT -#define CHAR_BIT 8 -#define USHORT_SIZE 16 -#define ULONG_SIZE 32 -#define BELL '\007' #define FASL_INTERNAL_FORMAT FASL_68020 -/* #define FLONUM_EXPT_SIZE 10 */ -/* #define FLONUM_MANTISSA_BITS 53 */ -/* #define MAX_FLONUM_EXPONENT 1023 */ +#define b32 +#define HEAP_IN_LOW_MEMORY #define HAS_FLOOR #define HAS_FREXP #define HAS_MODF @@ -409,230 +341,186 @@ longjmp(Exit_Point, NORMAL_EXIT) #ifdef sun2 #define MACHINE_TYPE "sun2" -#define HEAP_IN_LOW_MEMORY -#define UNSIGNED_SHIFT -#define CHAR_BIT 8 -#define USHORT_SIZE 16 -#define ULONG_SIZE 32 -#define BELL '\007' #define FASL_INTERNAL_FORMAT FASL_68000 -/* #define FLONUM_EXPT_SIZE 10 */ -/* #define FLONUM_MANTISSA_BITS 53 */ -/* #define MAX_FLONUM_EXPONENT 1023 */ +#define b32 +#define HEAP_IN_LOW_MEMORY #define HAS_FLOOR #define HAS_FREXP #define HAS_MODF #define HAVE_DOUBLE_TO_LONG_BUG #endif +#ifdef NeXT +#define MACHINE_TYPE "next" +#define FASL_INTERNAL_FORMAT FASL_68020 +#define b32 +#define HEAP_IN_LOW_MEMORY +#define HAS_FLOOR +#define HAS_FREXP +#define HAS_MODF +#endif + #ifdef butterfly #define MACHINE_TYPE "butterfly" -#define HEAP_IN_LOW_MEMORY -#define CHAR_BIT 8 -#define USHORT_SIZE 16 -#define ULONG_SIZE 32 -#define BELL '\007' #define FASL_INTERNAL_FORMAT FASL_BFLY -/* #define FLONUM_EXPT_SIZE 7 */ -/* #define FLONUM_MANTISSA_BITS 56 */ -/* #define MAX_FLONUM_EXPONENT 127 */ +#define b32 +#define HEAP_IN_LOW_MEMORY #include #define HAS_FREXP #define HAS_MODF #define STACK_SIZE 4 /* 4K objects */ #endif - -#ifdef cyber180 -#define MACHINE_TYPE "cyber180" -/* Word size is 64 bits. */ -#define HEAP_IN_LOW_MEMORY -#define CHAR_BIT 8 -#define USHORT_SIZE ??? -#define ULONG_SIZE ??? -#define BELL '\007' -#define FASL_INTERNAL_FORMAT FASL_CYBER -/* #define FLONUM_EXPT_SIZE 14 */ -/* #define FLONUM_MANTISSA_BITS 48 */ -/* Not the full range, or so the manual says. */ -/* #define MAX_FLONUM_EXPONENT 4095 */ -/* The Cyber180 C compiler manifests a bug in hairy conditional - expressions */ -#define Conditional_Bug -#endif -#ifdef celerity -#define MACHINE_TYPE "celerity" +#ifdef i386 + +#define FASL_INTERNAL_FORMAT FASL_I386 +#define VAX_BYTE_ORDER +#define b32 + +#ifdef sequent +#define MACHINE_TYPE "sequent386" +#else /* not sequent */ +#ifdef sun +#define MACHINE_TYPE "sun386i" +#else /* not sun */ +#define MACHINE_TYPE "i386" +#endif /* not sun */ +#endif /* not sequent */ + +/* These are really OS-dependent. They are correct for the sequent, + but we don't know about any other 386 systems. */ #define HEAP_IN_LOW_MEMORY -#define UNSIGNED_SHIFT -#define CHAR_BIT 8 -#define USHORT_SIZE 16 -#define ULONG_SIZE 32 -#define BELL '\007' -#define FASL_INTERNAL_FORMAT FASL_CELERITY -/* #define FLONUM_EXPT_SIZE 11 */ -/* #define FLONUM_MANTISSA_BITS 53 */ -/* #define MAX_FLONUM_EXPONENT 2047 */ -#endif - -#ifdef hp9000s800 -#define MACHINE_TYPE "hp9000s800" -#define UNSIGNED_SHIFT -#define CHAR_BIT 8 -#define USHORT_SIZE 16 -#define ULONG_SIZE 32 -#define BELL '\007' -#define FASL_INTERNAL_FORMAT FASL_HP_SPECTRUM -/* #define FLONUM_EXPT_SIZE 10 */ -/* #define FLONUM_MANTISSA_BITS 53 */ -/* #define MAX_FLONUM_EXPONENT 1023 */ -#define FLOATING_ALIGNMENT 0x7 /* Low 3 MBZ for float storage */ #define HAS_FLOOR #define HAS_FREXP -#define HAS_MODF -/* Heap resides in data space, pointed at by space register 5. - Short pointers must have their high two bits set to 01 so that - it is interpreted as space register 5, 2nd quadrant. +#endif /* i386 */ + +#ifdef mips - This is kludged by the definitions below, and is still considered - HEAP_IN_LOW_MEMORY. - */ +#define MACHINE_TYPE "mips" +#define FASL_INTERNAL_FORMAT FASL_MIPS +#define FLOATING_ALIGNMENT 0x7 +#define b32 -#define HEAP_IN_LOW_MEMORY +#ifdef ultrix +#define VAX_BYTE_ORDER +#else +#ifdef MIPSEL +#define VAX_BYTE_ORDER +#endif +#endif -#define HPPA_QUAD_BIT 0x40000000 +/* Heap resides in data space which begins at 0x10000000. This is + kludged by the definitions below, and is still considered + HEAP_IN_LOW_MEMORY. */ + +#define HEAP_IN_LOW_MEMORY +#define MIPS_DATA_BIT 0x10000000 #define DATUM_TO_ADDRESS(datum) \ -((SCHEME_OBJECT *) (((unsigned long) (datum)) | HPPA_QUAD_BIT)) + ((SCHEME_OBJECT *) (((unsigned long) (datum)) | MIPS_DATA_BIT)) #define ADDRESS_TO_DATUM(address) \ -((SCHEME_OBJECT) (((unsigned long) (address)) & (~(HPPA_QUAD_BIT)))) + ((SCHEME_OBJECT) (((unsigned long) (address)) & (~(MIPS_DATA_BIT)))) -/* HPPA compiled binaries are large! */ +/* MIPS compiled binaries are large! */ #ifdef HAS_COMPILER_SUPPORT #ifndef CONSTANT_SIZE -#define CONSTANT_SIZE 600 /* Default Kcells for constant */ +#define CONSTANT_SIZE 700 /* Default Kcells for constant */ #endif #endif #ifndef COMPILER_CONSTANT_SIZE -#define COMPILER_CONSTANT_SIZE 1300 +#define COMPILER_CONSTANT_SIZE 1500 #endif -#endif /* hp9000s800 */ +#endif /* mips */ +/* These (pdp10 and nu) haven't worked in a while. + Should be upgraded or flushed some day. */ + +#ifdef pdp10 +#define MACHINE_TYPE "pdp10" +#define FASL_INTERNAL_FORMAT FASL_PDP10 +#define HEAP_IN_LOW_MEMORY +#define CHAR_BIT 36 / * Ugh! Supposedly fixed in newer Cs * / +#define UNSIGNED_SHIFT_BUG +#endif /* pdp10 */ + +#ifdef nu +#define MACHINE_TYPE "nu" +#define FASL_INTERNAL_FORMAT FASL_68000 +#define b32 +#define HEAP_IN_LOW_MEMORY +#define HAS_FREXP +#define UNSIGNED_SHIFT_BUG +#endif /* nu */ + +#ifdef cyber180 +#define MACHINE_TYPE "cyber180" +#define FASL_INTERNAL_FORMAT FASL_CYBER +#define HEAP_IN_LOW_MEMORY +#define UNSIGNED_SHIFT_BUG +/* The Cyber180 C compiler manifests a bug in hairy conditional expressions */ +#define Conditional_Bug +#endif /* cyber180 */ + +#ifdef celerity +#define MACHINE_TYPE "celerity" +#define FASL_INTERNAL_FORMAT FASL_CELERITY +#define b32 +#define HEAP_IN_LOW_MEMORY +#endif /* celerity */ + #ifdef umax #define MACHINE_TYPE "umax" -#define HEAP_IN_LOW_MEMORY -#define UNSIGNED_SHIFT -#define VAX_BYTE_ORDER -#define CHAR_BIT 8 -#define USHORT_SIZE 16 -#define ULONG_SIZE 32 -#define DBFLT_SIZE 64 -#define BELL '\007' #define FASL_INTERNAL_FORMAT FASL_UMAX -/* #define FLONUM_EXPT_SIZE 10 */ -/* #define FLONUM_MANTISSA_BITS 53 */ -/* #define MAX_FLONUM_EXPONENT 1023 */ +#define VAX_BYTE_ORDER +#define b32 +#define HEAP_IN_LOW_MEMORY #define HAS_FLOOR #define HAS_FREXP #define HAS_MODF -#endif +#endif /* umax */ #ifdef pyr #define MACHINE_TYPE "pyramid" -#define HEAP_IN_LOW_MEMORY -#define UNSIGNED_SHIFT -#define CHAR_BIT 8 -#define USHORT_SIZE 16 -#define ULONG_SIZE 32 -#define BELL '\007' #define FASL_INTERNAL_FORMAT FASL_PYR -/* #define FLONUM_EXPT_SIZE 10 */ -/* #define FLONUM_MANTISSA_BITS 53 */ -/* #define MAX_FLONUM_EXPONENT 1023 */ -#endif +#define b32 +#define HEAP_IN_LOW_MEMORY +#endif /* pyr */ #ifdef alliant #define MACHINE_TYPE "alliant" -#define HEAP_IN_LOW_MEMORY -#define UNSIGNED_SHIFT -#define CHAR_BIT 8 -#define USHORT_SIZE 16 -#define ULONG_SIZE 32 -#define BELL '\007' #define FASL_INTERNAL_FORMAT FASL_ALLIANT -/* #define FLONUM_EXPT_SIZE 10 */ -/* #define FLONUM_MANTISSA_BITS 53 */ -/* #define MAX_FLONUM_EXPONENT 1023 */ +#define b32 +#define HEAP_IN_LOW_MEMORY #define HAS_FLOOR #define HAS_FREXP #define HAS_MODF -#endif +#endif /* alliant */ -#ifdef mips -#define MACHINE_TYPE "MIPS (DECStation 3100)" -#define UNSIGNED_SHIFT -#define VAX_BYTE_ORDER -#define CHAR_BIT 8 -#define USHORT_SIZE 16 -#define ULONG_SIZE 32 -/* Flonum (double) size is 64 bits. */ -#define FLOATING_ALIGNMENT 0x7 -/* #define FLONUM_MANTISSA_BITS 53 */ -/* #define FLONUM_EXPT_SIZE 10 */ -/* #define MAX_FLONUM_EXPONENT 1023 */ -/* Floating point representation uses hidden bit. */ -#define FASL_INTERNAL_FORMAT FASL_MIPS -#define BELL '\007' - -/* Heap resides in data space which begins at 0x10000000. This is - kludged by the definitions below, and is still considered - HEAP_IN_LOW_MEMORY. -*/ - -#define HEAP_IN_LOW_MEMORY -#define MIPS_DATA_BIT 0x10000000 - -#define DATUM_TO_ADDRESS(datum) \ -((SCHEME_OBJECT *) (((unsigned long) (datum)) | MIPS_DATA_BIT)) - -#define ADDRESS_TO_DATUM(address) \ -((SCHEME_OBJECT) (((unsigned long) (address)) & (~(MIPS_DATA_BIT)))) - -/* MIPS compiled binaries are large! */ - -#ifdef HAS_COMPILER_SUPPORT -#ifndef CONSTANT_SIZE -#define CONSTANT_SIZE 700 /* Default Kcells for constant */ -#endif -#endif - -#ifndef COMPILER_CONSTANT_SIZE -#define COMPILER_CONSTANT_SIZE 1500 +/* Make sure that some definition applies. If this error occurs, and + the parameters of the configuration are unknown, try the Wsize + program. */ +#ifndef MACHINE_TYPE +#include "Error: config.h: Unknown configuration." #endif -#endif /* mips */ - -/* Make sure that some definition applies. - If this error occurs, and the parameters of the - configuration are unknown, try the Wsize program. -*/ - +/* Virtually all machines have 8-bit characters these days, so don't + explicitly specify this value unless it is different. */ #ifndef CHAR_BIT -#include "Error: config.h: Unknown configuration." +#define CHAR_BIT 8 #endif -#if (ULONG_SIZE == 32) -#define b32 +/* The GNU C compiler does not have any of these bugs. */ +#ifdef __GNUC__ +#undef HAVE_DOUBLE_TO_LONG_BUG +#undef UNSIGNED_SHIFT_BUG +#undef Conditional_Bug #endif -#ifndef MACHINE_TYPE -#define MACHINE_TYPE "unknown" -#endif - /* Default "segment" sizes */ #ifndef STACK_SIZE diff --git a/v7/src/microcode/default.h b/v7/src/microcode/default.h index a9c4f3981..433823fab 100644 --- a/v7/src/microcode/default.h +++ b/v7/src/microcode/default.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/default.h,v 9.33 1990/06/20 17:39:53 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/default.h,v 9.34 1990/09/08 00:10:25 cph Exp $ Copyright (c) 1988, 1989, 1990 Massachusetts Institute of Technology @@ -108,24 +108,20 @@ do \ #define main_type void #endif -#ifndef term_type -#define term_type void -#endif - #ifndef Command_Line_Hook #define Command_Line_Hook() #endif -#ifndef Exit_Scheme_Declarations -#define Exit_Scheme_Declarations +#ifndef EXIT_SCHEME_DECLARATIONS +#define EXIT_SCHEME_DECLARATIONS #endif -#ifndef Init_Exit_Scheme -#define Init_Exit_Scheme() +#ifndef INIT_EXIT_SCHEME +#define INIT_EXIT_SCHEME() #endif -#ifndef Exit_Scheme -#define Exit_Scheme exit +#ifndef EXIT_SCHEME +#define EXIT_SCHEME exit #endif /* Used in various places. */ diff --git a/v7/src/microcode/object.h b/v7/src/microcode/object.h index 15081d89f..c00fbc8e7 100644 --- a/v7/src/microcode/object.h +++ b/v7/src/microcode/object.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/object.h,v 9.34 1989/11/30 03:04:01 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/object.h,v 9.35 1990/09/08 00:10:33 cph Exp $ Copyright (c) 1987, 1988, 1989 Massachusetts Institute of Technology @@ -98,12 +98,12 @@ MIT in each case. */ /* Basic object structure */ #ifndef OBJECT_TYPE -#ifdef UNSIGNED_SHIFT +#ifdef UNSIGNED_SHIFT_BUG +/* This fixes bug in some compilers. */ +#define OBJECT_TYPE(object) (((object) >> DATUM_LENGTH) & MAX_TYPE_CODE) +#else /* Faster for logical shifts */ #define OBJECT_TYPE(object) ((object) >> DATUM_LENGTH) -#else -/* Portable version */ -#define OBJECT_TYPE(object) (((object) >> DATUM_LENGTH) & MAX_TYPE_CODE) #endif #endif @@ -387,26 +387,9 @@ extern SCHEME_OBJECT * memory_base; #define LONG_TO_FIXNUM_P(value) \ ((((value) & SIGN_MASK) == 0) || (((value) & SIGN_MASK) == SIGN_MASK)) -#if 0 -/* #ifdef __GNUC__ - Still doesn't compile correctly as of GCC 1.35! */ - #define FIXNUM_TO_LONG(fixnum) \ - ({ \ - long _temp = ((long) (OBJECT_DATUM (fixnum))); \ - (((_temp & FIXNUM_SIGN_BIT) != 0) \ - ? (_temp | (-1 << DATUM_LENGTH)) \ - : _temp); \ - }) - -#else - -#define FIXNUM_TO_LONG(fixnum) \ - ((FIXNUM_NEGATIVE_P (fixnum)) \ - ? (((long) (OBJECT_DATUM (fixnum))) | ((long) (-1 << DATUM_LENGTH))) \ - : ((long) (OBJECT_DATUM (fixnum)))) - -#endif + ((((long) (fixnum)) ^ ((long) FIXNUM_SIGN_BIT)) \ + - ((long) ((TC_FIXNUM << DATUM_LENGTH) | FIXNUM_SIGN_BIT))) #define FIXNUM_TO_DOUBLE(fixnum) ((double) (FIXNUM_TO_LONG (fixnum))) diff --git a/v7/src/microcode/scheme.h b/v7/src/microcode/scheme.h index 7834411bc..d7616a0ad 100644 --- a/v7/src/microcode/scheme.h +++ b/v7/src/microcode/scheme.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/scheme.h,v 9.32 1990/06/20 17:41:58 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/scheme.h,v 9.33 1990/09/08 00:10:39 cph Exp $ Copyright (c) 1987, 1988, 1989, 1990 Massachusetts Institute of Technology @@ -44,8 +44,6 @@ MIT in each case. */ #define fast register #endif -#define quick fast - #ifdef ENABLE_DEBUGGING_TOOLS #define Consistency_Check true #define ENABLE_PRIMITIVE_PROFILING diff --git a/v7/src/microcode/term.c b/v7/src/microcode/term.c index 6744e77d0..f05a679c3 100644 --- a/v7/src/microcode/term.c +++ b/v7/src/microcode/term.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/term.c,v 1.1 1990/06/20 19:38:53 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/term.c,v 1.2 1990/09/08 00:10:44 cph Exp $ Copyright (c) 1990 Massachusetts Institute of Technology @@ -104,7 +104,7 @@ DEFUN (termination_suffix, (code, value, abnormal_p), fflush (stdout); Reset_Memory (); EXIT_HOOK (); - Exit_Scheme (value); + EXIT_SCHEME (value); } static void diff --git a/v7/src/microcode/version.h b/v7/src/microcode/version.h index 70ef49f8a..4e4b48ba6 100644 --- a/v7/src/microcode/version.h +++ b/v7/src/microcode/version.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 11.42 1990/08/16 20:06:34 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 11.43 1990/09/08 00:10:48 cph Exp $ Copyright (c) 1988, 1989, 1990 Massachusetts Institute of Technology @@ -46,7 +46,7 @@ MIT in each case. */ #define VERSION 11 #endif #ifndef SUBVERSION -#define SUBVERSION 42 +#define SUBVERSION 43 #endif #ifndef UCODE_TABLES_FILENAME diff --git a/v7/src/microcode/wsize.c b/v7/src/microcode/wsize.c index 9bdb6352a..165eb3c5b 100644 --- a/v7/src/microcode/wsize.c +++ b/v7/src/microcode/wsize.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/wsize.c,v 9.29 1989/11/30 03:03:31 jinx Exp $ */ +/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/wsize.c,v 9.30 1990/09/08 00:09:38 cph Rel $ */ #include #include @@ -118,16 +118,14 @@ main() (((int) 'A') == ASCII_UPPER_A)) { printf("/%c The ASCII character set is used. %c/\n", '*', '*'); - printf("#define BELL '\\007'\n\n"); } else { printf("/%c The ASCII character set is NOT used. %c/\n", '*', '*'); printf("/%c REMINDER: Change the following definition! %c/\n", '*', '*'); - printf("#define BELL 'G'\n\n"); } - + for(bogus = ((unsigned) -1), count = 0; bogus != 0; count += 1) @@ -155,14 +153,14 @@ main() } to_be_shifted = -1; - if ((to_be_shifted >> 1) != to_be_shifted) + if ((to_be_shifted >> 1) == to_be_shifted) { - printf("#define UNSIGNED_SHIFT 1\n"); + printf("/%c unsigned longs use arithmetic shifting. %c/\n", '*', '*'); + printf("#define UNSIGNED_SHIFT_BUG\n"); } else { - printf("/%c unsigned longs use arithmetic shifting. %c/\n", - '*', '*'); + printf("/%c unsigned longs use logical shifting. %c/\n", '*', '*'); } if (sizeof(long) == sizeof(char)) @@ -192,15 +190,6 @@ main() printf("#define CHAR_BIT %d\n", char_size); - printf("#define USHORT_SIZE %d\n", - (sizeof(unsigned short) * char_size)); - - printf("#define ULONG_SIZE %d\n", - (sizeof(unsigned long) * char_size)); - - printf("#define DBFLT_SIZE %d\n\n", - double_size); - if (sizeof(struct double_probe) == (sizeof(double) + sizeof(long))) { printf("/%c Flonums have no special alignment constraints. %c/\n", diff --git a/v8/src/microcode/cmpintmd/hppa.h b/v8/src/microcode/cmpintmd/hppa.h index 654ee25f9..533c505b1 100644 --- a/v8/src/microcode/cmpintmd/hppa.h +++ b/v8/src/microcode/cmpintmd/hppa.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/cmpintmd/hppa.h,v 1.16 1990/08/17 23:39:55 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/cmpintmd/hppa.h,v 1.17 1990/09/08 00:09:56 cph Exp $ Copyright (c) 1989, 1990 Massachusetts Institute of Technology @@ -702,8 +702,9 @@ do { \ #define FORMAT_WORD_LOW_BYTE(word) \ (SIGN_EXTEND_FIELD((((unsigned long) (word)) & 0xff), 8)) -#define FORMAT_WORD_HIGH_BYTE(word) \ - (SIGN_EXTEND_FIELD((((unsigned long) (word)) >> 8), (USHORT_SIZE - 8))) +#define FORMAT_WORD_HIGH_BYTE(word) \ + (SIGN_EXTEND_FIELD((((unsigned long) (word)) >> 8), \ + (((sizeof (format_word)) * CHAR_BIT) - 8))) #define COMPILED_ENTRY_FORMAT_HIGH(addr) \ (FORMAT_WORD_HIGH_BYTE(COMPILED_ENTRY_FORMAT_WORD(addr))) diff --git a/v8/src/microcode/object.h b/v8/src/microcode/object.h index 930d37780..698d6d2b5 100644 --- a/v8/src/microcode/object.h +++ b/v8/src/microcode/object.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/object.h,v 9.34 1989/11/30 03:04:01 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/object.h,v 9.35 1990/09/08 00:10:33 cph Exp $ Copyright (c) 1987, 1988, 1989 Massachusetts Institute of Technology @@ -98,12 +98,12 @@ MIT in each case. */ /* Basic object structure */ #ifndef OBJECT_TYPE -#ifdef UNSIGNED_SHIFT +#ifdef UNSIGNED_SHIFT_BUG +/* This fixes bug in some compilers. */ +#define OBJECT_TYPE(object) (((object) >> DATUM_LENGTH) & MAX_TYPE_CODE) +#else /* Faster for logical shifts */ #define OBJECT_TYPE(object) ((object) >> DATUM_LENGTH) -#else -/* Portable version */ -#define OBJECT_TYPE(object) (((object) >> DATUM_LENGTH) & MAX_TYPE_CODE) #endif #endif @@ -387,26 +387,9 @@ extern SCHEME_OBJECT * memory_base; #define LONG_TO_FIXNUM_P(value) \ ((((value) & SIGN_MASK) == 0) || (((value) & SIGN_MASK) == SIGN_MASK)) -#if 0 -/* #ifdef __GNUC__ - Still doesn't compile correctly as of GCC 1.35! */ - #define FIXNUM_TO_LONG(fixnum) \ - ({ \ - long _temp = ((long) (OBJECT_DATUM (fixnum))); \ - (((_temp & FIXNUM_SIGN_BIT) != 0) \ - ? (_temp | (-1 << DATUM_LENGTH)) \ - : _temp); \ - }) - -#else - -#define FIXNUM_TO_LONG(fixnum) \ - ((FIXNUM_NEGATIVE_P (fixnum)) \ - ? (((long) (OBJECT_DATUM (fixnum))) | ((long) (-1 << DATUM_LENGTH))) \ - : ((long) (OBJECT_DATUM (fixnum)))) - -#endif + ((((long) (fixnum)) ^ ((long) FIXNUM_SIGN_BIT)) \ + - ((long) ((TC_FIXNUM << DATUM_LENGTH) | FIXNUM_SIGN_BIT))) #define FIXNUM_TO_DOUBLE(fixnum) ((double) (FIXNUM_TO_LONG (fixnum))) diff --git a/v8/src/microcode/version.h b/v8/src/microcode/version.h index a7aaa8191..b3c307cb2 100644 --- a/v8/src/microcode/version.h +++ b/v8/src/microcode/version.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 11.42 1990/08/16 20:06:34 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 11.43 1990/09/08 00:10:48 cph Exp $ Copyright (c) 1988, 1989, 1990 Massachusetts Institute of Technology @@ -46,7 +46,7 @@ MIT in each case. */ #define VERSION 11 #endif #ifndef SUBVERSION -#define SUBVERSION 42 +#define SUBVERSION 43 #endif #ifndef UCODE_TABLES_FILENAME -- 2.25.1