[movitz-cvs] CVS update: movitz/losp/muerte/integers.lisp
Frode Vatvedt Fjeld
ffjeld at common-lisp.net
Wed Jul 14 12:16:28 UTC 2004
Update of /project/movitz/cvsroot/movitz/losp/muerte
In directory common-lisp.net:/tmp/cvs-serv5794
Modified Files:
integers.lisp
Log Message:
Fixed - for negative bignums.
Date: Wed Jul 14 05:16:28 2004
Author: ffjeld
Index: movitz/losp/muerte/integers.lisp
diff -u movitz/losp/muerte/integers.lisp:1.56 movitz/losp/muerte/integers.lisp:1.57
--- movitz/losp/muerte/integers.lisp:1.56 Wed Jul 14 05:03:58 2004
+++ movitz/losp/muerte/integers.lisp Wed Jul 14 05:16:28 2004
@@ -9,7 +9,7 @@
;;;; Created at: Wed Nov 8 18:44:57 2000
;;;; Distribution: See the accompanying file COPYING.
;;;;
-;;;; $Id: integers.lisp,v 1.56 2004/07/14 12:03:58 ffjeld Exp $
+;;;; $Id: integers.lisp,v 1.57 2004/07/14 12:16:28 ffjeld Exp $
;;;;
;;;;------------------------------------------------------------------
@@ -454,12 +454,10 @@
(:compile-two-forms (:eax :ebx) minuend subtrahend)
(:subl :ebx :eax)
(:into)))
- ((bignum fixnum)
+ ((positive-bignum fixnum)
(+ (- subtrahend) minuend))
- ((fixnum bignum)
+ ((fixnum positive-bignum)
(- (+ (- minuend) subtrahend)))
- (((integer 0 *) (integer * -1))
- (+ minuend (- subtrahend)))
((positive-bignum positive-bignum)
(cond
((= minuend subtrahend)
@@ -485,7 +483,14 @@
(:eax :edx ,(bt:slot-offset 'movitz::movitz-bignum 'movitz::bigit0)))
(:jc '(:sub-program (should-not-happen)
(:int 107)))
- ))))))))
+ )))))
+ (((integer 0 *) (integer * -1))
+ (+ minuend (- subtrahend)))
+ (((integer * -1) (integer 0 *))
+ (- (+ (- minuend) subtrahend)))
+ (((integer * -1) (integer * -1))
+ (+ minuend (- subtrahend)))
+ )))
(do-it)))
(t (minuend &rest subtrahends)
(declare (dynamic-extent subtrahends))
More information about the Movitz-cvs
mailing list