[movitz-cvs] CVS update: movitz/losp/muerte/integers.lisp
Frode Vatvedt Fjeld
ffjeld at common-lisp.net
Thu Jun 10 01:30:31 UTC 2004
Update of /project/movitz/cvsroot/movitz/losp/muerte
In directory common-lisp.net:/tmp/cvs-serv3889
Modified Files:
integers.lisp
Log Message:
Re-wrote rem in terms of truncate, taking advantage of truncate's
bignum support.
Date: Wed Jun 9 18:30:31 2004
Author: ffjeld
Index: movitz/losp/muerte/integers.lisp
diff -u movitz/losp/muerte/integers.lisp:1.32 movitz/losp/muerte/integers.lisp:1.33
--- movitz/losp/muerte/integers.lisp:1.32 Wed Jun 9 18:25:27 2004
+++ movitz/losp/muerte/integers.lisp Wed Jun 9 18:30:31 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.32 2004/06/10 01:25:27 ffjeld Exp $
+;;;; $Id: integers.lisp,v 1.33 2004/06/10 01:30:31 ffjeld Exp $
;;;;
;;;;------------------------------------------------------------------
@@ -1316,18 +1316,7 @@
(t (error "Don't know."))))
(defun rem (dividend divisor)
- (with-inline-assembly (:returns :eax)
- (:compile-form (:result-mode :eax) dividend)
- (:compile-form (:result-mode :ebx) divisor)
- (:movl :eax :ecx)
- (:orl :ebx :ecx)
- (:testb #.movitz::+movitz-fixnum-zmask+ :cl)
- (:jnz '(:sub-program (not-integer) (:int 107)))
- (:cdq :eax :edx)
- (:idivl :ebx :eax :edx)
- (:movl :edx :eax)))
-
-
+ (nth-value 1 (truncate dividend divisor)))
(defun mod (number divisor)
"Returns second result of FLOOR."
More information about the Movitz-cvs
mailing list