From: Christophe Rhodes Date: Thu, 11 Sep 2003 12:38:38 +0000 (+0000) Subject: 0.8.3.52: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=88871271448fb82abbc913997b9b5ea5a92054f8;p=sbcl.git 0.8.3.52: 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. --- diff --git a/NEWS b/NEWS index af2dbaf..9d2232a 100644 --- 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 diff --git a/src/compiler/x86/insts.lisp b/src/compiler/x86/insts.lisp index 59e7a7d..1a42db4 100644 --- a/src/compiler/x86/insts.lisp +++ b/src/compiler/x86/insts.lisp @@ -666,7 +666,7 @@ (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) diff --git a/tests/arith.pure.lisp b/tests/arith.pure.lisp index 1f26fcc..16e015d 100644 --- a/tests/arith.pure.lisp +++ b/tests/arith.pure.lisp @@ -117,3 +117,9 @@ (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)) diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index f9c418f..2b7c1a4 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -571,3 +571,15 @@ (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)))) diff --git a/version.lisp-expr b/version.lisp-expr index cbc4c42..99d759d 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".) -"0.8.3.51" +"0.8.3.52"