0.8.3.78:
authorKevin Rosenberg <kevin@rosenberg.net>
Thu, 18 Sep 2003 21:09:08 +0000 (21:09 +0000)
committerKevin Rosenberg <kevin@rosenberg.net>
Thu, 18 Sep 2003 21:09:08 +0000 (21:09 +0000)
    * Initial changes to build on SuSE AMD64. Still need to port sb-bsd-sockets.

18 files changed:
NEWS
make-config.sh
src/runtime/Config.x86_64-linux [new file with mode: 0644]
src/runtime/backtrace.c
src/runtime/breakpoint.c
src/runtime/coreparse.c
src/runtime/dynbind.c
src/runtime/globals.h
src/runtime/interr.c
src/runtime/interrupt.c
src/runtime/ldso-stubs.S
src/runtime/linux-os.c
src/runtime/monitor.c
src/runtime/parse.c
src/runtime/purify.c
src/runtime/undefineds.h
src/runtime/validate.h
version.lisp-expr

diff --git a/NEWS b/NEWS
index ab18811..05c1438 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2084,6 +2084,7 @@ changes in sbcl-0.8.4 relative to sbcl-0.8.3:
        an error during type derivation.
     ** bignum multiplication on the Alpha platform now returns the
        right answer.
+  * builds on SuSE AMD64, although still generates a 32-bit binary.
 
 planned incompatible changes in 0.8.x:
   * (not done yet, but planned:) When the profiling interface settles
index 625ec6f..36ed8b2 100644 (file)
@@ -30,7 +30,7 @@ printf '(' >> $ltf
 
 echo //guessing default target CPU architecture from host architecture
 case `uname -m` in 
-    *86) guessed_sbcl_arch=x86 ;; 
+    *86|x86_64) guessed_sbcl_arch=x86 ;; 
     [Aa]lpha) guessed_sbcl_arch=alpha ;;
     sparc*) guessed_sbcl_arch=sparc ;;
     sun*) guessed_sbcl_arch=sparc ;;
@@ -95,7 +95,11 @@ ln -s $sbcl_arch-lispregs.h target-lispregs.h
 case `uname` in 
     Linux)
        printf ' :linux' >> $ltf
-       ln -s Config.$sbcl_arch-linux Config
+       if [ "`uname -m`" = "x86_64" ]; then
+           ln -s Config.x86_64-linux Config
+       else
+           ln -s Config.$sbcl_arch-linux Config
+       fi
        ln -s $sbcl_arch-linux-os.h target-arch-os.h
        ln -s linux-os.h target-os.h
        ;;
diff --git a/src/runtime/Config.x86_64-linux b/src/runtime/Config.x86_64-linux
new file mode 100644 (file)
index 0000000..7fefc14
--- /dev/null
@@ -0,0 +1,15 @@
+# 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.
+
+include Config.x86-linux
+
+# Until a 64-bit port is written, tell the compiler to use 32-bit mode
+
+CFLAGS += -m32
+OS_LINK_FLAGS += -m32
index ae5f1f9..2b78c6a 100644 (file)
@@ -28,7 +28,7 @@
 #include "genesis/primitive-objects.h"
 #include "thread.h"
 
-#ifndef __i386__
+#ifndef LISP_FEATURE_X86
 
 /* KLUDGE: Sigh ... I know what the call frame looks like and it had
  * better not change. */
index 5ff8509..7aeb14b 100644 (file)
@@ -26,7 +26,7 @@
 #include "genesis/fdefn.h"
 
 #define REAL_LRA_SLOT 0
-#ifndef __i386__
+#ifndef LISP_FEATURE_X86
 #define KNOWN_RETURN_P_SLOT 1
 #define BOGUS_LRA_CONSTANTS 2
 #else
@@ -71,7 +71,7 @@ void breakpoint_do_displaced_inst(os_context_t* context,
     arch_do_displaced_inst(context, orig_inst);
 }
 
