Changeset 13948 for branches


Ignore:
Timestamp:
Jul 9, 2010, 11:46:08 PM (9 years ago)
Author:
gb
Message:

The point of the checkpoint in the last commit: change nil_value on ARM
from #x10000005 to #x04000001. That obviously means that we invert
arm::fulltag-cons and arm::fulltag-nil, and change a few things (the link-
inverting marker, the LISTP compiler-macro) that were more sensitive to
that than they probably should have been.

OTOH, we get ~192M more address space to play with.

Location:
branches/arm
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/arm/compiler/ARM/arm-arch.lisp

    r13926 r13948  
    528528(ccl::defenum ()
    529529  fulltag-even-fixnum                   ; I suppose EVENP/ODDP might care; nothing else does.
    530   fulltag-cons                          ; a real (non-null) cons.  Shares TAG with fulltag-nil.
     530  fulltag-nil                           ; NIL and nothing but.  (Note that there's still a hidden NILSYM.)
    531531  fulltag-nodeheader                    ; Header of heap-allocated object that contains lisp-object pointers
    532532  fulltag-imm                           ; a "real" immediate object.  Shares TAG with fulltag-immheader.
    533533  fulltag-odd-fixnum                    ;
    534   fulltag-nil                           ; NIL and nothing but.  (Note that there's still a hidden NILSYM.)
     534  fulltag-cons                          ; a real (non-null) cons.  Shares TAG with fulltag-nil.
    535535  fulltag-misc                          ; Pointer "real" tag-misc object.  Shares TAG with fulltag-nodeheader.
    536536  fulltag-immheader                     ; Header of heap-allocated object that contains unboxed data.
     
    543543
    544544
    545 (defconstant canonical-nil-value (+ #x10000000 fulltag-nil))
     545(defconstant canonical-nil-value (+ #x04000000 fulltag-nil))
    546546(defconstant nil-value canonical-nil-value)
    547547
    548548;;; T is almost adjacent to NIL: since NIL is a misaligned CONS, it spans
    549549;;; two doublewords.  The arithmetic difference between T and NIL is
    550 ;;; such that the least-significant bit and exactly one other bit is
    551 ;;; set in the result.
    552 
    553 (defconstant t-offset (+ dnode-size (- dnode-size fulltag-nil) fulltag-misc))
     550;;; not inherently interesting; it should be possible to express that
     551;;; difference as an ARM constant, but that's the only real constraint.
     552
     553(defconstant t-offset (+ (- dnode-size fulltag-nil) fulltag-misc))
    554554
    555555
     
    674674;;; too many tricks to be played with predecrement/preincrement addressing.
    675675;;; Keep them in the confusing MCL 3.0 order, to avoid confusion.
    676 (define-lisp-object cons tag-list
     676(define-lisp-object cons fulltag-cons
    677677  cdr
    678678  car)
     
    936936  (let* ((pos (position sym arm::*arm-kernel-globals* :test #'string=)))
    937937    (if pos
    938       (- (* (1+ pos) 4))
     938      (- (* (+ 3 pos) 4))
    939939      (error "Unknown kernel global : ~s ." sym))))
    940940
     
    942942  (let* ((pos (position sym arm::*arm-kernel-globals* :test #'string=)))
    943943    (if pos
    944       (- (* (1+ pos) 4))
     944      (- (* (+ 3 pos) 4))
    945945      (error "Unknown kernel global : ~s ." sym))))
    946946
  • branches/arm/compiler/optimizers.lisp

    r13780 r13948  
    18261826(define-compiler-macro listp (n)
    18271827  (let* ((arch (backend-target-arch *target-backend*))
    1828          (cons-tag (arch::target-cons-tag arch))
     1828         (list-tag (logand (arch::target-cons-tag arch)
     1829                           (1- (ash 1 (arch::target-nlisptagbits arch)))))
    18291830         (nil-tag  (arch::target-null-tag arch))
    18301831         (symbol-tag (arch::target-symbol-tag arch)))
     
    18331834        `(let* ((,nvar ,n))
    18341835          (if ,nvar (consp ,nvar) t)))
    1835       `(eql (lisptag ,n) ,cons-tag))))
     1836      `(eql (lisptag ,n) ,list-tag))))
    18361837
    18371838(define-compiler-macro consp (&whole call n)
  • branches/arm/lisp-kernel/arm-constants.h

    r13921 r13948  
    8484
    8585#define fulltag_even_fixnum 0   /*  I suppose EVENP/ODDP might care; nothing else does. */
    86 #define fulltag_cons     1      /*  a real (non_null) cons.  Shares TAG with fulltag_nil. */
     86#define fulltag_nil      1      /*  NIL and nothing but.  (Note that there's still a hidden NILSYM.) */
    8787#define fulltag_nodeheader 2    /*  Header of heap_allocated object that contains lisp_object pointers */
    8888#define fulltag_imm      3      /*  a "real" immediate object.  Shares TAG with fulltag_immheader. */
    8989#define fulltag_odd_fixnum 4    /*   */
    90 #define fulltag_nil      5      /*  NIL and nothing but.  (Note that there's still a hidden NILSYM.) */
     90#define fulltag_cons     5      /*  a real (non_null) cons.  Shares TAG with fulltag_nil. */
    9191#define fulltag_misc     6      /*  Pointer "real" tag_misc object.  Shares TAG with fulltag_nodeheader. */
    9292#define fulltag_immheader 7     /*  Header of heap-allocated object that contains unboxed data. */
     
    272272
    273273
    274 #define nil_value (0x10000000+fulltag_nil)
     274#define nil_value (0x04000000+fulltag_nil)
    275275
    276276
     
    332332#define log2_heap_segment_size 16
    333333
    334 #define STATIC_BASE_ADDRESS 0x0ffff000
     334#define STATIC_BASE_ADDRESS 0x03fff000
    335335
    336336#define PSR_N_MASK (1<<31)
  • branches/arm/lisp-kernel/arm-constants.s

    r13925 r13948  
    118118
    119119fulltag_even_fixnum = 0 /* I suppose EVENP/ODDP might care; nothing else does. */
    120 fulltag_cons = 1        /* a real (non_null) cons.  Shares TAG with fulltag_nil. */
     120fulltag_nil = 1 /* NIL and nothing but.  (Note that there's still a hidden NILSYM.) */
    121121fulltag_nodeheader = 2  /* Header of heap_allocated object that contains lisp_object pointers */
    122122fulltag_imm = 3 /* a "real" immediate object.  Shares TAG with fulltag_immheader. */
    123123fulltag_odd_fixnum = 4  /* */
    124 fulltag_nil = 5 /* NIL and nothing but.  (Note that there's still a hidden NILSYM.) */
     124fulltag_cons = 5        /* a real (non_null) cons.  Shares TAG with fulltag_nil. */
    125125fulltag_misc = 6        /* Pointer "real" tag_misc object.  Shares TAG with fulltag_nodeheader. */
    126126fulltag_immheader = 7   /* Header of heap-allocated object that contains unboxed data. */
    127127
    128 nil_value = (0x10000000+fulltag_nil)
     128nil_value = (0x04000000+fulltag_nil)
    129129misc_bias = fulltag_misc
    130 cons_bias = tag_list   
     130cons_bias = fulltag_cons   
    131131       
    132132unsigned_byte_24_mask = 0xe0000003 /* bits that should be clear in a boxed */
     
    172172/* set in the result. */
    173173
    174 t_offset = (dnode_size+(dnode_size-fulltag_nil)+fulltag_misc)
     174t_offset = ((dnode_size-fulltag_nil)+fulltag_misc)
    175175t_value = nil_value+t_offset
    176176
     
    397397       
    398398        _struct(nrs,0)
    399          _struct_pad(dnode_size+dnode_size-fulltag_nil)
     399         _struct_pad(dnode_size-fulltag_nil)
    400400
    401401         _struct_pad(fulltag_misc)
     
    689689num_lisp_globals = 49            /* MUST UPDATE THIS !!! */
    690690       
    691         _struct(lisp_globals,-(fulltag_nil+(num_lisp_globals*node_size)))
     691        _struct(lisp_globals,-(fulltag_nil+dnode_size+(num_lisp_globals*node_size)))
    692692         _node(weakvll)                 /* all populations as of last GC */
    693693         _node(initial_tcr)             /* initial thread tcr */
  • branches/arm/lisp-kernel/arm-gc.c

    r13925 r13948  
    533533  MarkCons:
    534534    next = deref(this,1);
    535     this += node_size;
     535    this = untag(this)+fulltag_nil;
    536536    tag_n = fulltag_of(next);
    537537    if (!is_node_fulltag(tag_n)) goto MarkCdr;
     
    551551  MarkCdr:
    552552    next = deref(this, 0);
    553     this -= node_size;
     553    this = untag(this)+fulltag_cons;
    554554    tag_n = fulltag_of(next);
    555555    if (!is_node_fulltag(tag_n)) goto Climb;
  • branches/arm/lisp-kernel/lisp_globals.h

    r13785 r13948  
    8383#define G2_THRESHOLD (-507)
    8484#else
     85#ifdef ARM
     86#define LISP_HEAP_THRESHOLD (-1021)
     87#define EGC_ENABLED (-1020)
     88#define G0_THRESHOLD (-1019)
     89#define G1_THRESHOLD (-1018)
     90#define G2_THRESHOLD (-1017)
     91#else
    8592#define LISP_HEAP_THRESHOLD (-1023)
    8693#define EGC_ENABLED (-1022)
     
    8895#define G1_THRESHOLD (-1020)
    8996#define G2_THRESHOLD (-1019)
     97#endif
    9098#endif
    9199
     
    111119
    112120#ifdef ARM
    113 #define lisp_global(g) (((LispObj *) (0x10000000))[(g)])
    114 #define nrs_symbol(s) (((lispsymbol *) (0x10000010))[(s)])
     121#define lisp_global(g) (((LispObj *) (nil_value-fulltag_nil-dnode_size))[(g)])
     122#define nrs_symbol(s) (((lispsymbol *) (nil_value-fulltag_nil+dnode_size))[(s)])
    115123#endif
    116124
  • branches/arm/lisp-kernel/platform-linuxarm.h

    r13789 r13948  
    2727
    2828#define MAXIMUM_MAPPABLE_MEMORY (256<<20) /* uh, no */
    29 #define IMAGE_BASE_ADDRESS 0x10001000
     29#define IMAGE_BASE_ADDRESS 0x04001000
    3030
    3131#include "lisptypes.h"
  • branches/arm/xdump/xarmfasload.lisp

    r13789 r13948  
    6969
    7070(defun arm-initialize-static-space ()
    71   (xload-make-word-ivector arm::subtag-u32-vector 1023 *xload-static-space*)
     71  (xload-make-word-ivector arm::subtag-u32-vector 1021 *xload-static-space*)
    7272  ;; Make NIL.  Note that NIL is sort of a misaligned cons (it
    7373  ;; straddles two doublewords.)
     
    8787   :subdirs '("ccl:level-0;ARM;")
    8888   :compiler-target-name :linuxarm
    89    :image-base-address (+ (ash 1 28) (ash 1 12))
     89   :image-base-address (+ (- arm::nil-value arm::fulltag-nil) (ash 1 12))
    9090   :nil-relative-symbols arm::*arm-nil-relative-symbols*
    9191   :static-space-init-function 'arm-initialize-static-space
    9292   :purespace-reserve (ash 8 20)
    93    :static-space-address (- (ash 1 28) (ash 1 12))
     93   :static-space-address (- (- arm::nil-value arm::fulltag-nil) (ash 1 12))
    9494))
    9595
Note: See TracChangeset for help on using the changeset viewer.