Commit 26987375 authored by Nikodemus Siivola's avatar Nikodemus Siivola
Browse files

1.0.24.21: call stub needed to switch between hpux heap-spaces

 * Patch by Larry Valkama.
parent 95dadf03
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -201,3 +201,26 @@

  (inst b *unwind-entry-point*)
  (inst move catch target))

#!+hpux
(define-assembly-routine
  (return-from-lisp-stub (:return-style :none))
  ((:temp lip interior-reg lip-offset)
   (:temp nl0 descriptor-reg nl0-offset)
   (:temp nl1 descriptor-reg nl1-offset)
   (:temp lra descriptor-reg lra-offset))
  ; before calling into lisp we must save our return address (reg_LRA)
  (store-symbol-value lra *c-lra*)
  ; note the lra we calculate next must "simulate" an fixnum,
  ; because compute-calling-frame will use fixnump on this value.
  ; either use 16 or 20, finetune it...
  (inst addi 19 nl0 lra) ; then setup the new LRA (rest of this routine after branch)
  (inst bv lip :nullify t)
  (inst word return-pc-header-widetag)
  ; ok, we are back from the lisp-call, lets return to c
  ; FIX-lav: steal more stuff from call_into_lisp here, ideally the whole thing
  (inst move ocfp-tn csp-tn) ; dont think we should ever get here
  (inst nop)
  (load-symbol-value nl0 *c-lra*)
  (inst addi 1 nl0 nl0)
  (inst ble 0 c-text-space nl0 :nullify t))
+2 −0
Original line number Diff line number Diff line
@@ -259,6 +259,8 @@
  (/show0 "done initializing, setting *COLD-INIT-COMPLETE-P*")
  (setf *cold-init-complete-p* t)

  ; hppa heap is segmented, lisp and c uses a stub to call eachother
  #!+hpux (sb!sys:%primitive sb!vm::setup-return-from-lisp-stub)
  ;; The system is finally ready for GC.
  (/show0 "enabling GC")
  (gc-on)
+1 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@
                  ;; pseudo-atomicity too, but they handle it without
                  ;; messing with special variables.)
                  #!+(or x86 x86-64) *pseudo-atomic-bits*
                  #!+(or hpux) sb!vm::*c-lra*
                  *allow-with-interrupts*
                  *interrupts-enabled*
                  *interrupt-pending*
+1 −0
Original line number Diff line number Diff line
@@ -125,6 +125,7 @@ sufficiently motivated to do lengthy fixes."
  (labels ((restart-lisp ()
             (handling-end-of-the-world
               (reinit)
               #!+hpux (sb!sys:%primitive sb!vm::setup-return-from-lisp-stub)
               (funcall toplevel)))
           (foreign-bool (value)
             (if value 1 0))
+1 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
(progn
  (defvar sb!vm::*current-catch-block*)
  (defvar sb!vm::*current-unwind-protect-block*)
  #!+hpux (defvar sb!vm::*c-lra*)
  (defvar *free-interrupt-context-index*))

;;; specials initialized by !COLD-INIT
Loading