* fixed some bugs revealed by Paul Dietz' test suite:
** compiler failure in compiling LOGAND expressions including a
constant 0.
+ ** implementation of ASH-MOD32 on X86 did not work for the shift
+ greater than 32.
planned incompatible changes in 0.8.x:
* (not done yet, but planned:) When the profiling interface settles
(inst lea result (make-ea :dword :index number :scale 8)))
(t
(move result number)
- (cond ((plusp amount) (inst shl result amount))
- ((< amount -31) (inst xor result result))
- (t (inst shr result (- amount))))))))
+ (cond ((< -32 amount 32)
+ ;; this code is used both in ASH and ASH-MOD32, so
+ ;; be careful
+ (if (plusp amount)
+ (inst shl result amount)
+ (inst shr result (- amount))))
+ (t (inst xor result result)))))))
(define-vop (fast-ash-left/signed=>signed)
(:translate ash)
(assert (= (funcall (compile nil (lambda (x) (logand x x 0)))
-1)
0))
+
+;;; MISC.99 from Paul Dietz' random tester: FAST-ASH-MOD32-C VOP
+;;; produced wrong result for shift >=32 on X86
+(assert (= 0 (funcall
+ (compile nil
+ '(lambda (a)
+ (declare (type (integer 4303063 101130078) a))
+ (mask-field (byte 18 2) (ash a 77))))
+ 57132532)))
;;; 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.6"
+"0.8.5.7"