Update of /project/movitz/cvsroot/movitz/losp/muerte In directory common-lisp.net:/tmp/cvs-serv26280
Modified Files: bignums.lisp Log Message: Added bignum-notf.
Date: Thu Sep 1 00:33:03 2005 Author: ffjeld
Index: movitz/losp/muerte/bignums.lisp diff -u movitz/losp/muerte/bignums.lisp:1.16 movitz/losp/muerte/bignums.lisp:1.17 --- movitz/losp/muerte/bignums.lisp:1.16 Sat Aug 20 22:25:41 2005 +++ movitz/losp/muerte/bignums.lisp Thu Sep 1 00:33:03 2005 @@ -10,7 +10,7 @@ ;;;; Author: Frode Vatvedt Fjeld frodef@acm.org ;;;; Created at: Sat Jul 17 19:42:57 2004 ;;;; -;;;; $Id: bignums.lisp,v 1.16 2005/08/20 20:25:41 ffjeld Exp $ +;;;; $Id: bignums.lisp,v 1.17 2005/08/31 22:33:03 ffjeld Exp $ ;;;; ;;;;------------------------------------------------------------------
@@ -548,3 +548,19 @@
(defun %bignum-plus-fixnum-size (x fixnum-delta) (compiler-macro-call %bignum-plus-fixnum-size x fixnum-delta)) + +(defun bignum-notf (x) + (check-type x bignum) + (macrolet + ((do-it () + `(with-inline-assembly (:returns :eax) + (:load-lexical (:lexical-binding x) :eax) + (:xorl :edx :edx) + (:xorl :ecx :ecx) + (:movw (:eax (:offset movitz-bignum length)) :cx) + loop + (:notl (:eax :edx (:offset movitz-bignum bigit0))) + (:addl 4 :edx) + (:cmpl :edx :ecx) + (:ja 'loop)))) + (do-it)))