From: Alexey Dejneka Date: Tue, 11 Nov 2003 09:09:39 +0000 (+0000) Subject: 0.8.5.32: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=aaba5d13361dd23a9afbadf6c68d8a404449362d;p=sbcl.git 0.8.5.32: * Fix PFD bug MISC.158: X86 (xor x x) instruction does not work for X in memory. --- diff --git a/CREDITS b/CREDITS index f41a1f3..4968cbb 100644 --- a/CREDITS +++ b/CREDITS @@ -686,3 +686,4 @@ WHN William ("Bill") Newman CSR Christophe Rhodes PVE Peter Van Eynde PW Paul Werkowski +PFD Paul F. Dietz diff --git a/src/compiler/x86/arith.lisp b/src/compiler/x86/arith.lisp index 3c7dda2..33cf26a 100644 --- a/src/compiler/x86/arith.lisp +++ b/src/compiler/x86/arith.lisp @@ -689,7 +689,9 @@ (if (plusp amount) (inst shl result amount) (inst shr result (- amount)))) - (t (inst xor result result))))))) + (t (if (sc-is result unsigned-reg) + (inst xor result result) + (inst mov result 0)))))))) (define-vop (fast-ash-left/signed=>signed) (:translate ash) diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index 1305c5c..ac15d8c 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -790,3 +790,19 @@ (return-from b3 a)))))))) -589)) '(-589 0))) + +;;; MISC.158 +(assert (zerop (funcall + (compile nil + '(lambda (a b c) + (declare (type (integer 79828 2625480458) a)) + (declare (type (integer -4363283 8171697) b)) + (declare (type (integer -301 0) c)) + (if (equal 6392154 (logxor a b)) + 1706 + (let ((v5 (abs c))) + (logand v5 + (logior (logandc2 c v5) + (common-lisp:handler-case + (ash a (min 36 22477))))))))) + 100000 0 0))) diff --git a/version.lisp-expr b/version.lisp-expr index 6ea8589..8acc280 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.5.31" +"0.8.5.32"