From 3a0a9c16a4ccaebd6423f4fe7870111c4dab25a8 Mon Sep 17 00:00:00 2001 From: William Harold Newman Date: Fri, 26 Jan 2001 23:27:52 +0000 Subject: [PATCH] 0.6.10.8: made Dan Barlow's proposed changes #1 and #4 (from his sbcl-devel message 2000-01-25).. #1: x86-validate.h stuff is no longer machine-dependent, so it is merged into validate.h. x86-validate.h goes away. #4: runtime.c calls arch_init() again (as in original CMU CL) --- src/runtime/arch.h | 4 ++++ src/runtime/linux-os.c | 2 +- src/runtime/runtime.c | 6 +++++- src/runtime/validate.h | 44 +++++++++++++++++++++----------------------- src/runtime/x86-assem.S | 3 +-- src/runtime/x86-validate.h | 16 ---------------- version.lisp-expr | 2 +- 7 files changed, 33 insertions(+), 44 deletions(-) delete mode 100644 src/runtime/x86-validate.h diff --git a/src/runtime/arch.h b/src/runtime/arch.h index 02a5d18..2d7c10a 100644 --- a/src/runtime/arch.h +++ b/src/runtime/arch.h @@ -15,7 +15,11 @@ #include "os.h" #include "signal.h" +/* Do anything we need to do when starting up the runtime environment + * on this architecture. */ extern void arch_init(void); + +/* FIXME: It would be good to document these too! */ extern void arch_skip_instruction(os_context_t*); extern boolean arch_pseudo_atomic_atomic(os_context_t*); extern void arch_set_pseudo_atomic_interrupted(os_context_t*); diff --git a/src/runtime/linux-os.c b/src/runtime/linux-os.c index def0b6a..6c185ae 100644 --- a/src/runtime/linux-os.c +++ b/src/runtime/linux-os.c @@ -40,7 +40,7 @@ #include #include -#include "x86-validate.h" +#include "validate.h" size_t os_vm_page_size; #if defined GENCGC diff --git a/src/runtime/runtime.c b/src/runtime/runtime.c index e4ce0d8..66f3d07 100644 --- a/src/runtime/runtime.c +++ b/src/runtime/runtime.c @@ -113,7 +113,7 @@ int main(int argc, char *argv[], char *envp[]) { /* the name of the core file we're to execute. Note that this is - * a malloc'ed string which must be freed eventually. */ + * a malloc'ed string which should be freed eventually. */ char *core = 0; /* other command line options */ @@ -122,7 +122,11 @@ main(int argc, char *argv[], char *envp[]) lispobj initial_function; + /* KLUDGE: os_vm_page_size is set by os_init(), and on some + * systems (e.g. Alpha) arch_init() needs need os_vm_page_size, so + * it must follow os_init(). -- WHN 2000-01-26 */ os_init(); + arch_init(); gc_init(); validate(); diff --git a/src/runtime/validate.h b/src/runtime/validate.h index 876d39b..5196d60 100644 --- a/src/runtime/validate.h +++ b/src/runtime/validate.h @@ -12,30 +12,28 @@ #if !defined(_INCLUDE_VALIDATE_H_) #define _INCLUDE_VALIDATE_H_ -#ifdef parisc -#include "hppa-validate.h" -#endif parisc - -#ifdef mips -#include "mips-validate.h" -#endif - -#ifdef ibmrt -#include "rt-validate.h" -#endif - -#ifdef sparc -#include "sparc-validate.h" -#endif - -#ifdef __i386__ -#include "x86-validate.h" -#endif - -#ifdef alpha -#include "alpha-validate.h" +/* constants derived from the fundamental constants in passed by GENESIS */ +#define BINDING_STACK_SIZE ( BINDING_STACK_END - BINDING_STACK_START) +#define CONTROL_STACK_SIZE ( CONTROL_STACK_END - CONTROL_STACK_START) +#define DYNAMIC_SPACE_SIZE ( DYNAMIC_SPACE_END - DYNAMIC_SPACE_START) +#define READ_ONLY_SPACE_SIZE (READ_ONLY_SPACE_END - READ_ONLY_SPACE_START) +#define STATIC_SPACE_SIZE ( STATIC_SPACE_END - STATIC_SPACE_START) + +#if !defined(LANGUAGE_ASSEMBLY) +extern void validate(void); #endif -extern void validate(void); +/* note for anyone trying to port an architecture's support files + * from CMU CL to SBCL: + * + * CMU CL had architecture-dependent header files included here to + * define memory map data: + * #ifdef __i386__ + * #include "x86-validate.h" + * #endif + * and so forth. In SBCL, the memory map data are defined at the Lisp + * level and stuffed into the sbcl.h file created by GENESIS, so + * there's no longer a need for an architecture-dependent header file + * of memory map data. */ #endif diff --git a/src/runtime/x86-assem.S b/src/runtime/x86-assem.S index b50fe16..5d77b3e 100644 --- a/src/runtime/x86-assem.S +++ b/src/runtime/x86-assem.S @@ -13,9 +13,8 @@ * files for more information. */ -#include "x86-validate.h" - #define LANGUAGE_ASSEMBLY +#include "validate.h" #include "sbcl.h" /* Minimize conditionalization for different OS naming schemes. */ diff --git a/src/runtime/x86-validate.h b/src/runtime/x86-validate.h deleted file mode 100644 index 6c4f268..0000000 --- a/src/runtime/x86-validate.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - * This software is part of the SBCL system. See the README file for - * more information. - * - * This software is derived from the CMU CL system, which was - * written at Carnegie Mellon University and released into the - * public domain. The software is in the public domain and is - * provided with absolutely no warranty. See the COPYING and CREDITS - * files for more information. - */ - -#define BINDING_STACK_SIZE ( BINDING_STACK_END - BINDING_STACK_START) -#define CONTROL_STACK_SIZE ( CONTROL_STACK_END - CONTROL_STACK_START) -#define DYNAMIC_SPACE_SIZE ( DYNAMIC_SPACE_END - DYNAMIC_SPACE_START) -#define READ_ONLY_SPACE_SIZE (READ_ONLY_SPACE_END - READ_ONLY_SPACE_START) -#define STATIC_SPACE_SIZE ( STATIC_SPACE_END - STATIC_SPACE_START) diff --git a/version.lisp-expr b/version.lisp-expr index 3d9d8a7..b256280 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -15,4 +15,4 @@ ;;; versions, and a string like "0.6.5.12" is used for versions which ;;; aren't released but correspond only to CVS tags or snapshots. -"0.6.10.7" +"0.6.10.8" -- 1.7.10.4