0.7.3.10: Fix the SIGILL with ev6 and later Alphas: icache needs flushing
authorDaniel Barlow <dan@telent.net>
Sun, 5 May 2002 15:09:34 +0000 (15:09 +0000)
committerDaniel Barlow <dan@telent.net>
Sun, 5 May 2002 15:09:34 +0000 (15:09 +0000)
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

14 files changed:
build-order.lisp-expr
src/code/alpha-vm.lisp
src/code/ppc-vm.lisp
src/code/sparc-vm.lisp
src/code/x86-vm.lisp
src/compiler/alpha/insts.lisp
src/compiler/alpha/parms.lisp
src/compiler/alpha/sanctify.lisp [new file with mode: 0644]
src/compiler/alpha/system.lisp
src/compiler/ppc/sanctify.lisp [new file with mode: 0644]
src/compiler/sparc/sanctify.lisp [new file with mode: 0644]
src/compiler/x86/sanctify.lisp [new file with mode: 0644]
src/runtime/Config.ppc-linux
version.lisp-expr

index 9ff03fd..1d0440a 100644 (file)
  ("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
 
index 8681ea8..7a2b26e 100644 (file)
   (declare (type simple-base-string name))
   ;; On the Alpha we don't do anything.
   name)
-\f
-;;;; 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)
+
index ee2eaa3..c9441df 100644 (file)
   (declare (type simple-base-string name))
   name)
 
-
-\f
-;;; 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)
-
index c7f39f2..05502de 100644 (file)
               #.(error-number-or-lose 'unknown-error)))
            (list (sb!c::make-sc-offset descriptor-reg-sc-number reg)))))
 
-\f
-;;; 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)
index e105241..2d68335 100644 (file)
             (sc-offsets sc-offset)))
          (values error-number (sc-offsets)))))))
 \f
-;;; 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 ()
index 05f996c..d90c721 100644 (file)
 (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
index 4f05647..143db40 100644 (file)
   ;; 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 (file)
index 0000000..2f3627d
--- /dev/null
@@ -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))
index eb9aa9a..5ee4202 100644 (file)
 (define-vop (halt)
   (:generator 1
     (inst gentrap halt-trap)))
+
+(define-vop (istream-memory-barrier)
+  (:generator 1
+    (inst imb)))
 \f
 ;;;; dynamic vop count collection support
 
diff --git a/src/compiler/ppc/sanctify.lisp b/src/compiler/ppc/sanctify.lisp
new file mode 100644 (file)
index 0000000..490dc51
--- /dev/null
@@ -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)
+
+
+\f
+;;; 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 (file)
index 0000000..87e5d5e
--- /dev/null
@@ -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 (file)
index 0000000..87e5d5e
--- /dev/null
@@ -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)
+
index 1dcbc80..f48e72b 100644 (file)
@@ -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
index 275861c..8c28487 100644 (file)
@@ -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"