0.8.3.63:
authorChristophe Rhodes <csr21@cam.ac.uk>
Mon, 15 Sep 2003 09:59:11 +0000 (09:59 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Mon, 15 Sep 2003 09:59:11 +0000 (09:59 +0000)
Bignum multiplication on the Alpha...
... when creating notionally unsigned 32-bit quantities from
notionally unsigned 64-bit quantities, it's quite
important to do a logical and not an arithmetic shift.

NEWS
src/compiler/alpha/arith.lisp
tests/arith.pure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 21ca817..64cff56 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2069,6 +2069,8 @@ changes in sbcl-0.8.4 relative to sbcl-0.8.3:
        with negative last argument.
     ** byte specifiers with zero size and position no longer cause
        an error during type derivation.
+    ** bignum multiplication on the Alpha platform now returns the
+       right answer.
 
 planned incompatible changes in 0.8.x:
   * (not done yet, but planned:) When the profiling interface settles
index 1da0e8c..5b07201 100644 (file)
   (:generator 6
     (inst mulq x y lo)
     (inst addq lo carry-in lo)
-    (inst sra lo 32 hi)
+    (inst srl lo 32 hi)
     (inst mskll lo 4 lo)))
 
 
     (inst mulq x y lo)
     (inst addq lo prev lo)
     (inst addq lo carry-in lo)
-    (inst sra lo 32 hi)
+    (inst srl lo 32 hi)
     (inst mskll lo 4 lo)))
 
 (define-vop (bignum-mult)
index 841f6ef..ce3cfa4 100644 (file)
   (assert (= (funcall f 1) 0))
   (assert (= (funcall f most-positive-fixnum) 0))
   (assert (= (funcall f -1) 0)))
+
+;;; Alpha bignum arithmetic bug:
+(assert (= (* 966082078641 419216044685) 404997107848943140073085))
index 7eb9696..3c18389 100644 (file)
@@ -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.3.62"
+"0.8.3.63"