Update of /cvsroot/sbcl/sbcl/src/compiler/generic
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10217/src/compiler/generic
Modified Files:
vm-tran.lisp
Log Message:
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 <integer 1 n-word-bits>)) as
(ash #xff...ff (- n-word-bits <integer 1 n-word-bits>))
Index: vm-tran.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/compiler/generic/vm-tran.lisp,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- vm-tran.lisp 31 Jan 2005 16:57:23 -0000 1.64
+++ vm-tran.lisp 1 Mar 2005 10:54:38 -0000 1.65
@@ -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)
|