-#ifndef __i386__
+#ifndef LISP_FEATURE_X86
 static lispobj find_code(os_context_t *context)
 {
 #ifdef reg_CODE
@@ -93,7 +93,7 @@ static lispobj find_code(os_context_t *context)
 }
 #endif
 
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
 static lispobj find_code(os_context_t *context)
 {
     lispobj codeptr =
@@ -137,7 +137,7 @@ static int compute_offset(os_context_t *context, lispobj code)
  * tried.  The sigprocmask() call would work just as well on alpha as it
  * presumably does on x86   -dan 2001.08.10
  */
-#ifndef __i386__
+#ifndef LISP_FEATURE_X86
 void handle_breakpoint(int signal, siginfo_t *info, os_context_t *context)
 {
     lispobj code;
@@ -175,7 +175,7 @@ void handle_breakpoint(int signal, siginfo_t* info, os_context_t *context)
 }
 #endif
 
-#ifndef __i386__
+#ifndef LISP_FEATURE_X86
 void *handle_fun_end_breakpoint(int signal, siginfo_t *info,
                                os_context_t *context)
 {
index 65fdc12..6ac74ba 100644 (file)
@@ -90,7 +90,7 @@ process_directory(int fd, u32 *ptr, int count)
            }
 #endif
 /* FIXME: Should the conditional here be reg_ALLOC instead of
- *   defined(__i386__)
+ *   defined(LISP_FEATURE_X86)
  * ? */
 #if defined(LISP_FEATURE_X86)
            SetSymbolValue(ALLOCATION_POINTER, (lispobj)free_pointer,0);
index 5f26c2a..7b410c3 100644 (file)
@@ -22,7 +22,7 @@
 #include "genesis/binding.h"
 #include "genesis/thread.h"
 
-#if defined(__i386__)
+#if defined(LISP_FEATURE_X86)
 #define GetBSP() ((struct binding *)SymbolValue(BINDING_STACK_POINTER,thread))
 #define SetBSP(value) SetSymbolValue(BINDING_STACK_POINTER, (lispobj)(value),thread)
 #else
index 7a6b59f..2064f6f 100644 (file)
@@ -23,11 +23,11 @@ extern boolean stop_the_world;
 
 extern lispobj *current_control_stack_pointer;
 extern lispobj *current_control_frame_pointer;
-#if !defined(__i386__)
+#if !defined(LISP_FEATURE_X86)
 extern lispobj *current_binding_stack_pointer;
 #endif
 
-#if !defined(__i386__)
+#if !defined(LISP_FEATURE_X86)
 /* FIXME: Why doesn't the x86 need this? */
 extern lispobj *dynamic_space_free_pointer;
 extern lispobj *current_auto_gc_trigger;
@@ -65,7 +65,7 @@ extern void globals_init(void);
 #define EXTERN(name,bytes) .globl name 
 #endif
 #endif
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
 #ifdef __linux__
 /* I'm very dubious about this.  Linux hasn't used _ on external names
  * since ELF became prevalent - i.e. about 1996, on x86    -dan 20010125 */
index cb46573..7de06f0 100644 (file)
@@ -114,7 +114,7 @@ describe_internal_error(os_context_t *context)
 
        case sc_BaseCharReg:
            ch = *os_context_register_addr(context, offset);
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
            if (offset&1)
                ch = ch>>8;
            ch = ch & 0xff;
index 8ee462e..7b46652 100644 (file)
@@ -327,7 +327,7 @@ interrupt_handle_now(int signal, siginfo_t *info, void *void_context)
 {
     os_context_t *context = (os_context_t*)void_context;
     struct thread *thread=arch_os_get_current_thread();
-#ifndef __i386__
+#ifndef LISP_FEATURE_X86
     boolean were_in_lisp;
 #endif
     union interrupt_handler handler;
@@ -344,7 +344,7 @@ interrupt_handle_now(int signal, siginfo_t *info, void *void_context)
        return;
     }
     
-#ifndef __i386__
+#ifndef LISP_FEATURE_X86
     were_in_lisp = !foreign_function_call_active;
     if (were_in_lisp)
 #endif
@@ -403,7 +403,7 @@ interrupt_handle_now(int signal, siginfo_t *info, void *void_context)
         (*handler.c)(signal, info, void_context);
     }
 
