[movitz-cvs] CVS update: movitz/losp/muerte/integers.lisp

Frode Vatvedt Fjeld ffjeld at common-lisp.net
Fri Sep 16 22:55:15 UTC 2005


Update of /project/movitz/cvsroot/movitz/losp/muerte
In directory common-lisp.net:/tmp/cvs-serv2947

Modified Files:
	integers.lisp 
Log Message:
fast-compare-two-reals would fail for bignum comparison where a bignum
of 8192 bigits (or 262144 bits) was involved.

Date: Sat Sep 17 00:55:12 2005
Author: ffjeld

Index: movitz/losp/muerte/integers.lisp
diff -u movitz/losp/muerte/integers.lisp:1.112 movitz/losp/muerte/integers.lisp:1.113
--- movitz/losp/muerte/integers.lisp:1.112	Sat Sep 17 00:14:59 2005
+++ movitz/losp/muerte/integers.lisp	Sat Sep 17 00:55:11 2005
@@ -9,7 +9,7 @@
 ;;;; Created at:    Wed Nov  8 18:44:57 2000
 ;;;; Distribution:  See the accompanying file COPYING.
 ;;;;                
-;;;; $Id: integers.lisp,v 1.112 2005/09/16 22:14:59 ffjeld Exp $
+;;;; $Id: integers.lisp,v 1.113 2005/09/16 22:55:11 ffjeld Exp $
 ;;;;                
 ;;;;------------------------------------------------------------------
 
@@ -74,12 +74,14 @@
 	    ;; Both n1 and n2 are positive bignums.
 
 	    (:shrl 16 :ecx)
-	    (:cmpw :cx (:eax (:offset movitz-bignum length)))
+	    (:movzxw (:eax (:offset movitz-bignum length)) :edx)
+	    ;; (:cmpw :cx (:eax (:offset movitz-bignum length)))
+	    (:cmpl :ecx :edx)
 	    (:jne '(:sub-program (positive-different-sizes)
 		    (:ret)))
 
 	    ;; Both n1 and n2 are positive bignums of the same size, namely ECX.
-	    (:movl :ecx :edx)		; counter
+	    ;; (:movl :ecx :edx)		; counter
 	   positive-compare-loop
 	    (:subl ,movitz:+movitz-fixnum-factor+ :edx)
 	    (:jz 'positive-compare-lsb)
@@ -1053,10 +1055,6 @@
 			(i 0 (+ i 29)))
 		       ((>= i length) (bignum-canonicalize r))
 		     (bignum-set-zerof tmp)
-		     (when (get 'foo 'foo)
-		       (format t "~&i: ~D, y: #x~X ~S/~S~%" i (ldb (byte 29 i) y) 
-			       (integer-length x)
-			       (integer-length y)))
 		     (bignum-addf r (bignum-shift-leftf (bignum-mulf (bignum-addf tmp x)
 								     (ldb (byte 29 i) y))
 							i)))




More information about the Movitz-cvs mailing list