mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
Add :64-bit to *features*.
In preparation for the ARM64 port add a :64-bit feature and transform all relevant x86-64 and #!+#.(cl:if (cl:= 64 sb!vm:n-word-bits))
This commit is contained in:
parent
a68205bdbd
commit
a46fb3d52f
|
|
@ -657,7 +657,7 @@ if [ "$sbcl_arch" = "x86" ]; then
|
|||
sh tools-for-build/openbsd-sigcontext.sh > src/runtime/openbsd-sigcontext.h
|
||||
fi
|
||||
elif [ "$sbcl_arch" = "x86-64" ]; then
|
||||
printf ' :gencgc :stack-grows-downward-not-upward :c-stack-is-control-stack :linkage-table' >> $ltf
|
||||
printf ' :64-bit :gencgc :stack-grows-downward-not-upward :c-stack-is-control-stack :linkage-table' >> $ltf
|
||||
printf ' :compare-and-swap-vops :unwind-to-frame-and-call-vop :raw-instance-init-vops' >> $ltf
|
||||
printf ' :interleaved-raw-slots :precise-arg-count-error :fp-and-pc-standard-save' >> $ltf
|
||||
printf ' :stack-allocatable-closures :stack-allocatable-vectors' >> $ltf
|
||||
|
|
|
|||
|
|
@ -1029,14 +1029,14 @@ between the ~A definition and the ~A definition"
|
|||
:direct-superclasses (vector simple-array)
|
||||
: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))
|
||||
#!+64-bit
|
||||
(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 '(unsigned-byte 63)))
|
||||
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!+64-bit
|
||||
(simple-array-unsigned-byte-64
|
||||
:translation (simple-array (unsigned-byte 64) (*))
|
||||
:codes (#.sb!vm:simple-array-unsigned-byte-64-widetag)
|
||||
|
|
@ -1072,7 +1072,7 @@ between the ~A definition and the ~A definition"
|
|||
:direct-superclasses (vector simple-array)
|
||||
: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))
|
||||
#!+64-bit
|
||||
(simple-array-signed-byte-64
|
||||
:translation (simple-array (signed-byte 64) (*))
|
||||
:codes (#.sb!vm:simple-array-signed-byte-64-widetag)
|
||||
|
|
|
|||
|
|
@ -2079,7 +2079,7 @@ register."
|
|||
;; fixnum
|
||||
(zerop (logand val sb!vm:fixnum-tag-mask))
|
||||
;; immediate single float, 64-bit only
|
||||
#!+#.(cl:if (cl:= sb!vm::n-machine-word-bits 64) '(and) '(or))
|
||||
#!+64-bit
|
||||
(= (logand val #xff) sb!vm:single-float-widetag)
|
||||
;; character
|
||||
(and (zerop (logandc2 val #x1fffffff)) ; Top bits zero
|
||||
|
|
|
|||
|
|
@ -730,7 +730,7 @@
|
|||
(setf (signed-sap-ref-32 (buffer-sap obuf) tail)
|
||||
byte))
|
||||
|
||||
#+#.(cl:if (cl:= sb!vm:n-word-bits 64) '(and) '(or))
|
||||
#!+64-bit
|
||||
(progn
|
||||
(def-output-routines ("OUTPUT-UNSIGNED-LONG-LONG-~A-BUFFERED"
|
||||
8
|
||||
|
|
@ -1238,7 +1238,7 @@
|
|||
((signed-byte 32) 4 sap head)
|
||||
(signed-sap-ref-32 sap head))
|
||||
|
||||
#+#.(cl:if (cl:= sb!vm:n-word-bits 64) '(and) '(or))
|
||||
#!+64-bit
|
||||
(progn
|
||||
(def-input-routine input-unsigned-64bit-byte
|
||||
((unsigned-byte 64) 8 sap head)
|
||||
|
|
|
|||
|
|
@ -1491,13 +1491,13 @@ and the number of 0 bits if INTEGER is negative."
|
|||
;;; arithmetic, as that is only (currently) defined for constant
|
||||
;;; shifts. See also the comment in (LOGAND OPTIMIZER) for more
|
||||
;;; discussion of this hack. -- CSR, 2003-10-09
|
||||
#!+#.(cl:if (cl:= sb!vm:n-machine-word-bits 32) '(and) '(or))
|
||||
#!-64-bit
|
||||
(defun sb!vm::ash-left-mod32 (integer amount)
|
||||
(etypecase integer
|
||||
((unsigned-byte 32) (ldb (byte 32 0) (ash integer amount)))
|
||||
(fixnum (ldb (byte 32 0) (ash (logand integer #xffffffff) amount)))
|
||||
(bignum (ldb (byte 32 0) (ash (logand integer #xffffffff) amount)))))
|
||||
#!+#.(cl:if (cl:= sb!vm:n-machine-word-bits 64) '(and) '(or))
|
||||
#!+64-bit
|
||||
(defun sb!vm::ash-left-mod64 (integer amount)
|
||||
(etypecase integer
|
||||
((unsigned-byte 64) (ldb (byte 64 0) (ash integer amount)))
|
||||
|
|
|
|||
|
|
@ -145,11 +145,11 @@
|
|||
(def-type-predicate-wrapper %other-pointer-p)
|
||||
(def-type-predicate-wrapper system-area-pointer-p)
|
||||
(def-type-predicate-wrapper weak-pointer-p)
|
||||
#!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!-64-bit
|
||||
(progn
|
||||
(def-type-predicate-wrapper unsigned-byte-32-p)
|
||||
(def-type-predicate-wrapper signed-byte-32-p))
|
||||
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!+64-bit
|
||||
(progn
|
||||
(def-type-predicate-wrapper unsigned-byte-64-p)
|
||||
(def-type-predicate-wrapper signed-byte-64-p))
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@
|
|||
(setf (svref *meta-room-info* unbound-marker-widetag) cons-info)
|
||||
|
||||
;; Single-floats are immediate data on 64-bit systems.
|
||||
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!+64-bit
|
||||
(setf (svref *meta-room-info* single-float-widetag) cons-info))
|
||||
|
||||
) ; EVAL-WHEN
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
;; 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
|
||||
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!+64-bit
|
||||
(defenum ()
|
||||
even-fixnum-lowtag
|
||||
other-immediate-0-lowtag
|
||||
|
|
@ -74,7 +74,7 @@
|
|||
other-immediate-3-lowtag
|
||||
pad5-lowtag
|
||||
other-pointer-lowtag)
|
||||
#!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!-64-bit
|
||||
(defenum ()
|
||||
even-fixnum-lowtag
|
||||
instance-pointer-lowtag
|
||||
|
|
@ -209,14 +209,14 @@
|
|||
unused05-widetag ; 6E 75 6E 75
|
||||
unused06-widetag ; 72 79 72 79
|
||||
unused07-widetag ; 76 7D 76 7D
|
||||
#!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!-64-bit
|
||||
unused08-widetag ; 7A 7A
|
||||
#!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!-64-bit
|
||||
unused09-widetag ; 7E 7E
|
||||
|
||||
#!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!-64-bit
|
||||
unused10-widetag ; 82 82
|
||||
#!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!-64-bit
|
||||
unused11-widetag ; 86 86
|
||||
|
||||
simple-array-widetag ; 8A 81 8A 81
|
||||
|
|
@ -227,24 +227,24 @@
|
|||
simple-array-unsigned-byte-15-widetag ; 9E 95 9E 95
|
||||
simple-array-unsigned-byte-16-widetag ; A2 99 A2 99
|
||||
|
||||
#!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!-64-bit
|
||||
simple-array-unsigned-fixnum-widetag ; A6 A5 A6 A5
|
||||
simple-array-unsigned-byte-31-widetag ; AA 9D AA 9D
|
||||
simple-array-unsigned-byte-32-widetag ; AE A1 AE A1
|
||||
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!+64-bit
|
||||
simple-array-unsigned-fixnum-widetag ; A6 A5 A6 A5
|
||||
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!+64-bit
|
||||
simple-array-unsigned-byte-63-widetag ; A9 A9
|
||||
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!+64-bit
|
||||
simple-array-unsigned-byte-64-widetag ; AD AD
|
||||
simple-array-signed-byte-8-widetag ; B2 B1 B2 B1
|
||||
simple-array-signed-byte-16-widetag ; B6 B5 B6 B5
|
||||
#!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!-64-bit
|
||||
simple-array-fixnum-widetag ; BA BD BA BD
|
||||
simple-array-signed-byte-32-widetag ; BE B9 BE B9
|
||||
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!+64-bit
|
||||
simple-array-fixnum-widetag ; BA BD BA BD
|
||||
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!+64-bit
|
||||
simple-array-signed-byte-64-widetag ; C1 C1
|
||||
simple-array-single-float-widetag ; C2 C5 C2 C5
|
||||
simple-array-double-float-widetag ; C6 C9 C6 C9
|
||||
|
|
@ -267,13 +267,11 @@
|
|||
complex-vector-widetag ; F6 F9 EE F1
|
||||
complex-array-widetag ; FA FD F2 F5
|
||||
|
||||
#!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!-64-bit
|
||||
unused12-widetag ; FE F6
|
||||
#!+(and #.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
|
||||
(not sb-unicode))
|
||||
#!+(and (not 64-bit) (not sb-unicode))
|
||||
unused13-widetag ; FA
|
||||
#!+(and #.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
|
||||
(not sb-unicode))
|
||||
#!+(and (not 64-bit) (not sb-unicode))
|
||||
unused14-widetag ; FE
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -11,9 +11,8 @@
|
|||
(in-package "SB!VM")
|
||||
|
||||
(defparameter *immediate-types*
|
||||
(list* unbound-marker-widetag character-widetag
|
||||
(when (= n-word-bits 64)
|
||||
(list single-float-widetag))))
|
||||
(list unbound-marker-widetag character-widetag
|
||||
#!+64-bit single-float-widetag))
|
||||
|
||||
(defparameter *fun-header-widetags*
|
||||
(list funcallable-instance-header-widetag
|
||||
|
|
|
|||
|
|
@ -20,24 +20,22 @@
|
|||
(def!constant lowtag-limit (ash 1 n-lowtag-bits))
|
||||
;;; the number of tag bits used for a fixnum
|
||||
(def!constant n-fixnum-tag-bits
|
||||
(locally (declare (notinline =)) ; avoid unreachable code warning
|
||||
(if (= 64 n-word-bits)
|
||||
;; On 64-bit targets, this may be as low as 1 (for 63-bit
|
||||
;; fixnums) and as high as 3 (for 61-bit fixnums). The
|
||||
;; constraint on the low end is that we need at least one bit
|
||||
;; to determine if a value is a fixnum or not, and the
|
||||
;; constraint on the high end is that it must not exceed
|
||||
;; WORD-SHIFT (defined below) due to the use of unboxed
|
||||
;; word-aligned byte pointers as boxed values in various
|
||||
;; places. FIXME: This should possibly be exposed for
|
||||
;; configuration via customize-target-features.
|
||||
1
|
||||
;; On 32-bit targets, this may be as low as 2 (for 30-bit
|
||||
;; fixnums) and as high as 2 (for 30-bit fixnums). The
|
||||
;; constraint on the low end is simple overcrowding of the
|
||||
;; lowtag space, and the constraint on the high end is that it
|
||||
;; must not exceed WORD-SHIFT.
|
||||
(1- n-lowtag-bits))))
|
||||
;; On 64-bit targets, this may be as low as 1 (for 63-bit
|
||||
;; fixnums) and as high as 3 (for 61-bit fixnums). The
|
||||
;; constraint on the low end is that we need at least one bit
|
||||
;; to determine if a value is a fixnum or not, and the
|
||||
;; constraint on the high end is that it must not exceed
|
||||
;; WORD-SHIFT (defined below) due to the use of unboxed
|
||||
;; word-aligned byte pointers as boxed values in various
|
||||
;; places. FIXME: This should possibly be exposed for
|
||||
;; configuration via customize-target-features.
|
||||
#!+64-bit 1
|
||||
;; On 32-bit targets, this may be as low as 2 (for 30-bit
|
||||
;; fixnums) and as high as 2 (for 30-bit fixnums). The
|
||||
;; constraint on the low end is simple overcrowding of the
|
||||
;; lowtag space, and the constraint on the high end is that it
|
||||
;; must not exceed WORD-SHIFT.
|
||||
#!-64-bit (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
|
||||
|
|
|
|||
|
|
@ -177,19 +177,19 @@
|
|||
|
||||
;; 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))
|
||||
#!+64-bit
|
||||
(progn
|
||||
(defun bvref-word (bytes index)
|
||||
(bvref-64 bytes index))
|
||||
(defun (setf bvref-word) (new-val bytes index)
|
||||
(setf (bvref-64 bytes index) new-val)))
|
||||
(defun bvref-word (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))
|
||||
#!-64-bit
|
||||
(progn
|
||||
(defun bvref-word (bytes index)
|
||||
(bvref-32 bytes index))
|
||||
(defun (setf bvref-word) (new-val bytes index)
|
||||
(setf (bvref-32 bytes index) new-val)))
|
||||
(defun bvref-word (bytes index)
|
||||
(bvref-32 bytes index))
|
||||
(defun (setf bvref-word) (new-val bytes index)
|
||||
(setf (bvref-32 bytes index) new-val)))
|
||||
|
||||
|
||||
;;;; representation of spaces in the core
|
||||
|
|
@ -682,10 +682,10 @@ core and return a descriptor to it."
|
|||
(etypecase x
|
||||
(single-float
|
||||
;; 64-bit platforms have immediate single-floats.
|
||||
#!+#.(cl:if (cl:= sb!vm:n-word-bits 64) '(and) '(or))
|
||||
#!+64-bit
|
||||
(make-random-descriptor (logior (ash (single-float-bits x) 32)
|
||||
sb!vm::single-float-widetag))
|
||||
#!-#.(cl:if (cl:= sb!vm:n-word-bits 64) '(and) '(or))
|
||||
#!-64-bit
|
||||
(let ((des (allocate-header+object *dynamic*
|
||||
(1- sb!vm:single-float-size)
|
||||
sb!vm:single-float-widetag)))
|
||||
|
|
@ -2728,7 +2728,7 @@ core and return a descriptor to it."
|
|||
(cond ((cold-null x) (return-from recurse nil))
|
||||
((is-fixnum-lowtag (descriptor-lowtag x))
|
||||
(return-from recurse (descriptor-fixnum x)))
|
||||
#!+#.(cl:if (cl:= sb!vm:n-word-bits 64) '(and) '(or))
|
||||
#!+64-bit
|
||||
((is-other-immediate-lowtag (descriptor-lowtag x))
|
||||
(let ((bits (descriptor-bits x)))
|
||||
(when (= (logand bits sb!vm:widetag-mask)
|
||||
|
|
@ -2745,14 +2745,14 @@ core and return a descriptor to it."
|
|||
(base-string-from-core
|
||||
(read-wordindexed x sb!vm:symbol-name-slot)))
|
||||
(warm-symbol x)))
|
||||
#!+#.(cl:if (cl:= sb!vm:n-word-bits 32) '(and) '(or))
|
||||
#!-64-bit
|
||||
(#.sb!vm:single-float-widetag
|
||||
`(:ffloat-bits
|
||||
,(read-bits-wordindexed x sb!vm:single-float-value-slot)))
|
||||
(#.sb!vm:double-float-widetag
|
||||
`(:dfloat-bits
|
||||
,(read-bits-wordindexed x sb!vm:double-float-value-slot)
|
||||
#!+#.(cl:if (cl:= sb!vm:n-word-bits 32) '(and) '(or))
|
||||
#!-64-bit
|
||||
,(read-bits-wordindexed
|
||||
x (1+ sb!vm:double-float-value-slot))))
|
||||
(#.sb!vm:bignum-widetag
|
||||
|
|
|
|||
|
|
@ -66,15 +66,15 @@
|
|||
:ref-trans %denominator
|
||||
:init :arg))
|
||||
|
||||
#!+#.(cl:if (cl:= sb!vm:n-word-bits 32) '(and) '(or))
|
||||
#!-64-bit
|
||||
(!define-primitive-object (single-float :lowtag other-pointer-lowtag
|
||||
:widetag single-float-widetag)
|
||||
(value :c-type "float"))
|
||||
|
||||
(!define-primitive-object (double-float :lowtag other-pointer-lowtag
|
||||
:widetag double-float-widetag)
|
||||
#!-x86-64 (filler)
|
||||
(value :c-type "double" :length #!-x86-64 2 #!+x86-64 1))
|
||||
#!-64-bit (filler)
|
||||
(value :c-type "double" :length #.(/ 64 n-word-bits)))
|
||||
|
||||
#!+long-float
|
||||
(!define-primitive-object (long-float :lowtag other-pointer-lowtag
|
||||
|
|
@ -359,19 +359,19 @@
|
|||
(!define-primitive-object (complex-single-float
|
||||
:lowtag other-pointer-lowtag
|
||||
:widetag complex-single-float-widetag)
|
||||
#!+x86-64
|
||||
#!+64-bit
|
||||
(data :c-type "struct { float data[2]; } ")
|
||||
#!-x86-64
|
||||
#!-64-bit
|
||||
(real :c-type "float")
|
||||
#!-x86-64
|
||||
#!-64-bit
|
||||
(imag :c-type "float"))
|
||||
|
||||
(!define-primitive-object (complex-double-float
|
||||
:lowtag other-pointer-lowtag
|
||||
:widetag complex-double-float-widetag)
|
||||
(filler)
|
||||
(real :c-type "double" :length #!-x86-64 2 #!+x86-64 1)
|
||||
(imag :c-type "double" :length #!-x86-64 2 #!+x86-64 1))
|
||||
(real :c-type "double" :length #.(/ 64 n-word-bits))
|
||||
(imag :c-type "double" :length #.(/ 64 n-word-bits)))
|
||||
|
||||
#!+sb-simd-pack
|
||||
(!define-primitive-object (simd-pack
|
||||
|
|
|
|||
|
|
@ -25,26 +25,26 @@
|
|||
(!def-primitive-type positive-fixnum (any-reg signed-reg unsigned-reg)
|
||||
:type (unsigned-byte #.sb!vm:n-positive-fixnum-bits))
|
||||
(/show0 "primtype.lisp 27")
|
||||
#!+#.(cl:if (cl:= sb!vm::n-machine-word-bits 32) '(and) '(or))
|
||||
#!-64-bit
|
||||
(!def-primitive-type unsigned-byte-31 (signed-reg unsigned-reg descriptor-reg)
|
||||
:type (unsigned-byte 31))
|
||||
(/show0 "primtype.lisp 31")
|
||||
#!+#.(cl:if (cl:= sb!vm::n-machine-word-bits 32) '(and) '(or))
|
||||
#!-64-bit
|
||||
(!def-primitive-type unsigned-byte-32 (unsigned-reg descriptor-reg)
|
||||
:type (unsigned-byte 32))
|
||||
(/show0 "primtype.lisp 35")
|
||||
#!+#.(cl:if (cl:= sb!vm::n-machine-word-bits 64) '(and) '(or))
|
||||
#!+64-bit
|
||||
(!def-primitive-type unsigned-byte-63 (signed-reg unsigned-reg descriptor-reg)
|
||||
:type (unsigned-byte 63))
|
||||
#!+#.(cl:if (cl:= sb!vm::n-machine-word-bits 64) '(and) '(or))
|
||||
#!+64-bit
|
||||
(!def-primitive-type unsigned-byte-64 (unsigned-reg descriptor-reg)
|
||||
:type (unsigned-byte 64))
|
||||
(!def-primitive-type fixnum (any-reg signed-reg)
|
||||
:type (signed-byte #.(1+ n-positive-fixnum-bits)))
|
||||
#!+#.(cl:if (cl:= sb!vm::n-machine-word-bits 32) '(and) '(or))
|
||||
#!-64-bit
|
||||
(!def-primitive-type signed-byte-32 (signed-reg descriptor-reg)
|
||||
:type (signed-byte 32))
|
||||
#!+#.(cl:if (cl:= sb!vm::n-machine-word-bits 64) '(and) '(or))
|
||||
#!+64-bit
|
||||
(!def-primitive-type signed-byte-64 (signed-reg descriptor-reg)
|
||||
:type (signed-byte 64))
|
||||
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@
|
|||
:importance 12)
|
||||
((unsigned-byte 16) 0 16 simple-array-unsigned-byte-16
|
||||
:importance 12)
|
||||
#!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!-64-bit
|
||||
((unsigned-byte #.n-positive-fixnum-bits)
|
||||
0 32 simple-array-unsigned-fixnum
|
||||
:importance 8
|
||||
|
|
@ -127,15 +127,15 @@
|
|||
:importance 11)
|
||||
((unsigned-byte 32) 0 32 simple-array-unsigned-byte-32
|
||||
:importance 11)
|
||||
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!+64-bit
|
||||
((unsigned-byte #.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))
|
||||
#!+64-bit
|
||||
((unsigned-byte 63) 0 64 simple-array-unsigned-byte-63
|
||||
:importance 9)
|
||||
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!+64-bit
|
||||
((unsigned-byte 64) 0 64 simple-array-unsigned-byte-64
|
||||
:importance 9)
|
||||
((signed-byte 8) 0 8 simple-array-signed-byte-8
|
||||
|
|
@ -145,18 +145,18 @@
|
|||
;; KLUDGE: See the comment in PRIMITIVE-TYPE-AUX,
|
||||
;; 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))
|
||||
#!-64-bit
|
||||
(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))
|
||||
#!+64-bit
|
||||
(fixnum 0 64 simple-array-fixnum
|
||||
:importance 8
|
||||
:fixnum-p t)
|
||||
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!+64-bit
|
||||
((signed-byte 64) 0 64 simple-array-signed-byte-64
|
||||
:importance 7)
|
||||
((complex single-float) #C(0.0f0 0.0f0) 64
|
||||
|
|
|
|||
|
|
@ -37,16 +37,16 @@
|
|||
|
||||
simple-array-unsigned-byte-31-p
|
||||
simple-array-unsigned-byte-32-p
|
||||
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!+64-bit
|
||||
simple-array-unsigned-byte-63-p
|
||||
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!+64-bit
|
||||
simple-array-unsigned-byte-64-p
|
||||
simple-array-signed-byte-8-p simple-array-signed-byte-16-p
|
||||
|
||||
simple-array-fixnum-p
|
||||
|
||||
simple-array-signed-byte-32-p
|
||||
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!+64-bit
|
||||
simple-array-signed-byte-64-p
|
||||
simple-array-single-float-p simple-array-double-float-p
|
||||
#!+long-float simple-array-long-float-p
|
||||
|
|
@ -55,13 +55,13 @@
|
|||
#!+long-float simple-array-complex-long-float-p
|
||||
simple-rank-1-array-*-p
|
||||
system-area-pointer-p realp
|
||||
;; #!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
|
||||
;; #!-64-bit
|
||||
unsigned-byte-32-p
|
||||
;; #!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
|
||||
;; #!-64-bit
|
||||
signed-byte-32-p
|
||||
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!+64-bit
|
||||
unsigned-byte-64-p
|
||||
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!+64-bit
|
||||
signed-byte-64-p
|
||||
weak-pointer-p code-component-p lra-p
|
||||
simple-fun-p
|
||||
|
|
|
|||
|
|
@ -190,16 +190,16 @@
|
|||
(numeric-type
|
||||
(cond ((type= type (specifier-type 'fixnum))
|
||||
'sb!c:check-fixnum)
|
||||
#!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!-64-bit
|
||||
((type= type (specifier-type '(signed-byte 32)))
|
||||
'sb!c:check-signed-byte-32)
|
||||
#!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!-64-bit
|
||||
((type= type (specifier-type '(unsigned-byte 32)))
|
||||
'sb!c:check-unsigned-byte-32)
|
||||
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!+64-bit
|
||||
((type= type (specifier-type '(signed-byte 64)))
|
||||
'sb!c:check-signed-byte-64)
|
||||
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!+64-bit
|
||||
((type= type (specifier-type '(unsigned-byte 64)))
|
||||
'sb!c:check-unsigned-byte-64)
|
||||
(t nil)))
|
||||
|
|
|
|||
|
|
@ -57,10 +57,10 @@
|
|||
(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))
|
||||
#!+64-bit
|
||||
(define-type-predicate simple-array-unsigned-byte-63-p
|
||||
(simple-array (unsigned-byte 63) (*)))
|
||||
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!+64-bit
|
||||
(define-type-predicate simple-array-unsigned-byte-64-p
|
||||
(simple-array (unsigned-byte 64) (*)))
|
||||
(define-type-predicate simple-array-signed-byte-8-p
|
||||
|
|
@ -75,7 +75,7 @@
|
|||
(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))
|
||||
#!+64-bit
|
||||
(define-type-predicate simple-array-signed-byte-64-p
|
||||
(simple-array (signed-byte 64) (*)))
|
||||
(define-type-predicate simple-array-single-float-p
|
||||
|
|
@ -96,13 +96,13 @@
|
|||
#!+sb-unicode (define-type-predicate simple-character-string-p
|
||||
(simple-array character (*)))
|
||||
(define-type-predicate system-area-pointer-p system-area-pointer)
|
||||
#!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!-64-bit
|
||||
(define-type-predicate unsigned-byte-32-p (unsigned-byte 32))
|
||||
#!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!-64-bit
|
||||
(define-type-predicate signed-byte-32-p (signed-byte 32))
|
||||
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!+64-bit
|
||||
(define-type-predicate unsigned-byte-64-p (unsigned-byte 64))
|
||||
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!+64-bit
|
||||
(define-type-predicate signed-byte-64-p (signed-byte 64))
|
||||
#!+sb-simd-pack
|
||||
(define-type-predicate simd-pack-p simd-pack)
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@
|
|||
|
||||
;;; Transforms for 64-bit SAP accessors on 32-bit platforms.
|
||||
|
||||
#!+#.(cl:if (cl:= 32 sb!vm:n-machine-word-bits) '(and) '(or))
|
||||
#!-64-bit
|
||||
(progn
|
||||
#!+#.(cl:if (cl:eq :little-endian sb!c:*backend-byte-order*) '(and) '(or))
|
||||
(progn
|
||||
|
|
|
|||
|
|
@ -631,9 +631,9 @@
|
|||
(kind (cond ((sb!vm:saetp-fixnum-p saetp) :tagged)
|
||||
((member element-type '(character base-char)) :char)
|
||||
((eq element-type 'single-float) :single-float)
|
||||
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!+64-bit
|
||||
((eq element-type 'double-float) :double-float)
|
||||
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!+64-bit
|
||||
((equal element-type '(complex single-float))
|
||||
:complex-single-float)
|
||||
(t
|
||||
|
|
@ -658,11 +658,11 @@
|
|||
tmp)
|
||||
(:single-float
|
||||
(single-float-bits tmp))
|
||||
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!+64-bit
|
||||
(:double-float
|
||||
(logior (ash (double-float-high-bits tmp) 32)
|
||||
(double-float-low-bits tmp)))
|
||||
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!+64-bit
|
||||
(:complex-single-float
|
||||
(logior (ash (single-float-bits (imagpart tmp)) 32)
|
||||
(ldb (byte 32 0)
|
||||
|
|
@ -685,11 +685,11 @@
|
|||
`item)
|
||||
(:single-float
|
||||
`(single-float-bits item))
|
||||
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!+64-bit
|
||||
(:double-float
|
||||
`(logior (ash (double-float-high-bits item) 32)
|
||||
(double-float-low-bits item)))
|
||||
#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
|
||||
#!+64-bit
|
||||
(:complex-single-float
|
||||
`(logior (ash (single-float-bits (imagpart item)) 32)
|
||||
(ldb (byte 32 0)
|
||||
|
|
|
|||
|
|
@ -638,7 +638,7 @@ openbsd_init()
|
|||
* Show a warning if it looks like the memory available after
|
||||
* allocating the spaces won't be at least this much.
|
||||
*/
|
||||
#ifdef LISP_FEATURE_X86_64
|
||||
#ifdef LISP_FEATURE_64_BIT
|
||||
const int wantfree = 64 * 1024 * 1024;
|
||||
#else
|
||||
const int wantfree = 32 * 1024 * 1024;
|
||||
|
|
|
|||
|
|
@ -694,13 +694,13 @@ static void print_otherptr(lispobj obj)
|
|||
#ifdef COMPLEX_SINGLE_FLOAT_WIDETAG
|
||||
case COMPLEX_SINGLE_FLOAT_WIDETAG:
|
||||
NEWLINE_OR_RETURN;
|
||||
#ifdef LISP_FEATURE_X86_64
|
||||
#ifdef LISP_FEATURE_64_BIT
|
||||
printf("%g", ((struct complex_single_float *)native_pointer(obj))->data.data[0]);
|
||||
#else
|
||||
printf("%g", ((struct complex_single_float *)native_pointer(obj))->real);
|
||||
#endif
|
||||
NEWLINE_OR_RETURN;
|
||||
#ifdef LISP_FEATURE_X86_64
|
||||
#ifdef LISP_FEATURE_64_BIT
|
||||
printf("%g", ((struct complex_single_float *)native_pointer(obj))->data.data[1]);
|
||||
#else
|
||||
printf("%g", ((struct complex_single_float *)native_pointer(obj))->imag);
|
||||
|
|
@ -815,7 +815,7 @@ static void print_otherptr(lispobj obj)
|
|||
|
||||
static void print_obj(char *prefix, lispobj obj)
|
||||
{
|
||||
#ifdef LISP_FEATURE_X86_64
|
||||
#ifdef LISP_FEATURE_64_BIT
|
||||
static void (*verbose_fns[])(lispobj obj)
|
||||
= {print_fixnum, print_otherimm, print_fixnum, print_struct,
|
||||
print_fixnum, print_otherimm, print_fixnum, print_list,
|
||||
|
|
|
|||
|
|
@ -422,7 +422,7 @@
|
|||
|
||||
;;; writing looong lines. takes way too long and way too much space
|
||||
;;; to test on 64 bit platforms
|
||||
#-#.(cl:if (cl:= sb-vm:n-word-bits 64) '(and) '(or))
|
||||
#-64-bit
|
||||
(let ((test "long-lines-write-test.tmp"))
|
||||
(unwind-protect
|
||||
(with-open-file (f test
|
||||
|
|
|
|||
Loading…
Reference in a new issue