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

Frode Vatvedt Fjeld ffjeld at common-lisp.net
Fri Aug 12 21:37:43 UTC 2005


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

Modified Files:
	integers.lisp 
Log Message:
Fixed logand to deal with e.g. (logand #x-10 #x1234567345).

Date: Fri Aug 12 23:37:43 2005
Author: ffjeld

Index: movitz/losp/muerte/integers.lisp
diff -u movitz/losp/muerte/integers.lisp:1.106 movitz/losp/muerte/integers.lisp:1.107
--- movitz/losp/muerte/integers.lisp:1.106	Tue May 24 08:33:24 2005
+++ movitz/losp/muerte/integers.lisp	Fri Aug 12 23:37:42 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.106 2005/05/24 06:33:24 ffjeld Exp $
+;;;; $Id: integers.lisp,v 1.107 2005/08/12 21:37:42 ffjeld Exp $
 ;;;;                
 ;;;;------------------------------------------------------------------
 
@@ -1559,6 +1559,16 @@
 		   (:compile-form (:result-mode :eax) x)
 		   (:leal ((:ecx ,movitz:+movitz-fixnum-factor+)) :ecx)
 		   (:andl :ecx :eax)))
+		((fixnum positive-bignum)
+		 (let ((result (copy-bignum y)))
+		   (with-inline-assembly (:returns :eax)
+		     (:compile-two-forms (:eax :untagged-fixnum-ecx) result x)
+		     (:andl :ecx (:eax (:offset movitz-bignum bigit0))))))
+		((positive-bignum fixnum)
+		 (let ((result (copy-bignum x)))
+		   (with-inline-assembly (:returns :eax)
+		     (:compile-two-forms (:eax :untagged-fixnum-ecx) result y)
+		     (:andl :ecx (:eax (:offset movitz-bignum bigit0))))))
 		((positive-bignum positive-bignum)
 		 (if (< (%bignum-bigits y) (%bignum-bigits x))
 		     (logand y x)




More information about the Movitz-cvs mailing list