From: Christophe Rhodes Date: Tue, 1 Mar 2005 10:54:36 +0000 (+0000) Subject: 0.8.20.2: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=d1858723258b286448f0c1584c096e6ea82451d6;p=sbcl.git 0.8.20.2: Fix the compiler note emission from COUNT and EQUAL on bit-vectors. (reported by Lutz Euler sbcl-devel 2005-02-16) ... rewrite (1- (ash 1 )) as (ash #xff...ff (- n-word-bits )) --- diff --git a/NEWS b/NEWS index 12d9465..75e7a42 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,9 @@ changes in sbcl-0.8.21 (0.9alpha.1?) relative to sbcl-0.8.20: are now more amenable to inspection by INSPECT. * workaround for bug 354: XEPs no longer appear in backtraces unless explicitly requested. + * fixed bug: COUNT and EQUAL no longer issue compiler efficiency + notes when operating on objects known to be SIMPLE-BIT-VECTORs. + (reported by Lutz Euler) changes in sbcl-0.8.20 (0.9alpha.0?) relative to sbcl-0.8.19: * fixed inspection of specialized arrays. (thanks to Simon Alexander) diff --git a/src/compiler/generic/vm-tran.lisp b/src/compiler/generic/vm-tran.lisp index 7866594..36d4227 100644 --- a/src/compiler/generic/vm-tran.lisp +++ b/src/compiler/generic/vm-tran.lisp @@ -318,7 +318,8 @@ (floor (1- length) sb!vm:n-word-bits)))) ((= i end-1) (let* ((extra (1+ (mod (1- length) sb!vm:n-word-bits))) - (mask (1- (ash 1 extra))) + (mask (ash #.(1- (ash 1 sb!vm:n-word-bits)) + (- extra sb!vm:n-word-bits))) (numx (logand (ash mask @@ -357,7 +358,8 @@ sb!vm:n-word-bits)))) ((= index end-1) (let* ((extra (1+ (mod (1- length) sb!vm:n-word-bits))) - (mask (1- (ash 1 extra))) + (mask (ash #.(1- (ash 1 sb!vm:n-word-bits)) + (- extra sb!vm:n-word-bits))) (bits (logand (ash mask ,(ecase sb!c:*backend-byte-order* (:little-endian 0) diff --git a/src/compiler/x86-64/arith.lisp b/src/compiler/x86-64/arith.lisp index fad7497..c4fd46e 100644 --- a/src/compiler/x86-64/arith.lisp +++ b/src/compiler/x86-64/arith.lisp @@ -1261,8 +1261,6 @@ ;; (no -C variant as x86 MUL instruction doesn't take an immediate) (def * nil)) -;;; (no -C variant as x86 MUL instruction doesn't take an immediate) - (define-vop (fast-ash-left-mod64-c/unsigned=>unsigned fast-ash-c/unsigned=>unsigned) (:translate ash-left-mod64)) diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index f4bc19c..cf08c46 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -1728,3 +1728,14 @@ (type number p2)) (eql (the (complex double-float) p1) p2))) c0 #c(12 612/979))))) + +;;; reported by Lutz Euler: we shouldn't signal a compiler note for +;;; simple-bit-vector functions. +(handler-bind ((sb-ext:compiler-note #'error)) + (compile nil '(lambda (x) + (declare (type simple-bit-vector x)) + (count 1 x)))) +(handler-bind ((sb-ext:compiler-note #'error)) + (compile nil '(lambda (x y) + (declare (type simple-bit-vector x y)) + (equal x y)))) diff --git a/version.lisp-expr b/version.lisp-expr index a616f73..2008491 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.20.1" +"0.8.20.2"