1.0.19.14: Immediate SAP bug fix & grab bag of small changes
authorPaul Khuong <pvk@pvk.ca>
Fri, 1 Aug 2008 17:10:21 +0000 (17:10 +0000)
committerPaul Khuong <pvk@pvk.ca>
Fri, 1 Aug 2008 17:10:21 +0000 (17:10 +0000)
 * SAPs can't actually be emitted as immediates. Only a problem now that
   constants are treated more cleverly.

   Fixes the "#.(SB-SYS:INT-SAP #X00000000) fell through ETYPECASE expression"
   bug associated with CFFI's NULL-POINTER. Reported by Ingo Bormuth on
   sbcl-devel, and by several others on #lisp.

 * EAs can still only fit 32 bit displacements on x86-64.

 * Make SAP-INT foldable, thus improving code generation for expressions
   like (sap= +null-pointer+ sap).

src/compiler/alpha/vm.lisp
src/compiler/hppa/vm.lisp
src/compiler/mips/vm.lisp
src/compiler/ppc/vm.lisp
src/compiler/saptran.lisp
src/compiler/sparc/vm.lisp
src/compiler/x86-64/sap.lisp
src/compiler/x86-64/vm.lisp
src/compiler/x86/vm.lisp
version.lisp-expr

index cc4f43e..cb32ab9 100644 (file)
     (null
      (sc-number-or-lose 'null ))
     ((or (integer #.sb!xc:most-negative-fixnum #.sb!xc:most-positive-fixnum)
-         system-area-pointer character)
+         character)
      (sc-number-or-lose 'immediate ))
     (symbol
      (if (static-symbol-p value)
index 6257b18..2f5c1d0 100644 (file)
     (null
      (sc-number-or-lose 'null))
     ((or (integer #.sb!xc:most-negative-fixnum #.sb!xc:most-positive-fixnum)
-         system-area-pointer character)
+         character)
      (sc-number-or-lose 'immediate))
     (symbol
      (if (static-symbol-p value)
index 9030f90..eb805a9 100644 (file)
          (sc-number-or-lose 'immediate)
          nil))
     ((or (integer #.sb!xc:most-negative-fixnum #.sb!xc:most-positive-fixnum)
-         system-area-pointer character)
+         character)
      (sc-number-or-lose 'immediate))
     (system-area-pointer
      (sc-number-or-lose 'immediate))
index 732184b..641a33f 100644 (file)
     (null
      (sc-number-or-lose 'null))
     ((or (integer #.sb!xc:most-negative-fixnum #.sb!xc:most-positive-fixnum)
-         system-area-pointer character)
+         character)
      (sc-number-or-lose 'immediate))
     (symbol
      (if (static-symbol-p value)
index 5ed9b8d..10a08c5 100644 (file)
@@ -48,7 +48,7 @@
 
 (defknown sap-int (system-area-pointer)
   (unsigned-byte #.sb!vm::n-machine-word-bits)
-  (movable flushable))
+  (movable flushable foldable))
 (defknown int-sap ((unsigned-byte #.sb!vm::n-machine-word-bits))
   system-area-pointer (movable))
 
index ef2ce4e..9bfe46b 100644 (file)
     (null
      (sc-number-or-lose 'null))
     ((or (integer #.sb!xc:most-negative-fixnum #.sb!xc:most-positive-fixnum)
-         system-area-pointer character)
+         character)
      (sc-number-or-lose 'immediate))
     (symbol
      (if (static-symbol-p value)
index 7915890..9177094 100644 (file)
                     (:policy :fast-safe)
                     (:args (sap :scs (sap-reg)))
                     (:arg-types system-area-pointer
-                                (:constant (signed-byte 64)))
+                                (:constant (signed-byte 32)))
                     (:info offset)
                     ,@(unless (eq size :qword)
                         `((:temporary (:sc ,temp-sc
                                                'result
                                                'temp)))
                     (:arg-types system-area-pointer
-                                (:constant (signed-byte 64)) ,type)
+                                (:constant (signed-byte 32)) ,type)
                     (:info offset)
                     ,@(unless (eq size :qword)
                         `((:temporary (:sc ,temp-sc :offset rax-offset
   (:translate sap-ref-double)
   (:policy :fast-safe)
   (:args (sap :scs (sap-reg)))
-  (:arg-types system-area-pointer (:constant (signed-byte 64)))
+  (:arg-types system-area-pointer (:constant (signed-byte 32)))
   (:info offset)
   (:results (result :scs (double-reg)))
   (:result-types double-float)
   (:policy :fast-safe)
   (:args (sap :scs (sap-reg) :to (:eval 0))
          (value :scs (double-reg)))
-  (:arg-types system-area-pointer (:constant (signed-byte 64)) double-float)
+  (:arg-types system-area-pointer (:constant (signed-byte 32)) double-float)
   (:info offset)
   (:results (result :scs (double-reg)))
   (:result-types double-float)
index 98d0f9b..9f69ec4 100644 (file)
 (!def-vm-support-routine immediate-constant-sc (value)
   (typecase value
     ((or (integer #.sb!xc:most-negative-fixnum #.sb!xc:most-positive-fixnum)
-         #-sb-xc-host system-area-pointer character)
+         character)
      (sc-number-or-lose 'immediate))
     (symbol
      (when (static-symbol-p value)
index 3af49f2..4079bde 100644 (file)
 (!def-vm-support-routine immediate-constant-sc (value)
   (typecase value
     ((or (integer #.sb!xc:most-negative-fixnum #.sb!xc:most-positive-fixnum)
-         #-sb-xc-host system-area-pointer character)
+         character)
      (sc-number-or-lose 'immediate))
     (symbol
      (when (static-symbol-p value)
index 9d100b4..832115e 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.19.13"
+"1.0.19.14"