X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcompiler.pure.lisp;h=cadd0b07358dc2978b012fe9005b08af59903c66;hb=75b52379bdc2269961af6a1308eca63610f38ac3;hp=0799a59e3ad53495421c787c29517b9b696d5294;hpb=b54a8ae1b85ba81082053646a7dd84fc97b56110;p=sbcl.git diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index 0799a59..cadd0b0 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -1431,3 +1431,12 @@ (declare (type (integer 3 6) y) (type (integer -6 -3) x)) (+ (logxor x y) most-positive-fixnum))))) + +;;; check that modular ash gives the right answer, to protect against +;;; possible misunderstandings about the hardware shift instruction. +(assert (zerop (funcall + (compile nil '(lambda (x y) + (declare (optimize speed) + (type (unsigned-byte 32) x y)) + (logand #xffffffff (ash x y)))) + 1 257)))