1.0.14.33: Resurrexit Alpha
authorChristophe Rhodes <csr21@cantab.net>
Sun, 17 Feb 2008 19:06:34 +0000 (19:06 +0000)
committerChristophe Rhodes <csr21@cantab.net>
Sun, 17 Feb 2008 19:06:34 +0000 (19:06 +0000)
Sort out accumulated bitrot on the Alpha:
* xrefs slot for simple_fun: a couple of places in alpha-assem.S
* arch_skip_instruction(): compilers more careful about lvalues;
* arch_handle_single_step_trap(): implement it.  (Untested)
* ld-script.alpha-linux: update for newer systems.

Works For Me.  Other systems may vary.

NEWS
src/runtime/alpha-arch.c
src/runtime/alpha-assem.S
src/runtime/ld-script.alpha-linux
version.lisp-expr

diff --git a/NEWS b/NEWS
index bec35f1..6c04c72 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -27,6 +27,8 @@ changes in sbcl-1.0.15 relative to sbcl-1.0.14:
   * bug fix: the CTOR optimization for MAKE-INSTANCE should no longer
     create obsolete instances in the case of redefinition or
     obsoletion of a superclass.  (thanks to Andy Hefner)
+  * bug fix: Support for the Alpha architecture has been revived; it had
+    suffered somewhat from lack of maintenance since sbcl-1.0.
 
 changes in sbcl-1.0.14 relative to sbcl-1.0.13:
   * new feature: SB-EXT:*EXIT-HOOKS* are called when the process exits
index 3f3dafe..77fbbc1 100644 (file)
@@ -87,7 +87,10 @@ arch_skip_instruction(os_context_t *context)
     /* This may be complete rubbish, as (at least for traps) pc points
      * _after_ the instruction that caused us to be here anyway.
      */
-    ((char*)*os_context_pc_addr(context)) +=4; }
+    char **pcptr;
+    pcptr = (char **) os_context_pc_addr(context);
+    *pcptr += 4;
+}
 
 unsigned char *
 arch_internal_error_arguments(os_context_t *context)
@@ -303,6 +306,15 @@ arch_handle_fun_end_breakpoint(os_context_t *context)
         (int)handle_fun_end_breakpoint(context);
 }
 
+void
+arch_handle_single_step_trap(os_context_t *context, int trap)
+{
+    unsigned int code = *((u32 *) (*os_context_pc_addr(context)));
+    int register_offset = code >> 5 & 0x1f;
+    handle_single_step_trap(context, trap, register_offset);
+    arch_skip_instruction(context);
+}
+
 static void
 sigtrap_handler(int signal, siginfo_t *siginfo, os_context_t *context)
 {
index ac79fa1..dd4e218 100644 (file)
@@ -95,7 +95,7 @@ call_into_lisp:
 
        /* Indirect the closure */
        ldl     reg_CODE, CLOSURE_FUN_OFFSET(reg_LEXENV)
-       addl    reg_CODE,6*4-FUN_POINTER_LOWTAG, reg_LIP
+       addl    reg_CODE, SIMPLE_FUN_CODE_OFFSET, reg_LIP
 
        /* And into lisp we go. */
        jsr     reg_ZERO,(reg_LIP)
@@ -307,6 +307,7 @@ funcallable_instance_tramp = . + 1
        .long NIL
        .long NIL
        .long NIL
+       .long NIL
 
        ldl reg_LEXENV, FUNCALLABLE_INSTANCE_FUNCTION_OFFSET(reg_LEXENV)
        /* I think we don't actually need to use reg_CODE here, because
index d5c94cb..21551ca 100644 (file)
@@ -69,6 +69,21 @@ SECTIONS
   _etext = .;
   PROVIDE (etext = .);
   .fini      : { *(.fini)    } =0x47ff041f
+  .preinit_array : {
+       __preinit_array_start = .;
+       *(.preinit_array)
+       __preinit_array_end = .;
+  }
+  .init_array : {
+       __init_array_start = .;
+       *(.init_array)
+       __init_array_end = .;
+  }
+  .fini_array : {
+       __fini_array_start = .;
+       *(.fini_array)
+       __fini_array_end = .;
+  }
   .rodata    : { *(.rodata) *(.gnu.linkonce.r*) }
   .rodata1   : { *(.rodata1) }
   .reginfo : { *(.reginfo) }
index 1690451..86c2240 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".)
-"1.0.14.32"
+"1.0.14.33"