"OBJECT-NOT-SIMPLE-ARRAY-UNSIGNED-BYTE-15-ERROR"
"OBJECT-NOT-SIMPLE-ARRAY-UNSIGNED-BYTE-16-ERROR"
"OBJECT-NOT-SIMPLE-ARRAY-UNSIGNED-BYTE-2-ERROR"
+ ;; KLUDGE: 32-bit and 64-bit ports implement a
+ ;; different set of specialized array types.
+ ;; Various bits of code in SBCL assume that
+ ;; symbols connected to the specialized array
+ ;; types are exported. But there's not a good
+ ;; way at this point to know whether the port
+ ;; for which we're building is 32-bit or 64-bit.
+ ;; Granted, we could hardcode the particulars
+ ;; (or even come up with a special :64BIT feature),
+ ;; but that seems a little inelegant. For now,
+ ;; we brute-force the issue by always exporting
+ ;; all the names required for both 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-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-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"
"OBJECT-NOT-SIMPLE-BASE-STRING-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-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-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"
"SIMPLE-PACKAGE-ERROR"
"OBJECT-NOT-LIST-TRAP" "OBJECT-NOT-INSTANCE-TRAP"
"OCFP-SAVE-OFFSET"
"ODD-FIXNUM-LOWTAG"
- "OFFSET-STATIC-SYMBOL" "OTHER-IMMEDIATE-0-LOWTAG"
- "OTHER-IMMEDIATE-1-LOWTAG" "OTHER-POINTER-LOWTAG"
+ "OFFSET-STATIC-SYMBOL"
+ "OTHER-IMMEDIATE-0-LOWTAG"
+ "OTHER-IMMEDIATE-1-LOWTAG"
+ ;; FIXME: 32/64-bit issues
+ "OTHER-IMMEDIATE-2-LOWTAG"
+ "OTHER-IMMEDIATE-3-LOWTAG"
+ "OTHER-POINTER-LOWTAG"
"PAD-DATA-BLOCK" "PENDING-INTERRUPT-TRAP"
"PRIMITIVE-OBJECT" "PRIMITIVE-OBJECT-WIDETAG"
"PRIMITIVE-OBJECT-LOWTAG" "PRIMITIVE-OBJECT-NAME"
"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-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"
- "SIMPLE-ARRAY-SIGNED-BYTE-30-WIDETAG"
+ ;; FIXME: 32/64-bit issues
+ "SIMPLE-ARRAY-SIGNED-BYTE-30-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"
"SIMPLE-BASE-STRING-WIDETAG"
:translation (and integer (not fixnum))
:inherits (integer rational real number)
:codes (#.sb!vm:bignum-widetag)
- ;; FIXME: wrong for 64-bit!
- :prototype-form (expt 2 42))
+ :prototype-form (expt 2 #.(* sb!vm:n-word-bits (/ 3 2))))
(array :translation array :codes (#.sb!vm:complex-array-widetag)
:hierarchical-p nil
: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)
: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))
+ (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 '(unsigned-byte 63)))
+ #!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
+ (simple-array-unsigned-byte-64
+ :translation (simple-array (unsigned-byte 64) (*))
+ :codes (#.sb!vm:simple-array-unsigned-byte-64-widetag)
+ :direct-superclasses (vector simple-array)
+ :inherits (vector simple-array array sequence)
+ :prototype-form (make-array 0 :element-type '(unsigned-byte 64)))
(simple-array-signed-byte-8
:translation (simple-array (signed-byte 8) (*))
:codes (#.sb!vm:simple-array-signed-byte-8-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)
: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))
+ (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)
+ :direct-superclasses (vector simple-array)
+ :inherits (vector simple-array array sequence)
+ :prototype-form (make-array 0 :element-type '(signed-byte 64)))
(simple-array-single-float
:translation (simple-array single-float (*))
:codes (#.sb!vm:simple-array-single-float-widetag)
;;;
;;; rather than two separate tests and jumps
(defenum (:suffix -widetag
+ ;; The first widetag must be greater than SB!VM:LOWTAG-LIMIT
+ ;; otherwise code in generic/early-type-vops will suffer
+ ;; a long, horrible death. --njf, 2004-08-09
:start (+ (ash 1 n-lowtag-bits) other-immediate-0-lowtag)
:step 4)
+ ;; NOTE: the binary numbers off to the side are only valid for 32-bit
+ ;; ports; add #x1000 if you want to know the values for 64-bit ports.
+ ;; And note that the numbers get a little scrambled further down.
+ ;; --njf, 2004-08-09
bignum ; 00001010
ratio ; 00001110
single-float ; 00010010
unused07 ; 01110110
unused08 ; 01111010
unused09 ; 01111110
-
+
+ #!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
unused10 ; 10000010
+ #!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
unused11 ; 10000110
simple-array-unsigned-byte-2 ; 10001010
simple-base-string ; 10100110
simple-bit-vector ; 10101010
simple-vector ; 10101110
+ #!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
simple-array-unsigned-byte-29 ; 10110010
simple-array-unsigned-byte-31 ; 10110110
simple-array-unsigned-byte-32 ; 10111010
+ #!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
+ simple-array-unsigned-byte-60
+ #!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
+ simple-array-unsigned-byte-63
+ #!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
+ simple-array-unsigned-byte-64
simple-array-signed-byte-8 ; 10111110
simple-array-signed-byte-16 ; 11000010
+ #!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
simple-array-signed-byte-30 ; 11000110
simple-array-signed-byte-32 ; 11001010
+ #!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
+ simple-array-signed-byte-61
+ #!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
+ simple-array-signed-byte-64
simple-array-single-float ; 11001110
simple-array-double-float ; 11010010
simple-array-complex-single-float ; 11010110
complex-vector ; 11101110
complex-array ; 11110010
+ #!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
unused12 ; 11110110
+ #!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
unused13 ; 11111010
+ #!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
unused14 ; 11111110
)
(- unsigned #x40000000)
unsigned))))
((or (= lowtag sb!vm:other-immediate-0-lowtag)
- (= lowtag sb!vm:other-immediate-1-lowtag))
+ (= lowtag sb!vm:other-immediate-1-lowtag)
+ #!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
+ (= lowtag sb!vm:other-immediate-2-lowtag)
+ #!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
+ (= lowtag sb!vm:other-immediate-3-lowtag))
(format stream
"for other immediate: #X~X, type #b~8,'0B"
(ash (descriptor-bits des) (- sb!vm:n-widetag-bits))
(defun descriptor-fixnum (des)
(let ((bits (descriptor-bits des)))
(if (logbitp (1- sb!vm:n-word-bits) bits)
- ;; KLUDGE: The (- SB!VM:N-WORD-BITS 2) term here looks right to
- ;; me, and it works, but in CMU CL it was (1- SB!VM:N-WORD-BITS),
- ;; and although that doesn't make sense for me, or work for me,
- ;; it's hard to see how it could have been wrong, since CMU CL
- ;; genesis worked. It would be nice to understand how this came
- ;; to be.. -- WHN 19990901
- (logior (ash bits (- 1 sb!vm:n-lowtag-bits))
- (ash -1 (- sb!vm:n-word-bits (1- sb!vm:n-lowtag-bits))))
- (ash bits (- 1 sb!vm:n-lowtag-bits)))))
+ ;; KLUDGE: The (- SB!VM:N-WORD-BITS 2) term here looks right to
+ ;; me, and it works, but in CMU CL it was (1- SB!VM:N-WORD-BITS),
+ ;; and although that doesn't make sense for me, or work for me,
+ ;; it's hard to see how it could have been wrong, since CMU CL
+ ;; genesis worked. It would be nice to understand how this came
+ ;; to be.. -- WHN 19990901
+ (logior (ash bits (- 1 sb!vm:n-lowtag-bits))
+ (ash -1 (1+ sb!vm:n-positive-fixnum-bits)))
+ (ash bits (- 1 sb!vm:n-lowtag-bits)))))
;;; common idioms
(defun descriptor-bytes (des)
(note-load-time-code-fixup code-object
after-header
value
- kind)))))) ))
+ kind))))))))
(values))
(defun resolve-assembler-fixups ()
(31 (prog1 sb!vm:simple-array-unsigned-byte-31-widetag
(setf sizebits 32)))
(32 sb!vm:simple-array-unsigned-byte-32-widetag)
+ #!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
+ (63 (prog1 sb!vm:simple-array-unsigned-byte-63-widetag
+ (setf sizebits 64)))
+ #!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
+ (64 (sb!vm:simple-array-unsigned-byte-64-widetag))
(t (error "losing element size: ~W" sizebits))))
(result (allocate-vector-object *dynamic* sizebits len type))
(start (+ (descriptor-byte-offset result)
(maybe-record-with-translated-name '("-START" "-END") 6)
(maybe-record-with-translated-name '("-CORE-ENTRY-TYPE-CODE") 7)
(maybe-record-with-translated-name '("-CORE-SPACE-ID") 8))))))
+ ;; KLUDGE: these constants are sort of important, but there's no
+ ;; pleasing way to inform the code above about them. So we fake
+ ;; it for now. nikodemus on #lisp (2004-08-09) suggested simply
+ ;; exporting every numeric constant from SB!VM; that would work,
+ ;; but the C runtime would have to be altered to use Lisp-like names
+ ;; rather than the munged names currently exported. --njf, 2004-08-09
+ (dolist (c '(sb!vm:n-word-bits sb!vm:n-word-bytes
+ sb!vm:n-lowtag-bits sb!vm:lowtag-mask
+ sb!vm:n-widetag-bits sb!vm:widetag-mask
+ sb!vm:n-fixnum-tag-bits sb!vm:fixnum-tag-mask))
+ (push (list (substitute #\_ #\- (symbol-name c))
+ -1 ; invent a new priority
+ (symbol-value c)
+ nil)
+ constants))
+
(setf constants
(sort constants
(lambda (const1 const2)
: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))
((unsigned-byte 29) 0 32 simple-array-unsigned-byte-29
:importance 8)
((unsigned-byte 31) 0 32 simple-array-unsigned-byte-31
: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))
+ ((unsigned-byte 60) 0 64 simple-array-unsigned-byte-60
+ :importance 8)
+ #!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
+ ((unsigned-byte 63) 0 64 simple-array-unsigned-byte-63
+ :importance 9)
+ #!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
+ ((unsigned-byte 64) 0 64 simple-array-unsigned-byte-64
+ :importance 9)
((signed-byte 8) 0 8 simple-array-signed-byte-8
:importance 10)
((signed-byte 16) 0 16 simple-array-signed-byte-16
;; 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))
(fixnum 0 32 simple-array-signed-byte-30
:importance 8)
((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
+ :importance 8)
+ #!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
+ ((signed-byte 64) 0 64 simple-array-signed-byte-64
+ :importance 7)
((complex single-float) #C(0.0f0 0.0f0) 64
simple-array-complex-single-float
:importance 3)
simple-array-unsigned-byte-2-p
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 simple-array-unsigned-byte-29-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-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
- simple-array-signed-byte-30-p simple-array-signed-byte-32-p
+ #!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
+ simple-array-signed-byte-30-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-complex-single-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-byte-31-p
(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) (*)))
+#!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or))
+(define-type-predicate simple-array-unsigned-byte-64-p
+ (simple-array (unsigned-byte 64) (*)))
(define-type-predicate simple-array-signed-byte-8-p
(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-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) (*)))
+#!+#.(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) (*)))
(define-type-predicate simple-array-single-float-p
(simple-array single-float (*)))
(define-type-predicate simple-array-double-float-p
# files for more information.
CFLAGS += -Dalpha -Dosf1 -O0 -g -D_XOPEN_SOURCE=500 -D_OSF_SOURCE=500
+CFLAGS += -msg_disable newlocale
ASFLAGS += -Dalpha -Dosf1 #-ULANGUAGE_ASSEMBLY
-LD = ld -taso
-LINKFLAGS = -taso -non_shared # dynamic -v -g -Wl,-T -Wl,ld-script.alpha-linux
+LD = ld -xtaso
+LINKFLAGS = -non_shared # dynamic -v -g -Wl,-T -Wl,ld-script.alpha-linux
# Digital^WCompaq^WHP's cc declares `static inline' functions to exist
# in multiple places in the binary; we add the '-g' flag to suppress all
# internal (i.e. static) function names being spat out. GENESIS
#include <string.h>
#include "sbcl.h"
-#include "genesis/config.h"
#include "runtime.h"
#include "os.h"
#include "alloc.h"
#ifndef _ALLOC_H_
#define _ALLOC_H_
+#include "sbcl.h"
#include "runtime.h"
extern lispobj alloc_cons(lispobj car, lispobj cdr);
#include <stdio.h>
#include <string.h>
-#include "runtime.h"
#include "sbcl.h"
+#include "runtime.h"
#include "globals.h"
#include "validate.h"
#include "os.h"
#include <stdio.h>
#include <sys/param.h>
#include <sys/file.h>
+#include "sbcl.h"
#include "./signal.h"
#include "os.h"
#include "arch.h"
#include "interrupt.h"
#include "interr.h"
#include "lispregs.h"
-#include "sbcl.h"
#include <sys/socket.h>
#include <sys/utsname.h>
reg_L0, reg_L1, reg_L2 \
}
-
#define call_into_lisp_LRA_page 0x10000
#include <stdio.h>
#include <sys/param.h>
#include <sys/file.h>
+#include "sbcl.h"
#include "./signal.h"
#include "os.h"
#include "arch.h"
#include "interrupt.h"
#include "interr.h"
#include "lispregs.h"
-#include "sbcl.h"
#include <sys/socket.h>
#include <sys/utsname.h>
#include <stdio.h>
#include <signal.h>
-#include "runtime.h"
#include "sbcl.h"
+#include "runtime.h"
#include "globals.h"
#include "os.h"
#include "interrupt.h"
#include <sys/time.h>
#include <sys/resource.h>
#include <signal.h>
-#include "runtime.h"
#include "sbcl.h"
+#include "runtime.h"
#include "os.h"
#include "gc.h"
#include "gc-internal.h"
\f
/* vector-like objects */
-/* #define NWORDS(x,y) (CEILING((x),(y)) / (y)) */
-
static int
scav_vector(lispobj *where, lispobj object)
{
#ifndef _CORE_H_
#define _CORE_H_
+#include "sbcl.h"
#include "runtime.h"
struct ndir_entry {
* files for more information.
*/
-#include "runtime.h"
#include "sbcl.h"
+#include "runtime.h"
#include "globals.h"
#include "dynbind.h"
#include "thread.h"
#include <stdio.h>
#include <signal.h>
#include <string.h>
-#include "runtime.h"
#include "sbcl.h"
+#include "runtime.h"
#include "os.h"
#include "interr.h"
#include "globals.h"
static int\f
/* vector-like objects */
-#define NWORDS(x,y) (CEILING((x),(y)) / (y))
-
scav_base_string(lispobj *where, lispobj object)
{
struct vector *vector;
vector = (struct vector *) where;
length = fixnum_value(vector->length) + 1;
- nwords = CEILING(NWORDS(length, 4) + 2, 2);
+ nwords = CEILING(NWORDS(length, 8) + 2, 2);
return nwords;
}
vector = (struct vector *) native_pointer(object);
length = fixnum_value(vector->length) + 1;
- nwords = CEILING(NWORDS(length, 4) + 2, 2);
+ nwords = CEILING(NWORDS(length, 8) + 2, 2);
return copy_large_unboxed_object(object, nwords);
}
vector = (struct vector *) where;
length = fixnum_value(vector->length) + 1;
- nwords = CEILING(NWORDS(length, 4) + 2, 2);
+ nwords = CEILING(NWORDS(length, 8) + 2, 2);
return nwords;
}
vector = (struct vector *) where;
length = fixnum_value(vector->length);
- nwords = CEILING(NWORDS(length, 32) + 2, 2);
+ nwords = CEILING(NWORDS(length, 1) + 2, 2);
return nwords;
}
vector = (struct vector *) native_pointer(object);
length = fixnum_value(vector->length);
- nwords = CEILING(NWORDS(length, 32) + 2, 2);
+ nwords = CEILING(NWORDS(length, 1) + 2, 2);
return copy_large_unboxed_object(object, nwords);
}
vector = (struct vector *) where;
length = fixnum_value(vector->length);
- nwords = CEILING(NWORDS(length, 32) + 2, 2);
+ nwords = CEILING(NWORDS(length, 1) + 2, 2);
return nwords;
}
vector = (struct vector *) where;
length = fixnum_value(vector->length);
- nwords = CEILING(NWORDS(length, 16) + 2, 2);
+ nwords = CEILING(NWORDS(length, 2) + 2, 2);
return nwords;
}
vector = (struct vector *) native_pointer(object);
length = fixnum_value(vector->length);
- nwords = CEILING(NWORDS(length, 16) + 2, 2);
+ nwords = CEILING(NWORDS(length, 2) + 2, 2);
return copy_large_unboxed_object(object, nwords);
}
vector = (struct vector *) where;
length = fixnum_value(vector->length);
- nwords = CEILING(NWORDS(length, 16) + 2, 2);
+ nwords = CEILING(NWORDS(length, 2) + 2, 2);
return nwords;
}
vector = (struct vector *) where;
length = fixnum_value(vector->length);
- nwords = CEILING(NWORDS(length, 8) + 2, 2);
+ nwords = CEILING(NWORDS(length, 4) + 2, 2);
return nwords;
}
vector = (struct vector *) native_pointer(object);
length = fixnum_value(vector->length);
- nwords = CEILING(NWORDS(length, 8) + 2, 2);
+ nwords = CEILING(NWORDS(length, 4) + 2, 2);
return copy_large_unboxed_object(object, nwords);
}
vector = (struct vector *) where;
length = fixnum_value(vector->length);
- nwords = CEILING(NWORDS(length, 8) + 2, 2);
+ nwords = CEILING(NWORDS(length, 4) + 2, 2);
return nwords;
}
vector = (struct vector *) where;
length = fixnum_value(vector->length);
- nwords = CEILING(NWORDS(length, 4) + 2, 2);
+ nwords = CEILING(NWORDS(length, 8) + 2, 2);
return nwords;
}
vector = (struct vector *) native_pointer(object);
length = fixnum_value(vector->length);
- nwords = CEILING(NWORDS(length, 4) + 2, 2);
+ nwords = CEILING(NWORDS(length, 8) + 2, 2);
return copy_large_unboxed_object(object, nwords);
}
vector = (struct vector *) where;
length = fixnum_value(vector->length);
- nwords = CEILING(NWORDS(length, 4) + 2, 2);
+ nwords = CEILING(NWORDS(length, 8) + 2, 2);
return nwords;
}
vector = (struct vector *) where;
length = fixnum_value(vector->length);
- nwords = CEILING(NWORDS(length, 2) + 2, 2);
+ nwords = CEILING(NWORDS(length, 16) + 2, 2);
return nwords;
}
vector = (struct vector *) native_pointer(object);
length = fixnum_value(vector->length);
- nwords = CEILING(NWORDS(length, 2) + 2, 2);
+ nwords = CEILING(NWORDS(length, 16) + 2, 2);
return copy_large_unboxed_object(object, nwords);
}
vector = (struct vector *) where;
length = fixnum_value(vector->length);
- nwords = CEILING(NWORDS(length, 2) + 2, 2);
+ nwords = CEILING(NWORDS(length, 16) + 2, 2);
return nwords;
}
vector = (struct vector *) where;
length = fixnum_value(vector->length);
- nwords = CEILING(length + 2, 2);
+ nwords = CEILING(NWORDS(length, 32) + 2, 2);
return nwords;
}
vector = (struct vector *) native_pointer(object);
length = fixnum_value(vector->length);
- nwords = CEILING(length + 2, 2);
+ nwords = CEILING(NWORDS(length, 32) + 2, 2);
return copy_large_unboxed_object(object, nwords);
}
vector = (struct vector *) where;
length = fixnum_value(vector->length);
- nwords = CEILING(length + 2, 2);
+ nwords = CEILING(NWORDS(length, 32) + 2, 2);
return nwords;
}
+#if N_WORD_BITS == 64
+static int
+scav_vector_unsigned_byte_64(lispobj *where, lispobj object)
+{
+ struct vector *vector;
+ int length, nwords;
+
+ vector = (struct vector *) where;
+ length = fixnum_value(vector->length);
+ nwords = CEILING(NWORDS(length, 64) + 2, 2);
+
+ return nwords;
+}
+
+static lispobj
+trans_vector_unsigned_byte_64(lispobj object)
+{
+ struct vector *vector;
+ int length, nwords;
+
+ gc_assert(is_lisp_pointer(object));
+
+ vector = (struct vector *) native_pointer(object);
+ length = fixnum_value(vector->length);
+ nwords = CEILING(NWORDS(length, 64) + 2, 2);
+
+ return copy_large_unboxed_object(object, nwords);
+}
+
+static int
+size_vector_unsigned_byte_64(lispobj *where)
+{
+ struct vector *vector;
+ int length, nwords;
+
+ vector = (struct vector *) where;
+ length = fixnum_value(vector->length);
+ nwords = CEILING(NWORDS(length, 64) + 2, 2);
+
+ return nwords;
+}
+#endif
+
static int
scav_vector_single_float(lispobj *where, lispobj object)
{
scav_vector_unsigned_byte_16;
scavtab[SIMPLE_ARRAY_UNSIGNED_BYTE_16_WIDETAG] =
scav_vector_unsigned_byte_16;
+#ifdef SIMPLE_ARRAY_SIGNED_BYTE_29_WIDETAG
scavtab[SIMPLE_ARRAY_UNSIGNED_BYTE_29_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_64_WIDETAG] =
+ scav_vector_unsigned_byte_64;
+#endif
+#ifdef SIMPLE_ARRAY_UNSIGNED_BYTE_63_WIDETAG
+ scavtab[SIMPLE_ARRAY_UNSIGNED_BYTE_64_WIDETAG] =
+ scav_vector_unsigned_byte_64;
+#endif
+#ifdef SIMPLE_ARRAY_UNSIGNED_BYTE_64_WIDETAG
+ scavtab[SIMPLE_ARRAY_UNSIGNED_BYTE_64_WIDETAG] =
+ scav_vector_unsigned_byte_64;
+#endif
#ifdef SIMPLE_ARRAY_SIGNED_BYTE_8_WIDETAG
scavtab[SIMPLE_ARRAY_SIGNED_BYTE_8_WIDETAG] = scav_vector_unsigned_byte_8;
#endif
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] =
+ scav_vector_unsigned_byte_64;
+#endif
+#ifdef SIMPLE_ARRAY_SIGNED_BYTE_64_WIDETAG
+ scavtab[SIMPLE_ARRAY_SIGNED_BYTE_64_WIDETAG] =
+ scav_vector_unsigned_byte_64;
+#endif
scavtab[SIMPLE_ARRAY_SINGLE_FLOAT_WIDETAG] = scav_vector_single_float;
scavtab[SIMPLE_ARRAY_DOUBLE_FLOAT_WIDETAG] = scav_vector_double_float;
#ifdef SIMPLE_ARRAY_LONG_FLOAT_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] =
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] =
+ trans_vector_unsigned_byte_32;
+#endif
+#ifdef SIMPLE_ARRAY_UNSIGNED_BYTE_63_WIDETAG
+ transother[SIMPLE_ARRAY_UNSIGNED_BYTE_63_WIDETAG] =
+ trans_vector_unsigned_byte_64;
+#endif
+#ifdef SIMPLE_ARRAY_UNSIGNED_BYTE_64_WIDETAG
+ transother[SIMPLE_ARRAY_UNSIGNED_BYTE_64_WIDETAG] =
+ trans_vector_unsigned_byte_64;
+#endif
#ifdef SIMPLE_ARRAY_SIGNED_BYTE_8_WIDETAG
transother[SIMPLE_ARRAY_SIGNED_BYTE_8_WIDETAG] =
trans_vector_unsigned_byte_8;
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] =
+ trans_vector_unsigned_byte_64;
+#endif
+#ifdef SIMPLE_ARRAY_SIGNED_BYTE_64_WIDETAG
+ transother[SIMPLE_ARRAY_SIGNED_BYTE_64_WIDETAG] =
+ trans_vector_unsigned_byte_64;
+#endif
transother[SIMPLE_ARRAY_SINGLE_FLOAT_WIDETAG] =
trans_vector_single_float;
transother[SIMPLE_ARRAY_DOUBLE_FLOAT_WIDETAG] =
for (i = 0; i < ((sizeof sizetab)/(sizeof sizetab[0])); i++)
sizetab[i] = size_lose;
for (i = 0; i < (1<<(N_WIDETAG_BITS-N_LOWTAG_BITS)); i++) {
- sizetab[EVEN_FIXNUM_LOWTAG|(i<<3)] = size_immediate;
- sizetab[FUN_POINTER_LOWTAG|(i<<3)] = size_pointer;
+ sizetab[EVEN_FIXNUM_LOWTAG|(i<<N_LOWTAG_BITS)] = size_immediate;
+ sizetab[FUN_POINTER_LOWTAG|(i<<N_LOWTAG_BITS)] = size_pointer;
/* skipping OTHER_IMMEDIATE_0_LOWTAG */
- sizetab[LIST_POINTER_LOWTAG|(i<<3)] = size_pointer;
- sizetab[ODD_FIXNUM_LOWTAG|(i<<3)] = size_immediate;
- sizetab[INSTANCE_POINTER_LOWTAG|(i<<3)] = size_pointer;
+ sizetab[LIST_POINTER_LOWTAG|(i<<N_LOWTAG_BITS)] = size_pointer;
+ sizetab[ODD_FIXNUM_LOWTAG|(i<<N_LOWTAG_BITS)] = size_immediate;
+ sizetab[INSTANCE_POINTER_LOWTAG|(i<<N_LOWTAG_BITS)] = size_pointer;
/* skipping OTHER_IMMEDIATE_1_LOWTAG */
- sizetab[OTHER_POINTER_LOWTAG|(i<<3)] = size_pointer;
+ sizetab[OTHER_POINTER_LOWTAG|(i<<N_LOWTAG_BITS)] = size_pointer;
}
sizetab[BIGNUM_WIDETAG] = size_unboxed;
sizetab[RATIO_WIDETAG] = size_boxed;
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] =
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] =
+ size_vector_unsigned_byte_64;
+#endif
+#ifdef SIMPLE_ARRAY_UNSIGNED_BYTE_63_WIDETAG
+ sizetab[SIMPLE_ARRAY_UNSIGNED_BYTE_63_WIDETAG] =
+ size_vector_unsigned_byte_64;
+#endif
+#ifdef SIMPLE_ARRAY_UNSIGNED_BYTE_64_WIDETAG
+ sizetab[SIMPLE_ARRAY_UNSIGNED_BYTE_64_WIDETAG] =
+ size_vector_unsigned_byte_64;
+#endif
#ifdef SIMPLE_ARRAY_SIGNED_BYTE_8_WIDETAG
sizetab[SIMPLE_ARRAY_SIGNED_BYTE_8_WIDETAG] = size_vector_unsigned_byte_8;
#endif
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] =
+ size_vector_unsigned_byte_64;
+#endif
+#ifdef SIMPLE_ARRAY_SIGNED_BYTE_64_WIDETAG
+ sizetab[SIMPLE_ARRAY_SIGNED_BYTE_64_WIDETAG] =
+ size_vector_unsigned_byte_64;
+#endif
sizetab[SIMPLE_ARRAY_SINGLE_FLOAT_WIDETAG] = size_vector_single_float;
sizetab[SIMPLE_ARRAY_DOUBLE_FLOAT_WIDETAG] = size_vector_double_float;
#ifdef SIMPLE_ARRAY_LONG_FLOAT_WIDETAG
__FILE__, __LINE__)
#define CEILING(x,y) (((x) + ((y) - 1)) & (~((y) - 1)))
-#define NWORDS(x,y) (CEILING((x),(y)) / (y))
+
+static inline unsigned int
+NWORDS(unsigned int x, unsigned int n_bits)
+{
+ unsigned int elements_per_word = N_WORD_BITS/n_bits;
+
+ return CEILING(x, elements_per_word)/elements_per_word;
+}
/* FIXME: Shouldn't this be defined in sbcl.h? */
#define FUN_RAW_ADDR_OFFSET (6*sizeof(lispobj) - FUN_POINTER_LOWTAG)
#include <signal.h>
#include <errno.h>
#include <string.h>
-#include "runtime.h"
#include "sbcl.h"
+#include "runtime.h"
#include "os.h"
#include "interr.h"
#include "globals.h"
#include <sys/types.h>
#include <unistd.h>
-#include "runtime.h"
#include "sbcl.h"
+#include "runtime.h"
#include "globals.h"
#include "validate.h"
#include <sys/types.h>
#include <unistd.h>
+#include "sbcl.h"
#include "runtime.h"
extern int foreign_function_call_active;
#include <stdio.h>
/* Copied from sparc-arch.c. Not all of these are necessary, probably */
+#include "sbcl.h"
#include "runtime.h"
#include "arch.h"
-#include "sbcl.h"
#include "globals.h"
#include "validate.h"
#include "os.h"
#include <stdio.h>
#include <sys/param.h>
#include <sys/file.h>
+#include "sbcl.h"
#include "./signal.h"
#include "os.h"
#include "arch.h"
#include "interrupt.h"
#include "interr.h"
#include "lispregs.h"
-#include "sbcl.h"
#include <sys/socket.h>
#include <sys/utsname.h>
#include <stdio.h>
+#include "sbcl.h"
#include "runtime.h"
#include "arch.h"
-#include "sbcl.h"
#include "globals.h"
#include "validate.h"
#include "os.h"
#include <stdio.h>
#include <sys/param.h>
#include <sys/file.h>
+#include "sbcl.h"
#include "./signal.h"
#include "os.h"
#include "arch.h"
#include "interrupt.h"
#include "interr.h"
#include "lispregs.h"
-#include "sbcl.h"
#include <sys/socket.h>
#include <sys/utsname.h>
#include <signal.h>
#include <unistd.h>
-#include "runtime.h"
#include "sbcl.h"
+#include "runtime.h"
/* Almost all of this file can be skipped if we're not supporting LDB. */
#if defined(LISP_FEATURE_SB_LDB)
#define _OS_H_INCLUDED_
+#include "sbcl.h"
#include "runtime.h"
/* Some standard preprocessor definitions and typedefs are needed from
#include <stdio.h>
#include <sys/param.h>
#include <sys/file.h>
+#include "sbcl.h"
#include "./signal.h"
#include "os.h"
#include "arch.h"
#include "interrupt.h"
#include "interr.h"
#include "lispregs.h"
-#include "sbcl.h"
#include <sys/socket.h>
#include <sys/utsname.h>
#include <errno.h>
#include <ctype.h>
#include <signal.h>
-#include "runtime.h"
#include "sbcl.h"
+#include "runtime.h"
#if defined(LISP_FEATURE_SB_LDB)
#include <stdio.h>
#include <sys/param.h>
#include <sys/file.h>
+#include "sbcl.h"
#include "./signal.h"
#include "os.h"
#include "arch.h"
#include "interrupt.h"
#include "interr.h"
#include "lispregs.h"
-#include "sbcl.h"
#include <sys/socket.h>
#include <sys/utsname.h>
#include <stdio.h>
+#include "sbcl.h"
#include "print.h"
#include "runtime.h"
-#include "sbcl.h"
/* This file can be skipped if we're not supporting LDB. */
#if defined(LISP_FEATURE_SB_LDB)
#ifndef _PRINT_H_
#define _PRINT_H_
+#include "sbcl.h"
#include "runtime.h"
extern char *lowtag_Names[], *subtype_Names[];
} *later_blocks = NULL;
static int later_count = 0;
-#define CEILING(x,y) (((x) + ((y) - 1)) & (~((y) - 1)))
-#define NWORDS(x,y) (CEILING((x),(y)) / (y))
-
/* FIXME: Shouldn't this be defined in sbcl.h? See also notes in
* cheneygc.c */
case SIMPLE_BASE_STRING_WIDETAG:
vector = (struct vector *)addr;
- count = CEILING(NWORDS(fixnum_value(vector->length)+1,4)+2,2);
+ count = CEILING(NWORDS(fixnum_value(vector->length)+1,8)+2,2);
break;
case SIMPLE_BIT_VECTOR_WIDETAG:
vector = (struct vector *)addr;
- count = CEILING(NWORDS(fixnum_value(vector->length),32)+2,2);
+ count = CEILING(NWORDS(fixnum_value(vector->length),1)+2,2);
break;
case SIMPLE_ARRAY_UNSIGNED_BYTE_2_WIDETAG:
vector = (struct vector *)addr;
- count = CEILING(NWORDS(fixnum_value(vector->length),16)+2,2);
+ count = CEILING(NWORDS(fixnum_value(vector->length),2)+2,2);
break;
case SIMPLE_ARRAY_UNSIGNED_BYTE_4_WIDETAG:
vector = (struct vector *)addr;
- count = CEILING(NWORDS(fixnum_value(vector->length),8)+2,2);
+ count = CEILING(NWORDS(fixnum_value(vector->length),4)+2,2);
break;
case SIMPLE_ARRAY_UNSIGNED_BYTE_8_WIDETAG:
case SIMPLE_ARRAY_UNSIGNED_BYTE_7_WIDETAG:
#endif
vector = (struct vector *)addr;
- count = CEILING(NWORDS(fixnum_value(vector->length),4)+2,2);
+ count = CEILING(NWORDS(fixnum_value(vector->length),8)+2,2);
break;
case SIMPLE_ARRAY_UNSIGNED_BYTE_16_WIDETAG:
case SIMPLE_ARRAY_UNSIGNED_BYTE_15_WIDETAG:
#endif
vector = (struct vector *)addr;
- count = CEILING(NWORDS(fixnum_value(vector->length),2)+2,2);
+ count = CEILING(NWORDS(fixnum_value(vector->length),16)+2,2);
break;
case SIMPLE_ARRAY_UNSIGNED_BYTE_32_WIDETAG:
case SIMPLE_ARRAY_UNSIGNED_BYTE_31_WIDETAG:
#endif
vector = (struct vector *)addr;
- count = CEILING(fixnum_value(vector->length)+2,2);
+ count = CEILING(NWORDS(fixnum_value(vector->length),32)+2,2);
break;
+#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:
+#endif
+ vector = (struct vector *)addr;
+ count = CEILING(NWORDS(fixnum_value(vector->length),64)+2,2);
+ break;
+#endif
+
case SIMPLE_ARRAY_SINGLE_FLOAT_WIDETAG:
vector = (struct vector *)addr;
count = CEILING(fixnum_value(vector->length)+2,2);
* problem.. */
#define QSHOW_SIGNALS 0
-#define N_LOWTAG_BITS 3
-#define LOWTAG_MASK ((1<<N_LOWTAG_BITS)-1)
-#define N_WIDETAG_BITS 8
-#define WIDETAG_MASK ((1<<N_WIDETAG_BITS)-1)
-
/* FIXME: Make HeaderValue, CONS, SYMBOL, and FDEFN into inline
* functions instead of macros. */
/* FIXME: There seems to be no reason that make_fixnum and fixnum_value
* can't be implemented as (possibly inline) functions. */
-#define make_fixnum(n) ((lispobj)((n)<<2))
-#define fixnum_value(n) (((long)n)>>2)
+#define make_fixnum(n) ((lispobj)((n)<<N_FIXNUM_TAG_BITS))
+#define fixnum_value(n) (((long)n)>>N_FIXNUM_TAG_BITS)
/* Too bad ANSI C doesn't define "bool" as C++ does.. */
typedef int boolean;
#include <string.h>
-#include "runtime.h"
#include "sbcl.h"
+#include "runtime.h"
#include "os.h"
#include "search.h"
#include "thread.h"
*/
#include <stdio.h>
+#include "sbcl.h"
#include "runtime.h"
#include "arch.h"
-#include "sbcl.h"
#include "globals.h"
#include "validate.h"
#include "os.h"
#include <stdio.h>
#include <sys/param.h>
#include <sys/file.h>
+#include "sbcl.h"
#include "./signal.h"
#include "os.h"
#include "arch.h"
#include "interrupt.h"
#include "interr.h"
#include "lispregs.h"
-#include "sbcl.h"
#include <sys/socket.h>
#include <sys/utsname.h>
#include <stdio.h>
#include <sys/param.h>
#include <sys/file.h>
+#include "sbcl.h"
#include "./signal.h"
#include "os.h"
#include "arch.h"
#include "interrupt.h"
#include "interr.h"
#include "lispregs.h"
-#include "sbcl.h"
#include <sys/socket.h>
#include <sys/utsname.h>
#include <sys/param.h>
#include <sys/utsname.h>
+#include "sbcl.h"
#include "os.h"
#include "arch.h"
#include "interr.h"
#include "interrupt.h"
#include "globals.h"
#include "validate.h"
-#include "sbcl.h"
#include "target-arch-os.h"
#define OS_VM_DEFAULT_PAGESIZE 8192
#include <sys/types.h>
#include <sys/wait.h>
-#include "runtime.h"
#include "sbcl.h"
+#include "runtime.h"
#include "validate.h" /* for CONTROL_STACK_SIZE etc */
#include "thread.h"
#include "arch.h"
#include "dynbind.h"
#include "genesis/cons.h"
#include "genesis/fdefn.h"
+#include "interr.h" /* for lose() */
+#include "gc-internal.h"
+
#define ALIEN_STACK_SIZE (1*1024*1024) /* 1Mb size chosen at random */
int dynamic_values_bytes=4096*sizeof(lispobj); /* same for all threads */
* we use the appropriate SymbolValue macros to access any of the
* variable quantities from the C runtime. It's not quite OAOOM,
* it just feels like it */
- SetSymbolValue(BINDING_STACK_START,th->binding_stack_start,th);
- SetSymbolValue(CONTROL_STACK_START,th->control_stack_start,th);
- SetSymbolValue(CONTROL_STACK_END,th->control_stack_end,th);
+ SetSymbolValue(BINDING_STACK_START,(lispobj)th->binding_stack_start,th);
+ SetSymbolValue(CONTROL_STACK_START,(lispobj)th->control_stack_start,th);
+ SetSymbolValue(CONTROL_STACK_END,(lispobj)th->control_stack_end,th);
#ifdef LISP_FEATURE_X86
- SetSymbolValue(BINDING_STACK_POINTER,th->binding_stack_pointer,th);
- SetSymbolValue(ALIEN_STACK,th->alien_stack_pointer,th);
- SetSymbolValue(PSEUDO_ATOMIC_ATOMIC,th->pseudo_atomic_atomic,th);
+ SetSymbolValue(BINDING_STACK_POINTER,(lispobj)th->binding_stack_pointer,th);
+ SetSymbolValue(ALIEN_STACK,(lispobj)th->alien_stack_pointer,th);
+ SetSymbolValue(PSEUDO_ATOMIC_ATOMIC,(lispobj)th->pseudo_atomic_atomic,th);
SetSymbolValue(PSEUDO_ATOMIC_INTERRUPTED,th->pseudo_atomic_interrupted,th);
#else
current_binding_stack_pointer=th->binding_stack_pointer;
#include <stdio.h>
#include <time.h>
+#include "sbcl.h"
#include "runtime.h"
void get_timezone(time_t when, int *secwest, boolean *dst)
#include <pwd.h>
#include <stdio.h>
-#include "runtime.h"
#include "sbcl.h"
+#include "runtime.h"
#include "util.h"
/* Although it might seem as though this should be in some standard
#include <stdio.h>
+#include "sbcl.h"
#include "runtime.h"
#include "globals.h"
#include "validate.h"
#include "os.h"
-#include "sbcl.h"
#include "arch.h"
#include "lispregs.h"
#include "signal.h"
;;; 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.46"
+"0.8.13.47"