0.8.3.52:
authorChristophe Rhodes <csr21@cam.ac.uk>
Thu, 11 Sep 2003 12:38:38 +0000 (12:38 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Thu, 11 Sep 2003 12:38:38 +0000 (12:38 +0000)
Fix treatment of effective addresses for arithmetic
... somewhat similar to the PPC problems, ironically.  We want
to be able to pun signed constants as unsigned
constants, which we could do were it not for those
pesky type declarations...
... so relax the type declarations sufficiently to allow
it to work.

NEWS
src/compiler/x86/insts.lisp
tests/arith.pure.lisp
tests/compiler.pure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index af2dbaf..9d2232a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2050,6 +2050,8 @@ changes in sbcl-0.8.4 relative to sbcl-0.8.3:
        displaced string.
     ** LCM with two arguments of 0 returns 0 rather than signalling
        DIVISION-BY-ZERO.
+    ** unsigned addition of a 32-bit constant with the high bit set no
+       longer causes an internal compiler error.
 
 planned incompatible changes in 0.8.x:
   * (not done yet, but planned:) When the profiling interface settles
index 59e7a7d..1a42db4 100644 (file)
   (base nil :type (or tn null))
   (index nil :type (or tn null))
   (scale 1 :type (member 1 2 4 8))
-  (disp 0 :type (or (signed-byte 32) fixup)))
+  (disp 0 :type (or (unsigned-byte 32) (signed-byte 32) fixup)))
 (def!method print-object ((ea ea) stream)
   (cond ((or *print-escape* *print-readably*)
         (print-unreadable-object (ea stream :type t)
index 1f26fcc..16e015d 100644 (file)
     (truncate 291351647815394962053040658028983955 10000000000000000000000000)
   (assert (= quo 29135164781))
   (assert (= rem 5394962053040658028983955)))
+
+;;; x86 LEA bug:
+(assert (= (funcall
+           (compile nil '(lambda (x) (declare (bit x)) (+ x #xf0000000)))
+           1)
+          #xf0000001))
index f9c418f..2b7c1a4 100644 (file)
   (assert (= (funcall fun 0 0) 0))
   (assert (= (funcall fun 0 -1) -1))
   (assert (= (funcall fun -1 -1) 0)))
+
+;;; from PFD's torture test, triggering a bug in our effective address
+;;; treatment.
+(compile
+ nil
+ `(lambda (a b)
+    (declare (type (integer 8 22337) b))
+    (logandc2
+     (logandc2
+      (* (logandc1 (max -29303 b) 4) b)
+      (abs (logorc1 (+ (logandc1 -11 b) 2607688420) -31153924)))
+     (logeqv (max a 0) b))))
index cbc4c42..99d759d 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".)
-"0.8.3.51"
+"0.8.3.52"