From: Daniel Barlow Date: Sun, 5 May 2002 15:09:34 +0000 (+0000) Subject: 0.7.3.10: Fix the SIGILL with ev6 and later Alphas: icache needs flushing X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=bc46c8bcdd6ac8918df8ea9e9db49808e4924fcf;p=sbcl.git 0.7.3.10: Fix the SIGILL with ev6 and later Alphas: icache needs flushing after code objects are created e.g. by loading fasls * Move sanctify-for-execution from *-vm.lisp to compiler/target/sanctify.lisp, as *-vm is built too early to call VOPs * Add IMB to Alpha insts.lisp, and istream-memory-barrier VOP that calls it. * Create Alpha sanctify-for-execution function that calls said new VOP * Also flush icache after GC * Double Alpha dynamic sizes to 256Mb: 128Mb is marginal to rebuild SBCL * Minor Config.ppc-linux cleanup --- diff --git a/build-order.lisp-expr b/build-order.lisp-expr index 9ff03fd..1d0440a 100644 --- a/build-order.lisp-expr +++ b/build-order.lisp-expr @@ -610,7 +610,8 @@ ("src/code/bit-bash" :not-host) ; needs %NEGATE from assembly/target/arith ("src/code/target-load" :not-host) ; needs special vars from code/load.lisp - + ("src/compiler/target/sanctify" :not-host) + ;; FIXME: Does this really need stuff from compiler/dump.lisp? ("src/compiler/target-dump" :not-host) ; needs stuff from compiler/dump.lisp diff --git a/src/code/alpha-vm.lisp b/src/code/alpha-vm.lisp index 8681ea8..7a2b26e 100644 --- a/src/code/alpha-vm.lisp +++ b/src/code/alpha-vm.lisp @@ -178,12 +178,4 @@ (declare (type simple-base-string name)) ;; On the Alpha we don't do anything. name) - -;;;; Do whatever is necessary to make the given code component -;;;; executable. -;;;; -;;;; XXX do we really not have to flush caches or something here? I -;;;; need an architecture manual -(defun sanctify-for-execution (component) - (declare (ignore component)) - nil) + diff --git a/src/code/ppc-vm.lisp b/src/code/ppc-vm.lisp index ee2eaa3..c9441df 100644 --- a/src/code/ppc-vm.lisp +++ b/src/code/ppc-vm.lisp @@ -170,22 +170,3 @@ (declare (type simple-base-string name)) name) - - -;;; SANCTIFY-FOR-EXECUTION -- Interface. -;;; -;;; Do whatever is necessary to make the given code component executable. -;;; On the 601, we have less to do than on some other PowerPC chips. -;;; This should what needs to be done in the general case. -;;; -(defun sanctify-for-execution (component) - (without-gcing - (alien-funcall (extern-alien "ppc_flush_icache" - (function void - system-area-pointer - unsigned-long)) - (code-instructions component) - (* (code-header-ref component code-code-size-slot) - n-word-bytes))) - nil) - diff --git a/src/code/sparc-vm.lisp b/src/code/sparc-vm.lisp index c7f39f2..05502de 100644 --- a/src/code/sparc-vm.lisp +++ b/src/code/sparc-vm.lisp @@ -192,10 +192,3 @@ #.(error-number-or-lose 'unknown-error))) (list (sb!c::make-sc-offset descriptor-reg-sc-number reg))))) - -;;; Do whatever is necessary to make the given code component -;;; executable. On the sparc, we don't need to do anything, because -;;; the i and d caches are unified. -(defun sanctify-for-execution (component) - (declare (ignore component)) - nil) diff --git a/src/code/x86-vm.lisp b/src/code/x86-vm.lisp index e105241..2d68335 100644 --- a/src/code/x86-vm.lisp +++ b/src/code/x86-vm.lisp @@ -293,12 +293,6 @@ (sc-offsets sc-offset))) (values error-number (sc-offsets))))))) -;;; Do whatever is necessary to make the given code component -;;; executable. (This is a no-op on the x86.) -(defun sanctify-for-execution (component) - (declare (ignore component)) - nil) - ;;; This is used in error.lisp to insure that floating-point exceptions ;;; are properly trapped. The compiler translates this to a VOP. (defun float-wait () diff --git a/src/compiler/alpha/insts.lisp b/src/compiler/alpha/insts.lisp index 05f996c..d90c721 100644 --- a/src/compiler/alpha/insts.lisp +++ b/src/compiler/alpha/insts.lisp @@ -442,6 +442,9 @@ (define-instruction trapb (segment) (:emitter (emit-lword segment #x63ff0000))) +(define-instruction imb (segment) + (:emitter (emit-lword segment #x00000086))) + (define-instruction gentrap (segment code) (:printer call-pal ((palcode #xaa0000))) (:emitter diff --git a/src/compiler/alpha/parms.lisp b/src/compiler/alpha/parms.lisp index 4f05647..143db40 100644 --- a/src/compiler/alpha/parms.lisp +++ b/src/compiler/alpha/parms.lisp @@ -125,13 +125,13 @@ ;; is in dynamic space. Chocolate brownie for the first person to fix it ;; -dan 20010502 (defconstant dynamic-space-start #x30000000) - (defconstant dynamic-space-end #x38000000) + (defconstant dynamic-space-end #x3fff0000) (defconstant dynamic-0-space-start #x30000000) - (defconstant dynamic-0-space-end #x38000000) + (defconstant dynamic-0-space-end #x3fff0000) (defconstant dynamic-1-space-start #x40000000) - (defconstant dynamic-1-space-end #x48000000) + (defconstant dynamic-1-space-end #x4fff0000) (defconstant control-stack-start #x50000000) (defconstant control-stack-end #x51000000) diff --git a/src/compiler/alpha/sanctify.lisp b/src/compiler/alpha/sanctify.lisp new file mode 100644 index 0000000..2f3627d --- /dev/null +++ b/src/compiler/alpha/sanctify.lisp @@ -0,0 +1,19 @@ +;;;; Do whatever is necessary to make the given code component +;;;; executable. + +;;;; This software is part of the SBCL system. See the README file for +;;;; more information. +;;;; +;;;; While most of SBCL is derived from the CMU CL system, the test +;;;; files (like this one) were written from scratch after the fork +;;;; from CMU CL. +;;;; +;;;; This software is in the public domain and is provided with +;;;; absolutely no warranty. See the COPYING and CREDITS files for +;;;; more information. + +(in-package :sb!vm) + +(defun sanctify-for-execution (component) + (declare (ignore component)) + (sb!sys:%primitive istream-memory-barrier)) diff --git a/src/compiler/alpha/system.lisp b/src/compiler/alpha/system.lisp index eb9aa9a..5ee4202 100644 --- a/src/compiler/alpha/system.lisp +++ b/src/compiler/alpha/system.lisp @@ -226,6 +226,10 @@ (define-vop (halt) (:generator 1 (inst gentrap halt-trap))) + +(define-vop (istream-memory-barrier) + (:generator 1 + (inst imb))) ;;;; dynamic vop count collection support diff --git a/src/compiler/ppc/sanctify.lisp b/src/compiler/ppc/sanctify.lisp new file mode 100644 index 0000000..490dc51 --- /dev/null +++ b/src/compiler/ppc/sanctify.lisp @@ -0,0 +1,36 @@ +;;;; Do whatever is necessary to make the given code component +;;;; executable. + +;;;; This software is part of the SBCL system. See the README file for +;;;; more information. +;;;; +;;;; While most of SBCL is derived from the CMU CL system, the test +;;;; files (like this one) were written from scratch after the fork +;;;; from CMU CL. +;;;; +;;;; This software is in the public domain and is provided with +;;;; absolutely no warranty. See the COPYING and CREDITS files for +;;;; more information. + +(in-package :sb!vm) + + + +;;; SANCTIFY-FOR-EXECUTION -- Interface. +;;; +;;; Do whatever is necessary to make the given code component executable. +;;; On the 601, we have less to do than on some other PowerPC chips. +;;; This should what needs to be done in the general case. +;;; +(defun sanctify-for-execution (component) + (without-gcing + (alien-funcall (extern-alien "ppc_flush_icache" + (function void + system-area-pointer + unsigned-long)) + (code-instructions component) + (* (code-header-ref component code-code-size-slot) + n-word-bytes))) + nil) + + diff --git a/src/compiler/sparc/sanctify.lisp b/src/compiler/sparc/sanctify.lisp new file mode 100644 index 0000000..87e5d5e --- /dev/null +++ b/src/compiler/sparc/sanctify.lisp @@ -0,0 +1,20 @@ +;;;; Do whatever is necessary to make the given code component +;;;; executable. + +;;;; This software is part of the SBCL system. See the README file for +;;;; more information. +;;;; +;;;; While most of SBCL is derived from the CMU CL system, the test +;;;; files (like this one) were written from scratch after the fork +;;;; from CMU CL. +;;;; +;;;; This software is in the public domain and is provided with +;;;; absolutely no warranty. See the COPYING and CREDITS files for +;;;; more information. + +(in-package :sb!vm) + +(defun sanctify-for-execution (component) + (declare (ignore component)) + nil) + diff --git a/src/compiler/x86/sanctify.lisp b/src/compiler/x86/sanctify.lisp new file mode 100644 index 0000000..87e5d5e --- /dev/null +++ b/src/compiler/x86/sanctify.lisp @@ -0,0 +1,20 @@ +;;;; Do whatever is necessary to make the given code component +;;;; executable. + +;;;; This software is part of the SBCL system. See the README file for +;;;; more information. +;;;; +;;;; While most of SBCL is derived from the CMU CL system, the test +;;;; files (like this one) were written from scratch after the fork +;;;; from CMU CL. +;;;; +;;;; This software is in the public domain and is provided with +;;;; absolutely no warranty. See the COPYING and CREDITS files for +;;;; more information. + +(in-package :sb!vm) + +(defun sanctify-for-execution (component) + (declare (ignore component)) + nil) + diff --git a/src/runtime/Config.ppc-linux b/src/runtime/Config.ppc-linux index 1dcbc80..f48e72b 100644 --- a/src/runtime/Config.ppc-linux +++ b/src/runtime/Config.ppc-linux @@ -8,15 +8,15 @@ # files for more information. CFLAGS += -g -Dppc -LD = ld #-taso -LINKFLAGS = -v -g # -Wl,-T -Wl,ld-script.alpha-linux +LD = ld +LINKFLAGS = -v -g NM = nm -p ASSEM_SRC = ppc-assem.S ldso-stubs.S ARCH_SRC = ppc-arch.c OS_SRC = linux-os.c ppc-linux-os.c os-common.c -LINKFLAGS+=-rdynamic # -static +LINKFLAGS+=-rdynamic OS_LIBS= -ldl GC_SRC= gc.c diff --git a/version.lisp-expr b/version.lisp-expr index 275861c..8c28487 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -18,4 +18,4 @@ ;;; for internal versions, especially for internal versions off the ;;; main CVS branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.7.3.9" +"0.7.3.10"