;; 32-bit and 64-bit ports. Other bits connected to the
;; same issue are noted throughout the code below with
;; the tag "32/64-bit issues". --njf, 2004-08-09
- "OBJECT-NOT-SIMPLE-ARRAY-UNSIGNED-BYTE-29-ERROR"
+ "OBJECT-NOT-SIMPLE-ARRAY-UNSIGNED-FIXNUM-ERROR"
"OBJECT-NOT-SIMPLE-ARRAY-UNSIGNED-BYTE-31-ERROR"
"OBJECT-NOT-SIMPLE-ARRAY-UNSIGNED-BYTE-32-ERROR"
"OBJECT-NOT-SIMPLE-ARRAY-UNSIGNED-BYTE-4-ERROR"
;; FIXME: 32/64-bit issues
- "OBJECT-NOT-SIMPLE-ARRAY-UNSIGNED-BYTE-60-ERROR"
"OBJECT-NOT-SIMPLE-ARRAY-UNSIGNED-BYTE-63-ERROR"
"OBJECT-NOT-SIMPLE-ARRAY-UNSIGNED-BYTE-64-ERROR"
"OBJECT-NOT-SIMPLE-ARRAY-UNSIGNED-BYTE-7-ERROR"
"OBJECT-NOT-SIMPLE-ARRAY-UNSIGNED-BYTE-8-ERROR"
"OBJECT-NOT-SIMPLE-ARRAY-SIGNED-BYTE-16-ERROR"
- ;; FIXME: 32/64-bit issues
- "OBJECT-NOT-SIMPLE-ARRAY-SIGNED-BYTE-30-ERROR"
+ "OBJECT-NOT-SIMPLE-ARRAY-FIXNUM-ERROR"
"OBJECT-NOT-SIMPLE-ARRAY-SIGNED-BYTE-32-ERROR"
- ;; FIXME: 32/64-bit issues
- "OBJECT-NOT-SIMPLE-ARRAY-SIGNED-BYTE-61-ERROR"
"OBJECT-NOT-SIMPLE-ARRAY-SIGNED-BYTE-64-ERROR"
"OBJECT-NOT-SIMPLE-ARRAY-SIGNED-BYTE-8-ERROR"
"OBJECT-NOT-SIMPLE-BIT-VECTOR-ERROR"
"SIMPLE-ARRAY-UNSIGNED-BYTE-15-P"
"SIMPLE-ARRAY-UNSIGNED-BYTE-16-P"
"SIMPLE-ARRAY-UNSIGNED-BYTE-2-P"
- ;; FIXME: 32/64-bit issues
- "SIMPLE-ARRAY-UNSIGNED-BYTE-29-P"
+ "SIMPLE-ARRAY-UNSIGNED-FIXNUM-P"
"SIMPLE-ARRAY-UNSIGNED-BYTE-31-P"
"SIMPLE-ARRAY-UNSIGNED-BYTE-32-P"
"SIMPLE-ARRAY-UNSIGNED-BYTE-4-P"
- ;; FIXME: 32/64-bit issues
- "SIMPLE-ARRAY-UNSIGNED-BYTE-60-P"
"SIMPLE-ARRAY-UNSIGNED-BYTE-63-P"
"SIMPLE-ARRAY-UNSIGNED-BYTE-64-P"
"SIMPLE-ARRAY-UNSIGNED-BYTE-7-P"
"SIMPLE-ARRAY-UNSIGNED-BYTE-8-P"
"SIMPLE-ARRAY-SIGNED-BYTE-16-P"
- "SIMPLE-ARRAY-SIGNED-BYTE-30-P"
+ "SIMPLE-ARRAY-FIXNUM-P"
"SIMPLE-ARRAY-SIGNED-BYTE-32-P"
- ;; FIXME: 32/64-bit issues
- "SIMPLE-ARRAY-SIGNED-BYTE-61-P"
"SIMPLE-ARRAY-SIGNED-BYTE-64-P"
"SIMPLE-ARRAY-SIGNED-BYTE-8-P" "SIMPLE-BASE-STRING-P"
#!+sb-unicode "SIMPLE-CHARACTER-STRING-P"
"VECTOR-UNSIGNED-BYTE-2-P" "VECTOR-UNSIGNED-BYTE-4-P"
"VECTOR-UNSIGNED-BYTE-7-P" "VECTOR-UNSIGNED-BYTE-8-P"
"VECTOR-UNSIGNED-BYTE-15-P" "VECTOR-UNSIGNED-BYTE-16-P"
- "VECTOR-UNSIGNED-BYTE-29-P" "VECTOR-UNSIGNED-BYTE-31-P"
- "VECTOR-UNSIGNED-BYTE-32-P" "VECTOR-UNSIGNED-BYTE-60-P"
+ "VECTOR-UNSIGNED-FIXNUM-P" "VECTOR-UNSIGNED-BYTE-31-P"
+ "VECTOR-UNSIGNED-BYTE-32-P"
"VECTOR-UNSIGNED-BYTE-63-P" "VECTOR-UNSIGNED-BYTE-64-P"
"VECTOR-SIGNED-BYTE-8-P" "VECTOR-SIGNED-BYTE-16-P"
"VECTOR-FIXNUM-P" "VECTOR-SIGNED-BYTE-32-P"
"MEMORY-USAGE" "MOST-POSITIVE-COST"
"N-LOWTAG-BITS"
"N-FIXNUM-TAG-BITS"
+ "N-FIXNUM-BITS"
"N-POSITIVE-FIXNUM-BITS"
"NEGATIVE-IMMEDIATE-SC-NUMBER"
"NFP-SAVE-OFFSET"
"SIMPLE-ARRAY-UNSIGNED-BYTE-15-WIDETAG"
"SIMPLE-ARRAY-UNSIGNED-BYTE-16-WIDETAG"
"SIMPLE-ARRAY-UNSIGNED-BYTE-2-WIDETAG"
- ;; FIXME: 32/64-bit issues
- "SIMPLE-ARRAY-UNSIGNED-BYTE-29-WIDETAG"
+ "SIMPLE-ARRAY-UNSIGNED-FIXNUM-WIDETAG"
"SIMPLE-ARRAY-UNSIGNED-BYTE-31-WIDETAG"
"SIMPLE-ARRAY-UNSIGNED-BYTE-32-WIDETAG"
- ;; FIXME: 32/64-bit issues
- "SIMPLE-ARRAY-UNSIGNED-BYTE-60-WIDETAG"
"SIMPLE-ARRAY-UNSIGNED-BYTE-63-WIDETAG"
"SIMPLE-ARRAY-UNSIGNED-BYTE-64-WIDETAG"
"SIMPLE-ARRAY-UNSIGNED-BYTE-4-WIDETAG"
"SIMPLE-ARRAY-UNSIGNED-BYTE-7-WIDETAG"
"SIMPLE-ARRAY-UNSIGNED-BYTE-8-WIDETAG"
"SIMPLE-ARRAY-SIGNED-BYTE-16-WIDETAG"
- ;; FIXME: 32/64-bit issues
- "SIMPLE-ARRAY-SIGNED-BYTE-30-WIDETAG"
+ "SIMPLE-ARRAY-FIXNUM-WIDETAG"
"SIMPLE-ARRAY-SIGNED-BYTE-32-WIDETAG"
- ;; FIXME: 32/64-bit issues
- "SIMPLE-ARRAY-SIGNED-BYTE-61-WIDETAG"
"SIMPLE-ARRAY-SIGNED-BYTE-64-WIDETAG"
"SIMPLE-ARRAY-SIGNED-BYTE-8-WIDETAG"
"SIMPLE-BIT-VECTOR-WIDETAG"
:direct-superclasses (vector simple-array)
:inherits (vector simple-array array sequence)
:prototype-form (make-array 0 :element-type '(unsigned-byte 16)))
- #!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
- (simple-array-unsigned-byte-29
- :translation (simple-array (unsigned-byte 29) (*))
- :codes (#.sb!vm:simple-array-unsigned-byte-29-widetag)
+
+ (simple-array-unsigned-fixnum
+ :translation (simple-array (unsigned-byte #.sb!vm:n-positive-fixnum-bits) (*))
+ :codes (#.sb!vm:simple-array-unsigned-fixnum-widetag)
:direct-superclasses (vector simple-array)
:inherits (vector simple-array array sequence)
- :prototype-form (make-array 0 :element-type '(unsigned-byte 29)))
+ :prototype-form (make-array 0
+ :element-type '(unsigned-byte #.sb!vm:n-positive-fixnum-bits)))
+
(simple-array-unsigned-byte-31
:translation (simple-array (unsigned-byte 31) (*))
:codes (#.sb!vm:simple-array-unsigned-byte-31-widetag)
:inherits (vector simple-array array sequence)
:prototype-form (make-array 0 :element-type '(unsigned-byte 32)))
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
- (simple-array-unsigned-byte-60
- :translation (simple-array (unsigned-byte 60) (*))
- :codes (#.sb!vm:simple-array-unsigned-byte-60-widetag)
- :direct-superclasses (vector simple-array)
- :inherits (vector simple-array array sequence)
- :prototype-form (make-array 0 :element-type '(unsigned-byte 60)))
- #!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
(simple-array-unsigned-byte-63
:translation (simple-array (unsigned-byte 63) (*))
:codes (#.sb!vm:simple-array-unsigned-byte-63-widetag)
:direct-superclasses (vector simple-array)
:inherits (vector simple-array array sequence)
:prototype-form (make-array 0 :element-type '(signed-byte 16)))
- #!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
- (simple-array-signed-byte-30
- :translation (simple-array (signed-byte 30) (*))
- :codes (#.sb!vm:simple-array-signed-byte-30-widetag)
+
+ (simple-array-fixnum
+ :translation (simple-array (signed-byte #.sb!vm:n-fixnum-bits)
+ (*))
+ :codes (#.sb!vm:simple-array-fixnum-widetag)
:direct-superclasses (vector simple-array)
:inherits (vector simple-array array sequence)
- :prototype-form (make-array 0 :element-type '(signed-byte 30)))
+ :prototype-form (make-array 0
+ :element-type
+ '(signed-byte #.sb!vm:n-fixnum-bits)))
+
(simple-array-signed-byte-32
:translation (simple-array (signed-byte 32) (*))
:codes (#.sb!vm:simple-array-signed-byte-32-widetag)
:inherits (vector simple-array array sequence)
:prototype-form (make-array 0 :element-type '(signed-byte 32)))
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
- (simple-array-signed-byte-61
- :translation (simple-array (signed-byte 61) (*))
- :codes (#.sb!vm:simple-array-signed-byte-61-widetag)
- :direct-superclasses (vector simple-array)
- :inherits (vector simple-array array sequence)
- :prototype-form (make-array 0 :element-type '(signed-byte 61)))
- #!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
(simple-array-signed-byte-64
:translation (simple-array (signed-byte 64) (*))
:codes (#.sb!vm:simple-array-signed-byte-64-widetag)
(simple-array-unsigned-byte-16-widetag . 1)
(simple-array-unsigned-byte-31-widetag . 2)
(simple-array-unsigned-byte-32-widetag . 2)
- (simple-array-unsigned-byte-60-widetag . 3)
+ (simple-array-unsigned-fixnum-widetag . 3)
(simple-array-unsigned-byte-63-widetag . 3)
(simple-array-unsigned-byte-64-widetag . 3)
(simple-array-signed-byte-8-widetag . 0)
(simple-array-signed-byte-16-widetag . 1)
- (simple-array-unsigned-byte-29-widetag . 2)
- (simple-array-signed-byte-30-widetag . 2)
+ (simple-array-fixnum-widetag . 2)
(simple-array-signed-byte-32-widetag . 2)
- (simple-array-signed-byte-61-widetag . 3)
(simple-array-signed-byte-64-widetag . 3)
(simple-array-single-float-widetag . 2)
(simple-array-double-float-widetag . 3)
#.simple-array-unsigned-byte-32-widetag
#.simple-array-signed-byte-8-widetag
#.simple-array-signed-byte-16-widetag
- ;; #.simple-array-signed-byte-30-widetag
#.simple-array-signed-byte-32-widetag
#.simple-array-single-float-widetag
#.simple-array-double-float-widetag
(def-partial-data-vector-frobs simple-array-signed-byte-16 tagged-num
:short t signed-reg)
- (def-full-data-vector-frobs simple-array-unsigned-byte-29 positive-fixnum any-reg)
- (def-full-data-vector-frobs simple-array-signed-byte-30 tagged-num any-reg)
+ (def-full-data-vector-frobs simple-array-unsigned-fixnum positive-fixnum
+ any-reg)
+ (def-full-data-vector-frobs simple-array-fixnum tagged-num any-reg)
(def-full-data-vector-frobs simple-array-signed-byte-32 signed-num
signed-reg)
simple-bit-vector-widetag ; 10101010
simple-vector-widetag ; 10101110
#!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
- simple-array-unsigned-byte-29-widetag ; 10110010
+ simple-array-unsigned-fixnum-widetag ; 10110010
simple-array-unsigned-byte-31-widetag ; 10110110
simple-array-unsigned-byte-32-widetag ; 10111010
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
- simple-array-unsigned-byte-60-widetag
+ simple-array-unsigned-fixnum-widetag
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
simple-array-unsigned-byte-63-widetag
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
simple-array-signed-byte-8-widetag ; 10111110
simple-array-signed-byte-16-widetag ; 11000010
#!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
- simple-array-signed-byte-30-widetag ; 11000110
+ simple-array-fixnum-widetag ; 11000110
simple-array-signed-byte-32-widetag ; 11001010
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
- simple-array-signed-byte-61-widetag
+ simple-array-fixnum-widetag
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
simple-array-signed-byte-64-widetag
simple-array-single-float-widetag ; 11001110
(def!constant n-fixnum-tag-bits (1- n-lowtag-bits))
;;; the fixnum tag mask
(def!constant fixnum-tag-mask (1- (ash 1 n-fixnum-tag-bits)))
+;;; the bit width of fixnums
+(def!constant n-fixnum-bits (- n-word-bits n-fixnum-tag-bits))
;;; the bit width of positive fixnums
-(def!constant n-positive-fixnum-bits (- n-word-bits n-fixnum-tag-bits 1))
+(def!constant n-positive-fixnum-bits (1- n-fixnum-bits))
;;; 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))))
((unsigned-byte 16) 0 16 simple-array-unsigned-byte-16
:importance 12)
#!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
- ((unsigned-byte 29) 0 32 simple-array-unsigned-byte-29
+ ((unsigned-byte #.sb!vm:n-positive-fixnum-bits)
+ 0 32 simple-array-unsigned-fixnum
:importance 8
:fixnum-p t)
((unsigned-byte 31) 0 32 simple-array-unsigned-byte-31
((unsigned-byte 32) 0 32 simple-array-unsigned-byte-32
:importance 11)
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
- ((unsigned-byte 60) 0 64 simple-array-unsigned-byte-60
+ ((unsigned-byte #.sb!vm:n-positive-fixnum-bits)
+ 0 64 simple-array-unsigned-fixnum
:importance 8
:fixnum-p t)
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
;; compiler/generic/primtype.lisp, for why this is FIXNUM and
;; not (SIGNED-BYTE 30)
#!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
- (fixnum 0 32 simple-array-signed-byte-30
+ (fixnum 0 32 simple-array-fixnum
:importance 8
:fixnum-p t)
((signed-byte 32) 0 32 simple-array-signed-byte-32
:importance 7)
;; KLUDGE: see above KLUDGE for the 32-bit case
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
- (fixnum 0 64 simple-array-signed-byte-61
+ (fixnum 0 64 simple-array-fixnum
:importance 8
:fixnum-p t)
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
simple-array-unsigned-byte-4-p simple-array-unsigned-byte-7-p
simple-array-unsigned-byte-8-p simple-array-unsigned-byte-15-p
simple-array-unsigned-byte-16-p
- #!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
- simple-array-unsigned-byte-29-p
+
+ simple-array-unsigned-fixnum-p
+
simple-array-unsigned-byte-31-p
simple-array-unsigned-byte-32-p
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
- simple-array-unsigned-byte-60-p
- #!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
simple-array-unsigned-byte-63-p
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
simple-array-unsigned-byte-64-p
simple-array-signed-byte-8-p simple-array-signed-byte-16-p
- #!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
- simple-array-signed-byte-30-p
+
+ simple-array-fixnum-p
+
simple-array-signed-byte-32-p
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
- simple-array-signed-byte-61-p
- #!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
simple-array-signed-byte-64-p
simple-array-single-float-p simple-array-double-float-p
#!+long-float simple-array-long-float-p
(simple-array (unsigned-byte 15) (*)))
(define-type-predicate simple-array-unsigned-byte-16-p
(simple-array (unsigned-byte 16) (*)))
-#!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
-(define-type-predicate simple-array-unsigned-byte-29-p
- (simple-array (unsigned-byte 29) (*)))
+
+(define-type-predicate simple-array-unsigned-fixnum-p
+ (simple-array
+ (unsigned-byte #.sb!vm:n-positive-fixnum-bits) (*)))
+
(define-type-predicate simple-array-unsigned-byte-31-p
- (simple-array (unsigned-byte 31) (*)))
+ (simple-array (unsigned-byte 31) (*)))
(define-type-predicate simple-array-unsigned-byte-32-p
(simple-array (unsigned-byte 32) (*)))
-#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
-(define-type-predicate simple-array-unsigned-byte-60-p
- (simple-array (unsigned-byte 60) (*)))
+
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
(define-type-predicate simple-array-unsigned-byte-63-p
(simple-array (unsigned-byte 63) (*)))
(simple-array (signed-byte 8) (*)))
(define-type-predicate simple-array-signed-byte-16-p
(simple-array (signed-byte 16) (*)))
-#!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
-(define-type-predicate simple-array-signed-byte-30-p
- (simple-array (signed-byte 30) (*)))
+
+(define-type-predicate simple-array-fixnum-p
+ (simple-array (signed-byte #.sb!vm:n-fixnum-bits)
+ (*)))
+
(define-type-predicate simple-array-signed-byte-32-p
- (simple-array (signed-byte 32) (*)))
-#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
-(define-type-predicate simple-array-signed-byte-61-p
- (simple-array (signed-byte 61) (*)))
+ (simple-array (signed-byte 32) (*)))
+
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
(define-type-predicate simple-array-signed-byte-64-p
(simple-array (signed-byte 64) (*)))
(def-partial-data-vector-frobs simple-array-signed-byte-16 tagged-num
:short t signed-reg)
- (def-full-data-vector-frobs simple-array-unsigned-byte-29 positive-fixnum
+ (def-full-data-vector-frobs simple-array-unsigned-fixnum positive-fixnum
any-reg)
- (def-full-data-vector-frobs simple-array-signed-byte-30 tagged-num
+ (def-full-data-vector-frobs simple-array-fixnum tagged-num
any-reg)
(def-full-data-vector-frobs simple-array-signed-byte-32 signed-num
(def-partial-data-vector-frobs simple-array-signed-byte-16 tagged-num
:short t signed-reg)
- (def-full-data-vector-frobs simple-array-unsigned-byte-29 positive-fixnum
+ (def-full-data-vector-frobs simple-array-unsigned-fixnum positive-fixnum
any-reg)
- (def-full-data-vector-frobs simple-array-signed-byte-30 tagged-num
+ (def-full-data-vector-frobs simple-array-fixnum tagged-num
any-reg)
(def-full-data-vector-frobs simple-array-signed-byte-32 signed-num
(def-data-vector-frobs simple-array-unsigned-byte-32 word-index
unsigned-num unsigned-reg)
- (def-data-vector-frobs simple-array-unsigned-byte-29 word-index
+ (def-data-vector-frobs simple-array-unsigned-fixnum word-index
positive-fixnum any-reg)
- (def-data-vector-frobs simple-array-signed-byte-30 word-index
+ (def-data-vector-frobs simple-array-fixnum word-index
tagged-num any-reg)
(def-data-vector-frobs simple-array-signed-byte-32 word-index
signed-num signed-reg))
(def-data-vector-frobs simple-array-unsigned-byte-32 word-index
unsigned-num unsigned-reg)
- (def-data-vector-frobs simple-array-unsigned-byte-29 word-index
+ (def-data-vector-frobs simple-array-unsigned-fixnum word-index
positive-fixnum any-reg)
- (def-data-vector-frobs simple-array-signed-byte-30 word-index
+ (def-data-vector-frobs simple-array-fixnum word-index
tagged-num any-reg)
(def-data-vector-frobs simple-array-signed-byte-32 word-index
signed-num signed-reg))
(def-full-data-vector-frobs simple-vector * descriptor-reg any-reg)
(def-full-data-vector-frobs simple-array-unsigned-byte-64 unsigned-num
unsigned-reg)
- (def-full-data-vector-frobs simple-array-signed-byte-61 tagged-num any-reg)
- (def-full-data-vector-frobs simple-array-unsigned-byte-60
+ (def-full-data-vector-frobs simple-array-fixnum tagged-num any-reg)
+ (def-full-data-vector-frobs simple-array-unsigned-fixnum
positive-fixnum any-reg)
(def-full-data-vector-frobs simple-array-signed-byte-64
signed-num signed-reg)
(def-full-data-vector-frobs simple-vector * descriptor-reg any-reg)
(def-full-data-vector-frobs simple-array-unsigned-byte-32 unsigned-num
unsigned-reg)
- (def-full-data-vector-frobs simple-array-signed-byte-30 tagged-num any-reg)
- (def-full-data-vector-frobs simple-array-unsigned-byte-29 positive-fixnum any-reg)
+ (def-full-data-vector-frobs simple-array-fixnum tagged-num any-reg)
+ (def-full-data-vector-frobs simple-array-unsigned-fixnum positive-fixnum any-reg)
(def-full-data-vector-frobs simple-array-signed-byte-32 signed-num
signed-reg)
(def-full-data-vector-frobs simple-array-unsigned-byte-31 unsigned-num
(defun random-fixnum ()
(random (1+ most-positive-fixnum)))
-(defconstant n-fixnum-bits #.(integer-length most-positive-fixnum))
-
;;; Lambda which executes its body (or not) randomly. Used to drop
;;; random cache entries.
(defmacro randomly-punting-lambda (lambda-list &body body)
(with-unique-names (drops drop-pos)
`(let ((,drops (random-fixnum))
- (,drop-pos n-fixnum-bits))
+ (,drop-pos sb-vm:n-fixnum-bits))
(declare (fixnum ,drops)
- (type (integer 0 #.n-fixnum-bits) ,drop-pos))
+ (type (integer 0 #.sb-vm:n-fixnum-bits) ,drop-pos))
(lambda ,lambda-list
(when (logbitp (the unsigned-byte (decf ,drop-pos)) ,drops)
(locally ,@body))
(when (zerop ,drop-pos)
(setf ,drops (random-fixnum)
- ,drop-pos n-fixnum-bits))))))
+ ,drop-pos sb-vm:n-fixnum-bits))))))
\f
;;;; early definition of WRAPPER
;;;;
scav_vector_unsigned_byte_16;
scavtab[SIMPLE_ARRAY_UNSIGNED_BYTE_16_WIDETAG] =
scav_vector_unsigned_byte_16;
-#ifdef SIMPLE_ARRAY_UNSIGNED_BYTE_29_WIDETAG
- scavtab[SIMPLE_ARRAY_UNSIGNED_BYTE_29_WIDETAG] =
+#if (N_WORD_BITS == 32)
+ scavtab[SIMPLE_ARRAY_UNSIGNED_FIXNUM_WIDETAG] =
scav_vector_unsigned_byte_32;
#endif
scavtab[SIMPLE_ARRAY_UNSIGNED_BYTE_31_WIDETAG] =
scav_vector_unsigned_byte_32;
scavtab[SIMPLE_ARRAY_UNSIGNED_BYTE_32_WIDETAG] =
scav_vector_unsigned_byte_32;
-#ifdef SIMPLE_ARRAY_UNSIGNED_BYTE_60_WIDETAG
- scavtab[SIMPLE_ARRAY_UNSIGNED_BYTE_60_WIDETAG] =
+#if (N_WORD_BITS == 64)
+ scavtab[SIMPLE_ARRAY_UNSIGNED_FIXNUM_WIDETAG] =
scav_vector_unsigned_byte_64;
#endif
#ifdef SIMPLE_ARRAY_UNSIGNED_BYTE_63_WIDETAG
scavtab[SIMPLE_ARRAY_SIGNED_BYTE_16_WIDETAG] =
scav_vector_unsigned_byte_16;
#endif
-#ifdef SIMPLE_ARRAY_SIGNED_BYTE_30_WIDETAG
- scavtab[SIMPLE_ARRAY_SIGNED_BYTE_30_WIDETAG] =
+#if (N_WORD_BITS == 32)
+ scavtab[SIMPLE_ARRAY_FIXNUM_WIDETAG] =
scav_vector_unsigned_byte_32;
#endif
#ifdef SIMPLE_ARRAY_SIGNED_BYTE_32_WIDETAG
scavtab[SIMPLE_ARRAY_SIGNED_BYTE_32_WIDETAG] =
scav_vector_unsigned_byte_32;
#endif
-#ifdef SIMPLE_ARRAY_SIGNED_BYTE_61_WIDETAG
- scavtab[SIMPLE_ARRAY_SIGNED_BYTE_61_WIDETAG] =
+#if (N_WORD_BITS == 64)
+ scavtab[SIMPLE_ARRAY_FIXNUM_WIDETAG] =
scav_vector_unsigned_byte_64;
#endif
#ifdef SIMPLE_ARRAY_SIGNED_BYTE_64_WIDETAG
trans_vector_unsigned_byte_16;
transother[SIMPLE_ARRAY_UNSIGNED_BYTE_16_WIDETAG] =
trans_vector_unsigned_byte_16;
-#ifdef SIMPLE_ARRAY_UNSIGNED_BYTE_29_WIDETAG
- transother[SIMPLE_ARRAY_UNSIGNED_BYTE_29_WIDETAG] =
+#if (N_WORD_BITS == 32)
+ transother[SIMPLE_ARRAY_UNSIGNED_FIXNUM_WIDETAG] =
trans_vector_unsigned_byte_32;
#endif
transother[SIMPLE_ARRAY_UNSIGNED_BYTE_31_WIDETAG] =
trans_vector_unsigned_byte_32;
transother[SIMPLE_ARRAY_UNSIGNED_BYTE_32_WIDETAG] =
trans_vector_unsigned_byte_32;
-#ifdef SIMPLE_ARRAY_UNSIGNED_BYTE_60_WIDETAG
- transother[SIMPLE_ARRAY_UNSIGNED_BYTE_60_WIDETAG] =
+#if (N_WORD_BITS == 64)
+ transother[SIMPLE_ARRAY_UNSIGNED_FIXNUM_WIDETAG] =
trans_vector_unsigned_byte_64;
#endif
#ifdef SIMPLE_ARRAY_UNSIGNED_BYTE_63_WIDETAG
transother[SIMPLE_ARRAY_SIGNED_BYTE_16_WIDETAG] =
trans_vector_unsigned_byte_16;
#endif
-#ifdef SIMPLE_ARRAY_SIGNED_BYTE_30_WIDETAG
- transother[SIMPLE_ARRAY_SIGNED_BYTE_30_WIDETAG] =
+#if (N_WORD_BITS == 32)
+ transother[SIMPLE_ARRAY_FIXNUM_WIDETAG] =
trans_vector_unsigned_byte_32;
#endif
#ifdef SIMPLE_ARRAY_SIGNED_BYTE_32_WIDETAG
transother[SIMPLE_ARRAY_SIGNED_BYTE_32_WIDETAG] =
trans_vector_unsigned_byte_32;
#endif
-#ifdef SIMPLE_ARRAY_SIGNED_BYTE_61_WIDETAG
- transother[SIMPLE_ARRAY_SIGNED_BYTE_61_WIDETAG] =
+#if (N_WORD_BITS == 64)
+ transother[SIMPLE_ARRAY_FIXNUM_WIDETAG] =
trans_vector_unsigned_byte_64;
#endif
#ifdef SIMPLE_ARRAY_SIGNED_BYTE_64_WIDETAG
size_vector_unsigned_byte_16;
sizetab[SIMPLE_ARRAY_UNSIGNED_BYTE_16_WIDETAG] =
size_vector_unsigned_byte_16;
-#ifdef SIMPLE_ARRAY_UNSIGNED_BYTE_29_WIDETAG
- sizetab[SIMPLE_ARRAY_UNSIGNED_BYTE_29_WIDETAG] =
+#if (N_WORD_BITS == 32)
+ sizetab[SIMPLE_ARRAY_UNSIGNED_FIXNUM_WIDETAG] =
size_vector_unsigned_byte_32;
#endif
sizetab[SIMPLE_ARRAY_UNSIGNED_BYTE_31_WIDETAG] =
size_vector_unsigned_byte_32;
sizetab[SIMPLE_ARRAY_UNSIGNED_BYTE_32_WIDETAG] =
size_vector_unsigned_byte_32;
-#ifdef SIMPLE_ARRAY_UNSIGNED_BYTE_60_WIDETAG
- sizetab[SIMPLE_ARRAY_UNSIGNED_BYTE_60_WIDETAG] =
+#if (N_WORD_BITS == 64)
+ sizetab[SIMPLE_ARRAY_UNSIGNED_FIXNUM_WIDETAG] =
size_vector_unsigned_byte_64;
#endif
#ifdef SIMPLE_ARRAY_UNSIGNED_BYTE_63_WIDETAG
sizetab[SIMPLE_ARRAY_SIGNED_BYTE_16_WIDETAG] =
size_vector_unsigned_byte_16;
#endif
-#ifdef SIMPLE_ARRAY_SIGNED_BYTE_30_WIDETAG
- sizetab[SIMPLE_ARRAY_SIGNED_BYTE_30_WIDETAG] =
+#if (N_WORD_BITS == 32)
+ sizetab[SIMPLE_ARRAY_FIXNUM_WIDETAG] =
size_vector_unsigned_byte_32;
#endif
#ifdef SIMPLE_ARRAY_SIGNED_BYTE_32_WIDETAG
sizetab[SIMPLE_ARRAY_SIGNED_BYTE_32_WIDETAG] =
size_vector_unsigned_byte_32;
#endif
-#ifdef SIMPLE_ARRAY_SIGNED_BYTE_61_WIDETAG
- sizetab[SIMPLE_ARRAY_SIGNED_BYTE_61_WIDETAG] =
+#if (N_WORD_BITS == 64)
+ sizetab[SIMPLE_ARRAY_FIXNUM_WIDETAG] =
size_vector_unsigned_byte_64;
#endif
#ifdef SIMPLE_ARRAY_SIGNED_BYTE_64_WIDETAG
case SIMPLE_ARRAY_UNSIGNED_BYTE_8_WIDETAG:
case SIMPLE_ARRAY_UNSIGNED_BYTE_15_WIDETAG:
case SIMPLE_ARRAY_UNSIGNED_BYTE_16_WIDETAG:
-#ifdef SIMPLE_ARRAY_UNSIGNED_BYTE_29_WIDETAG
- case SIMPLE_ARRAY_UNSIGNED_BYTE_29_WIDETAG:
-#endif
+
+ case SIMPLE_ARRAY_UNSIGNED_FIXNUM_WIDETAG:
+
case SIMPLE_ARRAY_UNSIGNED_BYTE_31_WIDETAG:
case SIMPLE_ARRAY_UNSIGNED_BYTE_32_WIDETAG:
-#ifdef SIMPLE_ARRAY_UNSIGNED_BYTE_60_WIDETAG
- case SIMPLE_ARRAY_UNSIGNED_BYTE_60_WIDETAG:
-#endif
#ifdef SIMPLE_ARRAY_UNSIGNED_BYTE_63_WIDETAG
case SIMPLE_ARRAY_UNSIGNED_BYTE_63_WIDETAG:
#endif
#ifdef SIMPLE_ARRAY_SIGNED_BYTE_16_WIDETAG
case SIMPLE_ARRAY_SIGNED_BYTE_16_WIDETAG:
#endif
-#ifdef SIMPLE_ARRAY_SIGNED_BYTE_30_WIDETAG
- case SIMPLE_ARRAY_SIGNED_BYTE_30_WIDETAG:
-#endif
+
+ case SIMPLE_ARRAY_FIXNUM_WIDETAG:
+
#ifdef SIMPLE_ARRAY_SIGNED_BYTE_32_WIDETAG
case SIMPLE_ARRAY_SIGNED_BYTE_32_WIDETAG:
#endif
-#ifdef SIMPLE_ARRAY_SIGNED_BYTE_61_WIDETAG
- case SIMPLE_ARRAY_SIGNED_BYTE_61_WIDETAG:
-#endif
#ifdef SIMPLE_ARRAY_SIGNED_BYTE_64_WIDETAG
case SIMPLE_ARRAY_SIGNED_BYTE_64_WIDETAG:
#endif
case SIMPLE_ARRAY_UNSIGNED_BYTE_8_WIDETAG:
case SIMPLE_ARRAY_UNSIGNED_BYTE_15_WIDETAG:
case SIMPLE_ARRAY_UNSIGNED_BYTE_16_WIDETAG:
-#ifdef SIMPLE_ARRAY_UNSIGNED_BYTE_29_WIDETAG
- case SIMPLE_ARRAY_UNSIGNED_BYTE_29_WIDETAG:
-#endif
+
+ case SIMPLE_ARRAY_UNSIGNED_FIXNUM_WIDETAG:
+
case SIMPLE_ARRAY_UNSIGNED_BYTE_31_WIDETAG:
case SIMPLE_ARRAY_UNSIGNED_BYTE_32_WIDETAG:
-#ifdef SIMPLE_ARRAY_UNSIGNED_BYTE_60_WIDETAG
- case SIMPLE_ARRAY_UNSIGNED_BYTE_60_WIDETAG:
-#endif
#ifdef SIMPLE_ARRAY_UNSIGNED_BYTE_63_WIDETAG
case SIMPLE_ARRAY_UNSIGNED_BYTE_63_WIDETAG:
#endif
#ifdef SIMPLE_ARRAY_SIGNED_BYTE_16_WIDETAG
case SIMPLE_ARRAY_SIGNED_BYTE_16_WIDETAG:
#endif
-#ifdef SIMPLE_ARRAY_SIGNED_BYTE_30_WIDETAG
- case SIMPLE_ARRAY_SIGNED_BYTE_30_WIDETAG:
-#endif
+
+ case SIMPLE_ARRAY_FIXNUM_WIDETAG:
+
#ifdef SIMPLE_ARRAY_SIGNED_BYTE_32_WIDETAG
case SIMPLE_ARRAY_SIGNED_BYTE_32_WIDETAG:
#endif
-#ifdef SIMPLE_ARRAY_SIGNED_BYTE_61_WIDETAG
- case SIMPLE_ARRAY_SIGNED_BYTE_61_WIDETAG:
-#endif
#ifdef SIMPLE_ARRAY_SIGNED_BYTE_64_WIDETAG
case SIMPLE_ARRAY_SIGNED_BYTE_64_WIDETAG:
#endif
case SIMPLE_ARRAY_UNSIGNED_BYTE_8_WIDETAG:
case SIMPLE_ARRAY_UNSIGNED_BYTE_15_WIDETAG:
case SIMPLE_ARRAY_UNSIGNED_BYTE_16_WIDETAG:
-#ifdef SIMPLE_ARRAY_UNSIGNED_BYTE_29_WIDETAG
- case SIMPLE_ARRAY_UNSIGNED_BYTE_29_WIDETAG:
-#endif
+
+ case SIMPLE_ARRAY_UNSIGNED_FIXNUM_WIDETAG:
+
case SIMPLE_ARRAY_UNSIGNED_BYTE_31_WIDETAG:
case SIMPLE_ARRAY_UNSIGNED_BYTE_32_WIDETAG:
-#ifdef SIMPLE_ARRAY_UNSIGNED_BYTE_60_WIDETAG
- case SIMPLE_ARRAY_UNSIGNED_BYTE_60_WIDETAG:
-#endif
#ifdef SIMPLE_ARRAY_UNSIGNED_BYTE_63_WIDETAG
case SIMPLE_ARRAY_UNSIGNED_BYTE_63_WIDETAG:
#endif
#ifdef SIMPLE_ARRAY_SIGNED_BYTE_16_WIDETAG
case SIMPLE_ARRAY_SIGNED_BYTE_16_WIDETAG:
#endif
-#ifdef SIMPLE_ARRAY_SIGNED_BYTE_30_WIDETAG
- case SIMPLE_ARRAY_SIGNED_BYTE_30_WIDETAG:
-#endif
+
+ case SIMPLE_ARRAY_FIXNUM_WIDETAG:
+
#ifdef SIMPLE_ARRAY_SIGNED_BYTE_32_WIDETAG
case SIMPLE_ARRAY_SIGNED_BYTE_32_WIDETAG:
#endif
-#ifdef SIMPLE_ARRAY_SIGNED_BYTE_61_WIDETAG
- case SIMPLE_ARRAY_SIGNED_BYTE_61_WIDETAG:
-#endif
#ifdef SIMPLE_ARRAY_SIGNED_BYTE_64_WIDETAG
case SIMPLE_ARRAY_SIGNED_BYTE_64_WIDETAG:
#endif
case SIMPLE_ARRAY_UNSIGNED_BYTE_8_WIDETAG:
case SIMPLE_ARRAY_UNSIGNED_BYTE_15_WIDETAG:
case SIMPLE_ARRAY_UNSIGNED_BYTE_16_WIDETAG:
-#ifdef SIMPLE_ARRAY_UNSIGNED_BYTE_29_WIDETAG
- case SIMPLE_ARRAY_UNSIGNED_BYTE_29_WIDETAG:
-#endif
+
+ case SIMPLE_ARRAY_UNSIGNED_FIXNUM_WIDETAG:
+
case SIMPLE_ARRAY_UNSIGNED_BYTE_31_WIDETAG:
case SIMPLE_ARRAY_UNSIGNED_BYTE_32_WIDETAG:
-#ifdef SIMPLE_ARRAY_UNSIGNED_BYTE_60_WIDETAG
- case SIMPLE_ARRAY_UNSIGNED_BYTE_60_WIDETAG:
-#endif
#ifdef SIMPLE_ARRAY_UNSIGNED_BYTE_63_WIDETAG
case SIMPLE_ARRAY_UNSIGNED_BYTE_63_WIDETAG:
#endif
#ifdef SIMPLE_ARRAY_SIGNED_BYTE_16_WIDETAG
case SIMPLE_ARRAY_SIGNED_BYTE_16_WIDETAG:
#endif
-#ifdef SIMPLE_ARRAY_SIGNED_BYTE_30_WIDETAG
- case SIMPLE_ARRAY_SIGNED_BYTE_30_WIDETAG:
-#endif
+
+ case SIMPLE_ARRAY_FIXNUM_WIDETAG:
+
#ifdef SIMPLE_ARRAY_SIGNED_BYTE_32_WIDETAG
case SIMPLE_ARRAY_SIGNED_BYTE_32_WIDETAG:
#endif
-#ifdef SIMPLE_ARRAY_SIGNED_BYTE_61_WIDETAG
- case SIMPLE_ARRAY_SIGNED_BYTE_61_WIDETAG:
-#endif
#ifdef SIMPLE_ARRAY_SIGNED_BYTE_64_WIDETAG
case SIMPLE_ARRAY_SIGNED_BYTE_64_WIDETAG:
#endif
return ptrans_vector(thing, 16, 0, 0, constant);
case SIMPLE_ARRAY_UNSIGNED_BYTE_32_WIDETAG:
-#ifdef SIMPLE_ARRAY_SIGNED_BYTE_30_WIDETAG
- case SIMPLE_ARRAY_SIGNED_BYTE_30_WIDETAG:
- case SIMPLE_ARRAY_UNSIGNED_BYTE_29_WIDETAG:
-#endif
+ case SIMPLE_ARRAY_FIXNUM_WIDETAG:
+ case SIMPLE_ARRAY_UNSIGNED_FIXNUM_WIDETAG:
#ifdef SIMPLE_ARRAY_SIGNED_BYTE_32_WIDETAG
case SIMPLE_ARRAY_SIGNED_BYTE_32_WIDETAG:
case SIMPLE_ARRAY_UNSIGNED_BYTE_31_WIDETAG:
return ptrans_vector(thing, 32, 0, 0, constant);
#if N_WORD_BITS == 64
-#ifdef SIMPLE_ARRAY_UNSIGNED_BYTE_60_WIDETAG
- case SIMPLE_ARRAY_UNSIGNED_BYTE_60_WIDETAG:
-#endif
#ifdef SIMPLE_ARRAY_UNSIGNED_BYTE_63_WIDETAG
case SIMPLE_ARRAY_UNSIGNED_BYTE_63_WIDETAG:
#endif
#ifdef SIMPLE_ARRAY_UNSIGNED_BYTE_64_WIDETAG
case SIMPLE_ARRAY_UNSIGNED_BYTE_64_WIDETAG:
#endif
-#ifdef SIMPLE_ARRAY_SIGNED_BYTE_61_WIDETAG
- case SIMPLE_ARRAY_SIGNED_BYTE_61_WIDETAG:
-#endif
#ifdef SIMPLE_ARRAY_SIGNED_BYTE_64_WIDETAG
case SIMPLE_ARRAY_SIGNED_BYTE_64_WIDETAG:
#endif
break;
case SIMPLE_ARRAY_UNSIGNED_BYTE_32_WIDETAG:
-#ifdef SIMPLE_ARRAY_SIGNED_BYTE_30_WIDETAG
- case SIMPLE_ARRAY_SIGNED_BYTE_30_WIDETAG:
- case SIMPLE_ARRAY_UNSIGNED_BYTE_29_WIDETAG:
-#endif
+
+ case SIMPLE_ARRAY_FIXNUM_WIDETAG:
+ case SIMPLE_ARRAY_UNSIGNED_FIXNUM_WIDETAG:
+
#ifdef SIMPLE_ARRAY_SIGNED_BYTE_32_WIDETAG
case SIMPLE_ARRAY_SIGNED_BYTE_32_WIDETAG:
case SIMPLE_ARRAY_UNSIGNED_BYTE_31_WIDETAG:
#if N_WORD_BITS == 64
case SIMPLE_ARRAY_UNSIGNED_BYTE_64_WIDETAG:
-#ifdef SIMPLE_ARRAY_SIGNED_BYTE_61_WIDETAG
- case SIMPLE_ARRAY_SIGNED_BYTE_61_WIDETAG:
- case SIMPLE_ARRAY_UNSIGNED_BYTE_60_WIDETAG:
-#endif
#ifdef SIMPLE_ARRAY_SIGNED_BYTE_64_WIDETAG
case SIMPLE_ARRAY_SIGNED_BYTE_64_WIDETAG:
case SIMPLE_ARRAY_UNSIGNED_BYTE_63_WIDETAG: