Index: /trunk/ccl/compiler/PPC/PPC64/ppc64-arch.lisp
===================================================================
--- /trunk/ccl/compiler/PPC/PPC64/ppc64-arch.lisp	(revision 374)
+++ /trunk/ccl/compiler/PPC/PPC64/ppc64-arch.lisp	(revision 375)
@@ -42,8 +42,10 @@
 (defconstant fixnum-mask fixnummask)
 (defconstant subtag-mask (1- (ash 1 num-subtag-bits)))
-(defconstant ncharcodebits 16)
+(defconstant ncharcodebits 32)
 (defconstant charcode-shift (- nbits-in-word ncharcodebits))
 (defconstant word-shift 3)
-
+(defconstant word-size-in-bytes 8)
+(defconstant target-most-negative-fixnum (ash -1 (1- (- nbits-in-word nfixnumtagbits))))
+(defconstant target-most-positive-fixnum (1- (ash 1 (1- (- nbits-in-word nfixnumtagbits)))))
 (defmacro define-subtag (name tag value)
   `(defconstant ,(ccl::form-symbol "SUBTAG-" name) (logior ,tag (ash ,value ntagbits))))
@@ -78,4 +80,7 @@
 ;;  #b111  node-header
 ;;
+
+(defconstant tag-fixnum 0)
+
 ;;  Note how we're already winding up with lots of header and immediate
 ;;  "classes".  That might actually be useful.
@@ -104,5 +109,5 @@
 (defconstant fulltag-immheader-2    #b1010)
 (defconstant fulltag-nodeheader-2   #b1011)
-(defconstant fulltag-uvector        #b1100)
+(defconstant fulltag-misc           #b1100)
 (defconstant fulltag-imm-3          #b1101)
 (defconstant fulltag-immheader-3    #b1110)
@@ -113,5 +118,5 @@
 ;; object is something like:
 ;; (clrldi tag node 60)
-;; (cmpwi tag fulltag-uvector)
+;; (cmpwi tag fulltag-misc)
 ;; (clrldi tag tag 61
 ;; (bne @done)
@@ -242,5 +247,5 @@
 (defmacro define-fixedsized-object (name &rest non-header-cells)
   `(progn
-     (define-lisp-object ,name fulltag-uvector header ,@non-header-cells)
+     (define-lisp-object ,name fulltag-misc header ,@non-header-cells)
      (ccl::defenum ()
        ,@(mapcar #'(lambda (cell) (ccl::form-symbol name "." cell "-CELL")) non-header-cells))
@@ -253,5 +258,5 @@
 
 
-(defconstant misc-header-offset (- fulltag-uvector))
+(defconstant misc-header-offset (- fulltag-misc))
 (defconstant misc-subtag-offset (+ misc-header-offset 7 ))
 (defconstant misc-data-offset (+ misc-header-offset 8))
@@ -268,8 +273,9 @@
 (define-subtag go-tag fulltag-imm-1 0)
 (define-subtag block-tag fulltag-imm-1 1)
-(define-subtag no-thread-local-binding fulltag-imm-2 0)
+(define-subtag character fulltag-imm-2 0)
 (define-subtag unbound fulltag-imm-3 0)
 (defconstant unbound-marker subtag-unbound)
 (defconstant undefined unbound-marker)
+(define-subtag no-thread-local-binding fulltag-imm-3 1)
 
 
@@ -381,5 +387,5 @@
 )
 
-(define-lisp-object arrayH fulltag-uvector
+(define-lisp-object arrayH fulltag-misc
   header                                ; subtag = subtag-arrayH
   rank                                  ; NEVER 1
@@ -520,5 +526,5 @@
 
 
-(ppc32::define-storage-layout lisp-frame 0
+(ppc64::define-storage-layout lisp-frame 0
   backlink
   savefn
@@ -587,5 +593,5 @@
   (let* ((pos (position sym ppc::*ppc-kernel-globals* :test #'string=)))
     (if pos
-      (- (+ fulltag-uvector (* (1+ pos) 8)))
+      (- (+ fulltag-misc (* (1+ pos) word-size-in-bytes)))
       (error "Unknown kernel global : ~s ." sym))))
 
@@ -593,5 +599,5 @@
   (let* ((pos (position sym ppc::*ppc-kernel-globals* :test #'string=)))
     (if pos
-      (- (+ fulltag-uvector (* (1+ pos) 4)))
+      (- (+ fulltag-misc (* (1+ pos) word-size-in-bytes)))
       (error "Unknown kernel global : ~s ." sym))))
 
@@ -599,5 +605,5 @@
 ; The objects in question are generally fixnum-tagged; the entries in the
 ; "kernel-imports" vector are 8 bytes apart.
-(ccl::defenum (:prefix "KERNEL-IMPORT-" :start 0 :step 8)
+(ccl::defenum (:prefix "KERNEL-IMPORT-" :start 0 :step word-size-in-bytes)
   fd-setsize-bytes
   do-fd-set
@@ -652,5 +658,5 @@
     (if pos (* (1+ pos) symbol.size))))
 
-(defconstant nil-value (+ #x2000 symbol.size fulltag-uvector))
+(defconstant nil-value (+ #x2000 symbol.size fulltag-misc))
 
 
