Changeset 375


Ignore:
Timestamp:
Jan 24, 2004, 3:30:53 PM (21 years ago)
Author:
Gary Byers
Message:

Some fixes; call it fulltag-misc after all.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/compiler/PPC/PPC64/ppc64-arch.lisp

    r254 r375  
    4242(defconstant fixnum-mask fixnummask)
    4343(defconstant subtag-mask (1- (ash 1 num-subtag-bits)))
    44 (defconstant ncharcodebits 16)
     44(defconstant ncharcodebits 32)
    4545(defconstant charcode-shift (- nbits-in-word ncharcodebits))
    4646(defconstant word-shift 3)
    47 
     47(defconstant word-size-in-bytes 8)
     48(defconstant target-most-negative-fixnum (ash -1 (1- (- nbits-in-word nfixnumtagbits))))
     49(defconstant target-most-positive-fixnum (1- (ash 1 (1- (- nbits-in-word nfixnumtagbits)))))
    4850(defmacro define-subtag (name tag value)
    4951  `(defconstant ,(ccl::form-symbol "SUBTAG-" name) (logior ,tag (ash ,value ntagbits))))
     
    7880;;  #b111  node-header
    7981;;
     82
     83(defconstant tag-fixnum 0)
     84
    8085;;  Note how we're already winding up with lots of header and immediate
    8186;;  "classes".  That might actually be useful.
     
    104109(defconstant fulltag-immheader-2    #b1010)
    105110(defconstant fulltag-nodeheader-2   #b1011)
    106 (defconstant fulltag-uvector        #b1100)
     111(defconstant fulltag-misc           #b1100)
    107112(defconstant fulltag-imm-3          #b1101)
    108113(defconstant fulltag-immheader-3    #b1110)
     
    113118;; object is something like:
    114119;; (clrldi tag node 60)
    115 ;; (cmpwi tag fulltag-uvector)
     120;; (cmpwi tag fulltag-misc)
    116121;; (clrldi tag tag 61
    117122;; (bne @done)
     
    242247(defmacro define-fixedsized-object (name &rest non-header-cells)
    243248  `(progn
    244      (define-lisp-object ,name fulltag-uvector header ,@non-header-cells)
     249     (define-lisp-object ,name fulltag-misc header ,@non-header-cells)
    245250     (ccl::defenum ()
    246251       ,@(mapcar #'(lambda (cell) (ccl::form-symbol name "." cell "-CELL")) non-header-cells))
     
    253258
    254259
    255 (defconstant misc-header-offset (- fulltag-uvector))
     260(defconstant misc-header-offset (- fulltag-misc))
    256261(defconstant misc-subtag-offset (+ misc-header-offset 7 ))
    257262(defconstant misc-data-offset (+ misc-header-offset 8))
     
    268273(define-subtag go-tag fulltag-imm-1 0)
    269274(define-subtag block-tag fulltag-imm-1 1)
    270 (define-subtag no-thread-local-binding fulltag-imm-2 0)
     275(define-subtag character fulltag-imm-2 0)
    271276(define-subtag unbound fulltag-imm-3 0)
    272277(defconstant unbound-marker subtag-unbound)
    273278(defconstant undefined unbound-marker)
     279(define-subtag no-thread-local-binding fulltag-imm-3 1)
    274280
    275281
     
    381387)
    382388
    383 (define-lisp-object arrayH fulltag-uvector
     389(define-lisp-object arrayH fulltag-misc
    384390  header                                ; subtag = subtag-arrayH
    385391  rank                                  ; NEVER 1
     
    520526
    521527
    522 (ppc32::define-storage-layout lisp-frame 0
     528(ppc64::define-storage-layout lisp-frame 0
    523529  backlink
    524530  savefn
     
    587593  (let* ((pos (position sym ppc::*ppc-kernel-globals* :test #'string=)))
    588594    (if pos
    589       (- (+ fulltag-uvector (* (1+ pos) 8)))
     595      (- (+ fulltag-misc (* (1+ pos) word-size-in-bytes)))
    590596      (error "Unknown kernel global : ~s ." sym))))
    591597
     
    593599  (let* ((pos (position sym ppc::*ppc-kernel-globals* :test #'string=)))
    594600    (if pos
    595       (- (+ fulltag-uvector (* (1+ pos) 4)))
     601      (- (+ fulltag-misc (* (1+ pos) word-size-in-bytes)))
    596602      (error "Unknown kernel global : ~s ." sym))))
    597603
     
    599605; The objects in question are generally fixnum-tagged; the entries in the
    600606; "kernel-imports" vector are 8 bytes apart.
    601 (ccl::defenum (:prefix "KERNEL-IMPORT-" :start 0 :step 8)
     607(ccl::defenum (:prefix "KERNEL-IMPORT-" :start 0 :step word-size-in-bytes)
    602608  fd-setsize-bytes
    603609  do-fd-set
     
    652658    (if pos (* (1+ pos) symbol.size))))
    653659
    654 (defconstant nil-value (+ #x2000 symbol.size fulltag-uvector))
     660(defconstant nil-value (+ #x2000 symbol.size fulltag-misc))
    655661
    656662
Note: See TracChangeset for help on using the changeset viewer.