From: Paul Khuong Date: Fri, 1 Aug 2008 17:10:21 +0000 (+0000) Subject: 1.0.19.14: Immediate SAP bug fix & grab bag of small changes X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=06b4f7dc62e1ce045ff7409686f27534ecb13ada;p=sbcl.git 1.0.19.14: Immediate SAP bug fix & grab bag of small changes * 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). --- diff --git a/src/compiler/alpha/vm.lisp b/src/compiler/alpha/vm.lisp index cc4f43e..cb32ab9 100644 --- a/src/compiler/alpha/vm.lisp +++ b/src/compiler/alpha/vm.lisp @@ -291,7 +291,7 @@ (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) diff --git a/src/compiler/hppa/vm.lisp b/src/compiler/hppa/vm.lisp index 6257b18..2f5c1d0 100644 --- a/src/compiler/hppa/vm.lisp +++ b/src/compiler/hppa/vm.lisp @@ -283,7 +283,7 @@ (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) diff --git a/src/compiler/mips/vm.lisp b/src/compiler/mips/vm.lisp index 9030f90..eb805a9 100644 --- a/src/compiler/mips/vm.lisp +++ b/src/compiler/mips/vm.lisp @@ -306,7 +306,7 @@ (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)) diff --git a/src/compiler/ppc/vm.lisp b/src/compiler/ppc/vm.lisp index 732184b..641a33f 100644 --- a/src/compiler/ppc/vm.lisp +++ b/src/compiler/ppc/vm.lisp @@ -278,7 +278,7 @@ (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) diff --git a/src/compiler/saptran.lisp b/src/compiler/saptran.lisp index 5ed9b8d..10a08c5 100644 --- a/src/compiler/saptran.lisp +++ b/src/compiler/saptran.lisp @@ -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)) diff --git a/src/compiler/sparc/vm.lisp b/src/compiler/sparc/vm.lisp index ef2ce4e..9bfe46b 100644 --- a/src/compiler/sparc/vm.lisp +++ b/src/compiler/sparc/vm.lisp @@ -317,7 +317,7 @@ (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) diff --git a/src/compiler/x86-64/sap.lisp b/src/compiler/x86-64/sap.lisp index 7915890..9177094 100644 --- a/src/compiler/x86-64/sap.lisp +++ b/src/compiler/x86-64/sap.lisp @@ -190,7 +190,7 @@ (: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 @@ -240,7 +240,7 @@ '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 @@ -295,7 +295,7 @@ (: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) @@ -320,7 +320,7 @@ (: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) diff --git a/src/compiler/x86-64/vm.lisp b/src/compiler/x86-64/vm.lisp index 98d0f9b..9f69ec4 100644 --- a/src/compiler/x86-64/vm.lisp +++ b/src/compiler/x86-64/vm.lisp @@ -428,7 +428,7 @@ (!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) diff --git a/src/compiler/x86/vm.lisp b/src/compiler/x86/vm.lisp index 3af49f2..4079bde 100644 --- a/src/compiler/x86/vm.lisp +++ b/src/compiler/x86/vm.lisp @@ -384,7 +384,7 @@ (!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) diff --git a/version.lisp-expr b/version.lisp-expr index 9d100b4..832115e 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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"