-#ifndef __i386__
+#ifndef LISP_FEATURE_X86
     if (were_in_lisp)
 #endif
     {
@@ -445,7 +445,7 @@ maybe_defer_handler(void *handler, struct interrupt_data *data,
      * actually use its argument for anything on x86, so this branch
      * may succeed even when context is null (gencgc alloc()) */
     if (
-#ifndef __i386__
+#ifndef LISP_FEATURE_X86
        (!foreign_function_call_active) &&
 #endif
        arch_pseudo_atomic_atomic(context)) {
index 73ef19f..64e721e 100644 (file)
@@ -220,7 +220,7 @@ ldso_stub__ ## fct: ;                           \
  * Note: There might be some other functions in this category as well.
  * E.g. I notice tanh() and acos() in the list above.. -- WHN 2001-06-07
  */
-#if !defined __i386__
+#if !defined LISP_FEATURE_X86
  LDSO_STUBIFY(sin)
  LDSO_STUBIFY(cos) 
  LDSO_STUBIFY(tan)      
index ea2f1b0..1256cd9 100644 (file)
@@ -84,7 +84,7 @@ void os_init(void)
 
     os_vm_page_size = getpagesize();
     /* This could just as well be in arch_init(), but it's not. */
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
     /* FIXME: This used to be here.  However, I have just removed it
        with no apparent ill effects (it may be that earlier kernels
        started up a process with a different set of traps, or
index 5d08022..9bddfec 100644 (file)
@@ -176,17 +176,17 @@ regs_cmd(char **ptr)
 {
     printf("CSP\t=\t0x%08lX\n", (unsigned long)current_control_stack_pointer);
     printf("FP\t=\t0x%08lX\n", (unsigned long)current_control_frame_pointer);
-#if !defined(__i386__)
+#if !defined(LISP_FEATURE_X86)
     printf("BSP\t=\t0x%08X\n", (unsigned long)current_binding_stack_pointer);
 #endif
 #if 0
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
     printf("BSP\t=\t0x%08lx\n",
           (unsigned long)SymbolValue(BINDING_STACK_POINTER));
 #endif
 
     printf("DYNAMIC\t=\t0x%08lx\n", (unsigned long)DYNAMIC_SPACE_START);
-#if defined(__i386__)
+#if defined(LISP_FEATURE_X86)
     printf("ALLOC\t=\t0x%08lx\n",
           (unsigned long)SymbolValue(ALLOCATION_POINTER));
 #else
@@ -319,7 +319,7 @@ print_context(os_context_t *context)
 
     for (i = 0; i < NREGS; i++) {
        printf("%s:\t", lisp_register_names[i]);
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
        brief_print((lispobj)(*os_context_register_addr(context,
                                                        i*2)));
 #else
@@ -393,7 +393,7 @@ catchers_cmd(char **ptr)
         printf("There are no active catchers!\n");
     else {
         while (catch != NULL) {
-#ifndef __i386__
+#ifndef LISP_FEATURE_X86
             printf("0x%08lX:\n\tuwp: 0x%08lX\n\tfp: 0x%08lX\n\tcode: 0x%08lx\n\tentry: 0x%08lx\n\ttag: ",
                   (unsigned long)catch, (unsigned long)(catch->current_uwp),
                   (unsigned long)(catch->current_cont),
index 61d8a24..8a2d9e3 100644 (file)
@@ -258,7 +258,7 @@ static boolean lookup_symbol(char *name, lispobj *result)
 
     /* Search dynamic space. */
     headerptr = (lispobj *)DYNAMIC_SPACE_START;
-#if !defined(__i386__)
+#if !defined(LISP_FEATURE_X86)
     count =
        dynamic_space_free_pointer -
        (lispobj *)DYNAMIC_SPACE_START;
@@ -295,7 +295,7 @@ parse_regnum(char *s)
 
        for (i = 0; i < NREGS ; i++)
            if (strcasecmp(s + 1, lisp_register_names[i]) == 0)
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
                return i*2;
 #else
        return i;
index f841573..15f54eb 100644 (file)
@@ -39,7 +39,7 @@
 
 #define PRINTNOISE
 
-#if defined(__i386__)
+#if defined(LISP_FEATURE_X86)
 /* again, what's so special about the x86 that this is differently
  * visible there than on other platforms? -dan 20010125 
  */
@@ -105,7 +105,7 @@ forwarding_pointer_p(lispobj obj)
 static boolean
 dynamic_pointer_p(lispobj ptr)
 {
-#ifndef __i386__
+#ifndef LISP_FEATURE_X86
     return (ptr >= (lispobj)current_dynamic_space
            &&
            ptr < (lispobj)dynamic_space_free_pointer);
@@ -118,7 +118,7 @@ dynamic_pointer_p(lispobj ptr)
 }
 
 \f
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
 
 #ifdef LISP_FEATURE_GENCGC
 /*
@@ -619,7 +619,7 @@ ptrans_vector(lispobj thing, int bits, int extra,
     return result;
 }
 
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
 static void
 apply_code_fixups_during_purify(struct code *old_code, struct code *new_code)
 {
@@ -758,13 +758,13 @@ ptrans_code(lispobj thing)
         gc_assert(lowtag_of(func) == FUN_POINTER_LOWTAG);
         gc_assert(!dynamic_pointer_p(func));
 
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
        /* Temporarly convert the self pointer to a real function pointer. */
        ((struct simple_fun *)native_pointer(func))->self
            -= FUN_RAW_ADDR_OFFSET;
 #endif
         pscav(&((struct simple_fun *)native_pointer(func))->self, 2, 1);
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
        ((struct simple_fun *)native_pointer(func))->self
            += FUN_RAW_ADDR_OFFSET;
 #endif
@@ -993,7 +993,7 @@ ptrans_otherptr(lispobj thing, lispobj header, boolean constant)
 
 #ifdef SIMPLE_ARRAY_LONG_FLOAT_WIDETAG
       case SIMPLE_ARRAY_LONG_FLOAT_WIDETAG:
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
         return ptrans_vector(thing, 96, 0, 0, constant);
 #endif
 #ifdef sparc
@@ -1013,7 +1013,7 @@ ptrans_otherptr(lispobj thing, lispobj header, boolean constant)
 
 #ifdef SIMPLE_ARRAY_COMPLEX_LONG_FLOAT_WIDETAG
       case SIMPLE_ARRAY_COMPLEX_LONG_FLOAT_WIDETAG:
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
         return ptrans_vector(thing, 192, 0, 0, constant);
 #endif
 #ifdef sparc
@@ -1050,7 +1050,7 @@ pscav_fdefn(struct fdefn *fdefn)
     return sizeof(struct fdefn) / sizeof(lispobj);
 }
 
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
 /* now putting code objects in static space */
 static int
 pscav_code(struct code*code)
@@ -1073,14 +1073,14 @@ pscav_code(struct code*code)
         gc_assert(lowtag_of(func) == FUN_POINTER_LOWTAG);
         gc_assert(!dynamic_pointer_p(func));
 
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
        /* Temporarily convert the self pointer to a real function
         * pointer. */
        ((struct simple_fun *)native_pointer(func))->self
            -= FUN_RAW_ADDR_OFFSET;
 #endif
         pscav(&((struct simple_fun *)native_pointer(func))->self, 2, 1);
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
        ((struct simple_fun *)native_pointer(func))->self
            += FUN_RAW_ADDR_OFFSET;
 #endif
@@ -1231,7 +1231,7 @@ pscav(lispobj *addr, int nwords, boolean constant)
 #ifdef SIMPLE_ARRAY_LONG_FLOAT_WIDETAG
               case SIMPLE_ARRAY_LONG_FLOAT_WIDETAG:
                 vector = (struct vector *)addr;
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
                 count = fixnum_value(vector->length)*3+2;
 #endif
 #ifdef sparc
@@ -1250,7 +1250,7 @@ pscav(lispobj *addr, int nwords, boolean constant)
 #ifdef SIMPLE_ARRAY_COMPLEX_LONG_FLOAT_WIDETAG
               case SIMPLE_ARRAY_COMPLEX_LONG_FLOAT_WIDETAG:
                 vector = (struct vector *)addr;
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
                 count = fixnum_value(vector->length)*6+2;
 #endif
 #ifdef sparc
@@ -1260,7 +1260,7 @@ pscav(lispobj *addr, int nwords, boolean constant)
 #endif
 
               case CODE_HEADER_WIDETAG:
-#ifndef __i386__
+#ifndef LISP_FEATURE_X86
                 gc_abort(); /* no code headers in static space */
 #else
                count = pscav_code((struct code*)addr);
@@ -1275,7 +1275,7 @@ pscav(lispobj *addr, int nwords, boolean constant)
                 gc_abort();
                break;
 
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
              case CLOSURE_HEADER_WIDETAG:
              case FUNCALLABLE_INSTANCE_HEADER_WIDETAG:
                /* The function self pointer needs special care on the
@@ -1345,7 +1345,7 @@ purify(lispobj static_roots, lispobj read_only_roots)
         return 0;
     }
 
-#if defined(__i386__)
+#if defined(LISP_FEATURE_X86)
     dynamic_space_free_pointer =
       (lispobj*)SymbolValue(ALLOCATION_POINTER,0);
 #endif
@@ -1398,7 +1398,7 @@ purify(lispobj static_roots, lispobj read_only_roots)
     printf(" stack");
     fflush(stdout);
 #endif
-#ifndef __i386__
+#ifndef LISP_FEATURE_X86
     pscav((lispobj *)all_threads->control_stack_start,
          current_control_stack_pointer - 
          all_threads->control_stack_start,
@@ -1413,7 +1413,7 @@ purify(lispobj static_roots, lispobj read_only_roots)
     printf(" bindings");
     fflush(stdout);
 #endif
-#if !defined(__i386__)
+#if !defined(LISP_FEATURE_X86)
     pscav( (lispobj *)all_threads->binding_stack_start,
          (lispobj *)current_binding_stack_pointer -
           all_threads->binding_stack_start,
@@ -1493,7 +1493,7 @@ purify(lispobj static_roots, lispobj read_only_roots)
 
     /* Zero the stack. Note that the stack is also zeroed by SUB-GC
      * calling SCRUB-CONTROL-STACK - this zeros the stack on the x86. */
-#ifndef __i386__
+#ifndef LISP_FEATURE_X86
     os_zero((os_vm_address_t) current_control_stack_pointer,
             (os_vm_size_t)
            ((all_threads->control_stack_end -
@@ -1505,7 +1505,7 @@ purify(lispobj static_roots, lispobj read_only_roots)
     SetSymbolValue(READ_ONLY_SPACE_FREE_POINTER, (lispobj)read_only_free,0);
     SetSymbolValue(STATIC_SPACE_FREE_POINTER, (lispobj)static_free,0);
 
-#if !defined(__i386__)
+#if !defined(LISP_FEATURE_X86)
     dynamic_space_free_pointer = current_dynamic_space;
     set_auto_gc_trigger(bytes_consed_between_gcs);
 #else
index 898ffe9..2ad75ce 100644 (file)
@@ -146,7 +146,7 @@ F(setrlimit)
 F(setsockopt)
 F(settimeofday)
 F(shutdown)
-#if !defined(hpux) && !defined(SVR4) && !defined(__i386__)
+#if !defined(hpux) && !defined(SVR4) && !defined(LISP_FEATURE_X86)
 F(sigreturn)
 #endif
 #if !defined(SVR4)
@@ -241,7 +241,7 @@ F(pow)
 #ifndef hpux
 F(cbrt)
 #endif
-#ifndef __i386__
+#ifndef LISP_FEATURE_X86
 F(sqrt)
 #endif
 F(hypot)
index 0c2546e..0d82b3f 100644 (file)
@@ -37,7 +37,7 @@ extern void protect_control_stack_guard_page(pid_t t_id, int protect_p);
  *
  * CMU CL had architecture-dependent header files included here to
  * define memory map data:
- *   #ifdef __i386__
+ *   #ifdef LISP_FEATURE_X86
  *   #include "x86-validate.h"
  *   #endif
  * and so forth. In SBCL, the memory map data are defined at the Lisp
index 37b4b01..6d2742e 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.3.77"
+"0.8.3.78"