From: Nikodemus Siivola Date: Fri, 5 Aug 2011 11:56:00 +0000 (+0300) Subject: rename %FLOOR to %BIGFLOOR X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=38440de88f807327380cc5883aa8a670f6ff8b54;p=sbcl.git rename %FLOOR to %BIGFLOOR --- diff --git a/package-data-list.lisp-expr b/package-data-list.lisp-expr index b17b5ed..0af7bd7 100644 --- a/package-data-list.lisp-expr +++ b/package-data-list.lisp-expr @@ -163,7 +163,7 @@ of SBCL which maintained the CMU-CL-style split into two packages.)" "%BIGNUM-SET-LENGTH" "%DIGIT-0-OR-PLUSP" "%DIGIT-LOGICAL-SHIFT-RIGHT" "%FIXNUM-DIGIT-WITH-CORRECT-SIGN" "%FIXNUM-TO-DIGIT" - "%FLOOR" "%LOGAND" "%LOGIOR" "%LOGNOT" "%LOGXOR" + "%BIGFLOOR" "%LOGAND" "%LOGIOR" "%LOGNOT" "%LOGXOR" "%MULTIPLY" "%MULTIPLY-AND-ADD" "%SUBTRACT-WITH-BORROW" "ADD-BIGNUMS" "BIGNUM-ASHIFT-LEFT" "BIGNUM-ASHIFT-RIGHT" diff --git a/src/code/bignum.lisp b/src/code/bignum.lisp index af0f06a..f4e840d 100644 --- a/src/code/bignum.lisp +++ b/src/code/bignum.lisp @@ -28,7 +28,7 @@ ;;; %bignum-length %bignum-set-length %bignum-ref %bignum-set ;;; %digit-0-or-plusp %add-with-carry %subtract-with-borrow ;;; %multiply-and-add %multiply %lognot %logand %logior %logxor -;;; %fixnum-to-digit %floor %fixnum-digit-with-correct-sign %ashl +;;; %fixnum-to-digit %bigfloor %fixnum-digit-with-correct-sign %ashl ;;; %ashr %digit-logical-shift-right)) ;;; The following interfaces will either be assembler routines or code @@ -67,7 +67,7 @@ ;;; LDB ;;; %FIXNUM-TO-DIGIT ;;; TRUNCATE -;;; %FLOOR +;;; %BIGFLOOR ;;; ;;; Note: The floating routines know about the float representation. ;;; @@ -216,13 +216,13 @@ ;;; dividing the first two as a 2*digit-size integer by the third. ;;; ;;; Do weird LET and SETQ stuff to bamboozle the compiler into allowing -;;; the %FLOOR transform to expand into pseudo-assembler for which the +;;; the %BIGFLOOR transform to expand into pseudo-assembler for which the ;;; compiler can later correctly allocate registers. -(defun %floor (a b c) +(defun %bigfloor (a b c) (let ((a a) (b b) (c c)) (declare (type bignum-element-type a b c)) (setq a a b b c c) - (%floor a b c))) + (%bigfloor a b c))) ;;; Convert the digit to a regular integer assuming that the digit is signed. (defun %fixnum-digit-with-correct-sign (digit) @@ -1557,10 +1557,10 @@ ;;; normalization. ;;; ;;; We don't have to worry about shifting Y to make its most - ;;; significant digit sufficiently large for %FLOOR to return + ;;; significant digit sufficiently large for %BIGFLOOR to return ;;; digit-size quantities for the q-digit and r-digit. If Y is ;;; a single digit bignum, it is already large enough for - ;;; %FLOOR. That is, it has some bits on pretty high in the + ;;; %BIGFLOOR. That is, it has some bits on pretty high in the ;;; digit. ((bignum-truncate-single-digit (x len-x y) (declare (type bignum-index len-x)) @@ -1598,7 +1598,7 @@ (values q rem))) (declare (type bignum-element-type r)) (multiple-value-bind (q-digit r-digit) - (%floor r (%bignum-ref x i) y) + (%bigfloor r (%bignum-ref x i) y) (declare (type bignum-element-type q-digit r-digit)) (setf (%bignum-ref q i) q-digit) (setf r r-digit)))))) @@ -1626,7 +1626,7 @@ (declare (type bignum-element-type y1 y2 x-i x-i-1 x-i-2)) (let ((guess (if (%digit-compare x-i y1) all-ones-digit - (%floor x-i x-i-1 y1)))) + (%bigfloor x-i x-i-1 y1)))) (declare (type bignum-element-type guess)) (loop (multiple-value-bind (high-guess*y1 low-guess*y1) @@ -1773,7 +1773,7 @@ ;;; digit-size. ;;; ;;; We shift y to make it sufficiently large that doing the - ;;; 2*digit-size by digit-size %FLOOR calls ensures the quotient and + ;;; 2*digit-size by digit-size %BIGFLOOR calls ensures the quotient and ;;; remainder fit in digit-size. (shift-y-for-truncate (y) (let* ((len (%bignum-length y)) @@ -1862,7 +1862,7 @@ ;;;; There used to be a pile of code for implementing division for bignum digits ;;;; for machines that don't have a 2*digit-size by digit-size divide instruction. ;;;; This happens to be most machines, but all the SBCL ports seem to be content -;;;; to implement SB-BIGNUM:%FLOOR as a VOP rather than using the code here. +;;;; to implement SB-BIGNUM:%BIGFLOOR as a VOP rather than using the code here. ;;;; So it's been deleted. --njf, 2007-02-04 ;;;; general utilities diff --git a/src/compiler/alpha/arith.lisp b/src/compiler/alpha/arith.lisp index 7a1eaac..b50500d 100644 --- a/src/compiler/alpha/arith.lisp +++ b/src/compiler/alpha/arith.lisp @@ -761,7 +761,7 @@ (inst sra fixnum n-fixnum-tag-bits digit))) (define-vop (bignum-floor) - (:translate sb!bignum:%floor) + (:translate sb!bignum:%bigfloor) (:policy :fast-safe) (:args (num-high :scs (unsigned-reg)) (num-low :scs (unsigned-reg)) diff --git a/src/compiler/generic/vm-fndb.lisp b/src/compiler/generic/vm-fndb.lisp index e608152..ab7489e 100644 --- a/src/compiler/generic/vm-fndb.lisp +++ b/src/compiler/generic/vm-fndb.lisp @@ -290,7 +290,7 @@ (defknown %fixnum-to-digit (fixnum) bignum-element-type (foldable flushable movable)) -(defknown %floor (bignum-element-type bignum-element-type bignum-element-type) +(defknown %bigfloor (bignum-element-type bignum-element-type bignum-element-type) (values bignum-element-type bignum-element-type) (foldable flushable movable)) diff --git a/src/compiler/hppa/arith.lisp b/src/compiler/hppa/arith.lisp index 4077c41..68177d5 100644 --- a/src/compiler/hppa/arith.lisp +++ b/src/compiler/hppa/arith.lisp @@ -863,7 +863,7 @@ (inst sra fixnum n-fixnum-tag-bits digit))) (define-vop (bignum-floor) - (:translate sb!bignum:%floor) + (:translate sb!bignum:%bigfloor) (:policy :fast-safe) (:args (hi :scs (unsigned-reg) :to (:argument 1)) (lo :scs (unsigned-reg) :to (:argument 0)) diff --git a/src/compiler/mips/arith.lisp b/src/compiler/mips/arith.lisp index 70649f5..f0cf8ac 100644 --- a/src/compiler/mips/arith.lisp +++ b/src/compiler/mips/arith.lisp @@ -859,7 +859,7 @@ (inst sra digit fixnum n-fixnum-tag-bits))) (define-vop (bignum-floor) - (:translate sb!bignum:%floor) + (:translate sb!bignum:%bigfloor) (:policy :fast-safe) (:args (num-high :scs (unsigned-reg) :target rem) (num-low :scs (unsigned-reg) :target rem-low) diff --git a/src/compiler/ppc/arith.lisp b/src/compiler/ppc/arith.lisp index f8cb9aa..448d018 100644 --- a/src/compiler/ppc/arith.lisp +++ b/src/compiler/ppc/arith.lisp @@ -1169,7 +1169,7 @@ (define-vop (bignum-floor) - (:translate sb!bignum:%floor) + (:translate sb!bignum:%bigfloor) (:policy :fast-safe) (:args (num-high :scs (unsigned-reg) :target rem) (num-low :scs (unsigned-reg) :target rem-low) @@ -1207,7 +1207,7 @@ #| (define-vop (bignum-floor) - (:translate sb!bignum:%floor) + (:translate sb!bignum:%bigfloor) (:policy :fast-safe) (:args (div-high :scs (unsigned-reg) :target rem) (div-low :scs (unsigned-reg) :target quo) diff --git a/src/compiler/sparc/arith.lisp b/src/compiler/sparc/arith.lisp index de8d3e6..cc3d6b0 100644 --- a/src/compiler/sparc/arith.lisp +++ b/src/compiler/sparc/arith.lisp @@ -1040,7 +1040,7 @@ (inst sra digit fixnum n-fixnum-tag-bits))) (define-vop (bignum-floor) - (:translate sb!bignum:%floor) + (:translate sb!bignum:%bigfloor) (:policy :fast-safe) (:args (div-high :scs (unsigned-reg) :target rem) (div-low :scs (unsigned-reg) :target quo) @@ -1064,7 +1064,7 @@ (inst not quo))) (define-vop (bignum-floor-v8) - (:translate sb!bignum:%floor) + (:translate sb!bignum:%bigfloor) (:policy :fast-safe) (:args (div-high :scs (unsigned-reg) :target rem) (div-low :scs (unsigned-reg) :target quo) @@ -1093,7 +1093,7 @@ (move quo q)))) (define-vop (bignum-floor-v9) - (:translate sb!bignum:%floor) + (:translate sb!bignum:%bigfloor) (:policy :fast-safe) (:args (div-high :scs (unsigned-reg)) (div-low :scs (unsigned-reg)) diff --git a/src/compiler/x86-64/arith.lisp b/src/compiler/x86-64/arith.lisp index cc41f3d..02531a3 100644 --- a/src/compiler/x86-64/arith.lisp +++ b/src/compiler/x86-64/arith.lisp @@ -1628,7 +1628,7 @@ constant shift greater than word length"))) (inst sar digit 3))) (define-vop (bignum-floor) - (:translate sb!bignum:%floor) + (:translate sb!bignum:%bigfloor) (:policy :fast-safe) (:args (div-high :scs (unsigned-reg) :target edx) (div-low :scs (unsigned-reg) :target eax) diff --git a/src/compiler/x86/arith.lisp b/src/compiler/x86/arith.lisp index 4c97c40..92a0967 100644 --- a/src/compiler/x86/arith.lisp +++ b/src/compiler/x86/arith.lisp @@ -1592,7 +1592,7 @@ constant shift greater than word length"))) (inst sar digit n-fixnum-tag-bits))) (define-vop (bignum-floor) - (:translate sb!bignum:%floor) + (:translate sb!bignum:%bigfloor) (:policy :fast-safe) (:args (div-high :scs (unsigned-reg) :target edx) (div-low :scs (unsigned-reg) :target eax)