Skip to content
Snippets Groups Projects
Commit a7688b42 authored by wlott's avatar wlott
Browse files

Added exports for the symbols we want exported. Added vm: in front of

symbols we want from the VM package.
parent d76a0332
No related branches found
No related tags found
No related merge requests found
...@@ -11,6 +11,28 @@ ...@@ -11,6 +11,28 @@
;;; ;;;
(in-package "BIGNUM") (in-package "BIGNUM")
(use-package "KERNEL")
;;; These symbols define the interface to the number code.
(export '(add-bignums multiply-bignums negate-bignum subtract-bignum
multiply-bignum-and-fixnum multiply-fixnums
bignum-ashift-right bignum-ashift-left bignum-gcd
bignum-to-float float-bignum-ratio bignum-integer-length
bignum-logical-and bignum-logical-ior bignum-logical-xor
bignum-logical-not bignum-load-byte bignum-deposit-byte
bignum-truncate bignum-plus-p bignum-compare make-small-bignum
bignum-logcount))
;;; These symbols define the interface to the compiler.
(export '(bignum-type bignum-element-type bignum-index %allocate-bignum
%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
%ashr %digit-logical-shift-right))
;;;; Notes. ;;;; Notes.
...@@ -1027,26 +1049,26 @@ ...@@ -1027,26 +1049,26 @@
(defun single-float-from-bits (bits exp plusp) (defun single-float-from-bits (bits exp plusp)
(declare (fixnum exp)) (declare (fixnum exp))
(let ((res (dpb exp (let ((res (dpb exp
single-float-exponent-byte vm:single-float-exponent-byte
(logandc2 (ext:truly-the (unsigned-byte 31) (logandc2 (ext:truly-the (unsigned-byte 31)
(%bignum-ref bits 1)) (%bignum-ref bits 1))
single-float-hidden-bit)))) vm:single-float-hidden-bit))))
(make-single-float (make-single-float
(if plusp (if plusp
res res
(logior res (ash -1 float-sign-shift)))))) (logior res (ash -1 vm:float-sign-shift))))))
;;; ;;;
(defun double-float-from-bits (bits exp plusp) (defun double-float-from-bits (bits exp plusp)
(declare (fixnum exp)) (declare (fixnum exp))
(let ((hi (dpb exp (let ((hi (dpb exp
double-float-exponent-byte vm:double-float-exponent-byte
(logandc2 (ext:truly-the (unsigned-byte 31) (logandc2 (ext:truly-the (unsigned-byte 31)
(%bignum-ref bits 2)) (%bignum-ref bits 2))
double-float-hidden-bit)))) vm:double-float-hidden-bit))))
(make-double-float (make-double-float
(if plusp (if plusp
hi hi
(logior hi (ash -1 float-sign-shift))) (logior hi (ash -1 vm:float-sign-shift)))
(%bignum-ref bits 1)))) (%bignum-ref bits 1))))
...@@ -1079,14 +1101,14 @@ ...@@ -1079,14 +1101,14 @@
(single-float (single-float
(single-float-from-bits (single-float-from-bits
bits bits
(check-exponent len single-float-bias (check-exponent len vm:single-float-bias
single-float-normal-exponent-max) vm:single-float-normal-exponent-max)
plusp)) plusp))
(double-float (double-float
(double-float-from-bits (double-float-from-bits
bits bits
(check-exponent len double-float-bias (check-exponent len vm:double-float-bias
double-float-normal-exponent-max) vm:double-float-normal-exponent-max)
plusp)))) plusp))))
(check-exponent (exp bias max) (check-exponent (exp bias max)
(let ((exp (+ exp bias))) (let ((exp (+ exp bias)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment