diff --git a/assembly/mips/arith.lisp b/assembly/mips/arith.lisp index 89edf8109c9decdeb69b458fc739978ab0ac6a6b..044cd9d04ded40f428f7476f43e4728497c8ab2c 100644 --- a/assembly/mips/arith.lisp +++ b/assembly/mips/arith.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/assembly/mips/arith.lisp,v 1.14 1994/10/31 04:56:40 ram Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/assembly/mips/arith.lisp,v 1.15 1997/10/25 16:31:44 pw Exp $") ;;; ;;; ********************************************************************** ;;; @@ -291,6 +291,7 @@ (inst bne temp DO-STATIC-FN) (inst and temp y 3) (inst bne temp DO-STATIC-FN) + (inst nop) (inst beq x y RETURN-T) (inst move res null-tn) @@ -333,6 +334,7 @@ (inst bne temp DO-STATIC-FN) (inst and temp y 3) (inst bne temp DO-STATIC-FN) + (inst nop) (inst beq x y RETURN-NIL) (load-symbol res t) diff --git a/assembly/mips/bit-bash.lisp b/assembly/mips/bit-bash.lisp index e7074259c1dd921890d2e6fcac9c99ca577f9de7..35bfd09aebf0693753b2f54016d241ee81e45f1d 100644 --- a/assembly/mips/bit-bash.lisp +++ b/assembly/mips/bit-bash.lisp @@ -5,11 +5,11 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/assembly/mips/bit-bash.lisp,v 1.14 1994/10/31 04:56:40 ram Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/assembly/mips/bit-bash.lisp,v 1.15 1997/10/25 16:31:46 pw Exp $") ;;; ;;; ********************************************************************** ;;; -;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/assembly/mips/bit-bash.lisp,v 1.14 1994/10/31 04:56:40 ram Exp $ +;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/assembly/mips/bit-bash.lisp,v 1.15 1997/10/25 16:31:46 pw Exp $ ;;; ;;; Stuff to implement bit bashing. ;;; @@ -52,6 +52,7 @@ (inst bne src dst copy-left) (inst sltu ntemp1 src-bit-offset dst-bit-offset) (inst bne ntemp1 copy-right) + (inst nop) (inst beq src-bit-offset dst-bit-offset done) (inst nop) diff --git a/code/foreign.lisp b/code/foreign.lisp index b09d667f42ace4eb645cb8f5a95a544ee20928a8..094473594c026f5f38f3404ca6efa3ab0dbdeba3 100644 --- a/code/foreign.lisp +++ b/code/foreign.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/foreign.lisp,v 1.24 1997/08/23 15:59:59 pw Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/foreign.lisp,v 1.25 1997/10/25 16:31:55 pw Exp $") ;;; ;;; ********************************************************************** ;;; @@ -394,6 +394,12 @@ (defconstant rtld-lazy 1) (defconstant rtld-now 2) (defconstant rtld-global #-irix #o400 #+irix 4) +;; Dynamically loaded stuff isn't there upon restoring from a save--this is +;;primarily for irix, which resolves tzname at runtime, resulting in +;;*global-table* being set in the saved core image, resulting in havoc upon +;;restart. +(pushnew #'(lambda () (setq *global-table* nil)) + ext:*after-save-initializations*) (defvar *global-table* NIL) (defvar *dso-linker* #+solaris "/usr/ccs/bin/ld" @@ -407,7 +413,22 @@ (alien:def-alien-routine dlclose void (lib system-area-pointer)) (alien:def-alien-routine dlerror c-call:c-string) +;; Ensure we've opened our own binary so can resolve global variables in the +;;lisp image that come from libraries. This used to happen only in +;;alternate-get-global-address, and only if no libraries were dlopened already, +;;but that didn't work if something was dlopened before any problem global vars +;;were used. So now we do this in any function that can add to the global-table, +;;as well as in a-g-g-a. +(defun ensure-lisp-table-opened () + (unless *global-table* + ;; Prevent recursive call if dlopen isn't defined + (setf *global-table* (int-sap 0)) + (setf *global-table* (list (dlopen nil rtld-lazy))) + (when (zerop (system:sap-int (car *global-table*))) + (error "Can't open global symbol table: ~S" (dlerror))))) + (defun load-object-file (file) + (ensure-lisp-table-opened) ; rtld global: so it can find all the symbols previously loaded ; rtld now: that way dlopen will fail if not all symbols are defined. (let ((sap (dlopen file (logior rtld-now rtld-global)))) @@ -416,13 +437,7 @@ (pushnew sap *global-table* :test #'sap=)))) (defun alternate-get-global-address (symbol) - (unless *global-table* - ;; Prevent recursive call when dlopen isn't defined. - (setq *global-table* (int-sap 0)) - ;; Load standard object - (setq *global-table* (list (dlopen nil rtld-lazy))) - (if (zerop (system:sap-int (car *global-table*))) - (error "Can't open global symbol table: ~S" (dlerror)))) + (ensure-lisp-table-opened) ;; find the symbol in any of the loaded obbjects, ;; search in reverse order of loading, later loadings ;; take precedence diff --git a/code/unix.lisp b/code/unix.lisp index 956cabe695b23bb4ff0eefa42b4a4ef280318b2c..f224603d41b02d35047ca020c0efd4cb966f2c19 100644 --- a/code/unix.lisp +++ b/code/unix.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/unix.lisp,v 1.54 1997/10/08 21:03:34 dtc Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/unix.lisp,v 1.55 1997/10/25 16:32:00 pw Exp $") ;;; ;;; ********************************************************************** ;;; @@ -1878,7 +1878,15 @@ (def-alien-variable ("daylight" unix-daylight) int) (def-alien-variable ("timezone" unix-timezone) time-t) (def-alien-variable ("altzone" unix-altzone) time-t) - (def-alien-variable ("tzname" unix-tzname) (array c-string 2)) + #-irix (def-alien-variable ("tzname" unix-tzname) (array c-string 2)) + #+irix (defvar unix-tzname-addr nil) + #+irix (pushnew #'(lambda () (setq unix-tzname-addr nil)) + ext:*after-save-initializations*) + #+irix (declaim (notinline fakeout-compiler)) + #+irix (defun fakeout-compiler (name dst) + (unless unix-tzname-addr + (setf unix-tzname-addr (system:foreign-symbol-address name))) + (deref (sap-alien unix-tzname-addr (array c-string 2)) dst)) (def-alien-routine get-timezone c-call:void (when c-call:long :in) (minutes-west c-call:int :out) @@ -1891,7 +1899,8 @@ (defun unix-get-timezone (secs) (multiple-value-bind (ignore minutes dst) (get-timezone secs) (declare (ignore ignore) (ignore minutes)) - (values (deref unix-tzname (if dst 1 0))) + (values #-irix (deref unix-tzname (if dst 1 0)) + #+irix (fakeout-compiler "tzname" (if dst 1 0))) ) ) ) (declaim (inline unix-gettimeofday)) diff --git a/compiler/mips/arith.lisp b/compiler/mips/arith.lisp index b7e395f7e95426c0dea3b8fd4dd252915c77029d..8c2197416b854817aca399e53b947e05b6a81e44 100644 --- a/compiler/mips/arith.lisp +++ b/compiler/mips/arith.lisp @@ -5,11 +5,11 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/arith.lisp,v 1.52 1994/10/31 04:44:16 ram Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/arith.lisp,v 1.53 1997/10/25 16:32:10 pw Exp $") ;;; ;;; ********************************************************************** ;;; -;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/arith.lisp,v 1.52 1994/10/31 04:44:16 ram Exp $ +;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/arith.lisp,v 1.53 1997/10/25 16:32:10 pw Exp $ ;;; ;;; This file contains the VM definition arithmetic VOPs for the MIPS. ;;; @@ -358,6 +358,7 @@ (:generator 11 (let ((zero (generate-error-code vop division-by-zero-error x y))) (inst beq y zero-tn zero)) + (inst nop) (inst div x y) (inst mflo temp) (inst sll q temp 2) @@ -373,6 +374,7 @@ (:generator 12 (let ((zero (generate-error-code vop division-by-zero-error x y))) (inst beq y zero-tn zero)) + (inst nop) (inst divu x y) (inst mflo q) (inst mfhi r))) @@ -387,6 +389,7 @@ (:generator 12 (let ((zero (generate-error-code vop division-by-zero-error x y))) (inst beq y zero-tn zero)) + (inst nop) (inst div x y) (inst mflo q) (inst mfhi r))) diff --git a/lisp/irix-nm b/lisp/irix-nm index a1bcabfcc79d200e4075489b692ac0087d2b0555..d4bb162161728c5250c0aad59fe0ba32207727d2 100755 --- a/lisp/irix-nm +++ b/lisp/irix-nm @@ -1,8 +1,5 @@ #!/bin/sh -#errnoaddr=`/bin/nm -Bg /usr/lib/libc.so|fgrep ' D errno'|sed -e 's/ .*//'` -tznameaddr=`/bin/nm -Bg /usr/lib/libc.so|fgrep ' D tzname'|sed -e 's/ .*//'` - -/bin/nm -Bgv $* | sed -e 's/ (weak)//' -e "/ U errno/ s/00000000 /$errnoaddr /" -e "/ U tzname/ s/00000000 /$tznameaddr /"|sort -k1,1 +/bin/nm -Bgv $* | sed -e 's/ (weak)//' |sort -k1,1 exit 0