(eval-when (:compile-toplevel :load-toplevel :execute)
-(def!constant n-word-bits 32
- #!+sb-doc
- "Number of bits per word where a word holds one lisp descriptor.")
+;;; number of bits per word where a word holds one lisp descriptor
+(def!constant n-word-bits 32)
;;; the natural width of a machine word (as seen in e.g. register width,
;;; address space)
(def!constant n-machine-word-bits 64)
-(def!constant n-byte-bits 8
- #!+sb-doc
- "Number of bits per byte where a byte is the smallest addressable object.")
-
-(def!constant word-shift (1- (integer-length (/ n-word-bits n-byte-bits)))
- #!+sb-doc
- "Number of bits to shift between word addresses and byte addresses.")
-
-(def!constant n-word-bytes (/ n-word-bits n-byte-bits)
- #!+sb-doc
- "Number of bytes in a word.")
+;;; number of bits per byte where a byte is the smallest addressable
+;;; object
+(def!constant n-byte-bits 8)
(def!constant float-sign-shift 31)
;; The EVAL-WHEN is necessary (at least for Lispworks), because the
;; second DEFENUM uses the value of OTHER-IMMEDIATE-0-LOWTAG, which is
;; defined in the first DEFENUM. -- AL 20000216
- #!+x86-64
+ #!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
(defenum (:suffix -lowtag)
even-fixnum
instance-pointer
pad3 pad4 pad5
other-immediate-3
other-pointer)
- #!-x86-64
+ #!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
(defenum (:suffix -lowtag)
even-fixnum
instance-pointer
;;; the bit width of positive fixnums
(def!constant n-positive-fixnum-bits (- n-word-bits n-fixnum-tag-bits 1))
+;;; the number of bits to shift between word addresses and byte addresses
+(def!constant word-shift (1- (integer-length (/ n-word-bits n-byte-bits))))
+
+;;; the number of bytes in a word
+(def!constant n-word-bytes (/ n-word-bits n-byte-bits))
+
;;; the number of bits used in the header word of a data block to store
;;; the type
(def!constant n-widetag-bits 8)
(make-bvref-n 64))
;; lispobj-sized word, whatever that may be
+;; hopefully nobody ever wants a 128-bit SBCL...
+#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
+(progn
(defun bvref-word (bytes index)
- #!+x86-64 (bvref-64 bytes index)
- #!-x86-64 (bvref-32 bytes index))
+ (bvref-64 bytes index))
+(defun (setf bvref-word) (new-val bytes index)
+ (setf (bvref-64 bytes index) new-val)))
+#!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
+(progn
+(defun bvref-word (bytes index)
+ (bvref-32 bytes index))
(defun (setf bvref-word) (new-val bytes index)
- #!+x86-64 (setf (bvref-64 bytes index) new-val)
- #!-x86-64 (setf (bvref-32 bytes index) new-val))
+ (setf (bvref-32 bytes index) new-val)))
+
\f
;;;; representation of spaces in the core
\f
;;;; Machine Architecture parameters:
-(def!constant n-word-bits 32
- "Number of bits per word where a word holds one lisp descriptor.")
+;;; number of bits per word where a word holds one lisp descriptor
+(def!constant n-word-bits 32)
;;; the natural width of a machine word (as seen in e.g. register width,
;;; address space)
(def!constant n-machine-word-bits 32)
-(def!constant n-byte-bits 8
- "Number of bits per byte where a byte is the smallest addressable object.")
-
-(def!constant word-shift (1- (integer-length (/ n-word-bits n-byte-bits)))
- "Number of bits to shift between word addresses and byte addresses.")
-
-(def!constant n-word-bytes (/ n-word-bits n-byte-bits)
- "Number of bytes in a word.")
+;;; number of bits per byte where a byte is the smallest addressable
+;;; object
+(def!constant n-byte-bits 8)
(def!constant float-sign-shift 31)
(in-package "SB!VM")
-(def!constant n-word-bits 32
- "Number of bits per word where a word holds one lisp descriptor.")
+;;; number of bits per word where a word holds one lisp descriptor
+(def!constant n-word-bits 32)
;;; the natural width of a machine word (as seen in e.g. register width,
;;; address space)
(def!constant n-machine-word-bits 32)
-(def!constant n-byte-bits 8
- "Number of bits per byte where a byte is the smallest addressable object.")
-
-(def!constant word-shift (1- (integer-length (/ n-word-bits n-byte-bits)))
- "Number of bits to shift between word addresses and byte addresses.")
-
-(def!constant n-word-bytes (/ n-word-bits n-byte-bits)
- "Number of bytes in a word.")
+;;; number of bits per byte where a byte is the smallest addressable
+;;; object
+(def!constant n-byte-bits 8)
(def!constant float-sign-shift 31)
(in-package "SB!VM")
-(def!constant n-word-bits 32
- "Number of bits per word where a word holds one lisp descriptor.")
+;;; number of bits per word where a word holds one lisp descriptor
+(def!constant n-word-bits 32)
;;; the natural width of a machine word (as seen in e.g. register width,
;;; address space)
(def!constant n-machine-word-bits 32)
-(def!constant n-byte-bits 8
- "Number of bits per byte where a byte is the smallest addressable object.")
-
-(def!constant word-shift (1- (integer-length (/ n-word-bits n-byte-bits)))
- "Number of bits to shift between word addresses and byte addresses.")
-
-(def!constant n-word-bytes (/ n-word-bits n-byte-bits)
- "Number of bytes in a word.")
+;;; number of bits per byte where a byte is the smallest addressable
+;;; object
+(def!constant n-byte-bits 8)
(def!constant float-sign-shift 31)
;;;; Machine Architecture parameters:
(eval-when (:compile-toplevel :load-toplevel :execute)
-(def!constant n-word-bits 32
- #!+sb-doc
- "Number of bits per word where a word holds one lisp descriptor.")
+;;; number of bits per word where a word holds one lisp descriptor
+(def!constant n-word-bits 32)
;;; the natural width of a machine word (as seen in e.g. register width,
;;; address space)
(def!constant n-machine-word-bits 32)
-(def!constant n-byte-bits 8
- #!+sb-doc
- "Number of bits per byte where a byte is the smallest addressable object.")
-
-(def!constant word-shift (1- (integer-length (/ n-word-bits n-byte-bits)))
- #!+sb-doc
- "Number of bits to shift between word addresses and byte addresses.")
-
-(def!constant n-word-bytes (/ n-word-bits n-byte-bits)
- #!+sb-doc
- "Number of bytes in a word.")
+;;; number of bits per byte where a byte is the smallest addressable object
+(def!constant n-byte-bits 8)
(def!constant float-sign-shift 31)
;;; addressable object
(def!constant n-byte-bits 8)
-;;; the number of bits to shift between word addresses and byte addresses
-(def!constant word-shift (1- (integer-length (/ n-word-bits n-byte-bits))))
-
-;;; the number of bytes in a word
-(def!constant n-word-bytes (/ n-word-bits n-byte-bits))
-
(def!constant float-sign-shift 31)
;;; comment from CMU CL:
;;; addressable object
(def!constant n-byte-bits 8)
-;;; the number of bits to shift between word addresses and byte addresses
-(def!constant word-shift (1- (integer-length (/ n-word-bits n-byte-bits))))
-
-;;; the number of bytes in a word
-(def!constant n-word-bytes (/ n-word-bits n-byte-bits))
-
(def!constant float-sign-shift 31)
;;; comment from CMU CL:
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.13.33"
+"0.8.13.34"