source: branches/arm/lisp-kernel/lisp_globals.h @ 13923

Last change on this file since 13923 was 13785, checked in by gb, 9 years ago

Get t_offset, nrs stuff in the right place.
Definitions for .SPdebind.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 7.0 KB
Line 
1/*
2   Copyright (C) 2009 Clozure Associates
3   Copyright (C) 1994-2001 Digitool, Inc
4   This file is part of Clozure CL. 
5
6   Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
7   License , known as the LLGPL and distributed with Clozure CL as the
8   file "LICENSE".  The LLGPL consists of a preamble and the LGPL,
9   which is distributed with Clozure CL as the file "LGPL".  Where these
10   conflict, the preamble takes precedence. 
11
12   Clozure CL is referenced in the preamble as the "LIBRARY."
13
14   The LLGPL is also available online at
15   http://opensource.franz.com/preamble.html
16*/
17
18#ifndef __lisp_globals__
19#define __lisp_globals__
20
21
22extern LispObj lisp_nil;
23
24#define GET_TCR (-1)            /* address of get_tcr() for callbacks */
25#define TCR_COUNT (-2)          /* next tcr's tcr_id */
26#define INTERRUPT_SIGNAL  (-3)  /* signal to use for PROCESS-INTERRUPT */
27#define KERNEL_IMPORTS (-4)     /* some things we need to have imported for us. */
28#define OBJC_2_PERSONALITY (-5) /* A good listener.  Doesn't say much */
29#define SAVETOC (-6)            /* Saved TOC register, for some platforms */
30#define SAVER13 (-7)            /* Saved (global) r13, on some platforms */
31#define SUBPRIMS_BASE (-8)      /* where the dynamic subprims wound up */
32#define RET1VALN (-9)           /* magic multiple-values return address */
33#define TCR_KEY (-10)           /* tsd key for per-thread tcr */
34#define TCR_AREA_LOCK (-11)       /* all_areas/tcr queue lock */
35#define EXCEPTION_LOCK (-12)    /* serialize exception handling */
36#define STATIC_CONSES (-13)
37#define DEFAULT_ALLOCATION_QUANTUM (-14)
38#define INTFLAG (-15)
39#define GC_INHIBIT_COUNT (-16)
40#define REFBITS (-17)
41#define OLDSPACE_DNODE_COUNT (-18) /* count of dynamic dnodes older than generation 0 */
42#define ALTIVEC_PRESENT (-19)   /* non-zero if AltiVec present. */
43#define FWDNUM (-20)            /* fixnum: GC "forwarder" call count. */
44#define GC_NUM (-21)            /* fixnum: GC call count. */
45#define GCABLE_POINTERS (-22)   /* linked-list of weak macptrs. */
46#define HEAP_START (-23)        /* start of lisp heap */
47#define HEAP_END (-24)          /* end of lisp heap */
48#define STATICALLY_LINKED (-25)        /* non-zero if -static */
49#define STACK_SIZE (-26)        /* from the command line */
50#define OBJC_2_BEGIN_CATCH (-27)  /* address of ObjC 2.0 objc_begin_catch() */
51#define KERNEL_PATH (-28)       /* real executable name */
52#define ALL_AREAS (-29)         /* doubly-linked list of stack & heap areas */
53#define LEXPR_RETURN (-30)      /* magic &lexpr cleanup code */
54#define LEXPR_RETURN1V (-31)    /* single-value &lexpr cleanup code */
55#define IN_GC (-32)             /* non-zero when lisp addresses may be invalid */
56#define FREE_STATIC_CONSES (-33)     /* length of freelist */
57#define OBJC_2_END_CACTCH (-34)          /* address of ObjC 2.0 objc_end_catch() */
58#define SHORT_FLOAT_ZERO (-35)  /* low half of 1.0d0 */
59#define DOUBLE_FLOAT_ONE (-36)  /* high half of 1.0d0 */
60#define STATIC_CONS_AREA (-37)  /* static_cons_area */
61#define LISP_EXIT_HOOK (-38)    /* install foreign exception handling */
62#define OLDEST_EPHEMERAL (-39)  /* doubleword address of oldest ephemeral object or 0 */
63#define TENURED_AREA (-40)      /* the tenured area */
64#define REF_BASE (-41)          /* start of oldest pointer-bearing area */
65#define ARGV (-42)              /* pointer to &argv[0] */
66#define HOST_PLATFORM (-43)     /* for platform-specific initialization */
67#define BATCH_FLAG (-44)        /* -b arg */
68#define UNWIND_RESUME (-45)     /* address of _Unwind_Resume from libobjc */
69#define WEAK_GC_METHOD (-46)    /* weak GC algorithm */
70#define IMAGE_NAME (-47)        /* --image-name arg */
71#define INITIAL_TCR (-48)       /* initial thread tcr */
72#define WEAKVLL (-49)           /* all populations as of last GC */
73
74#define MIN_KERNEL_GLOBAL WEAKVLL
75
76/* These are only non-zero when an image is being saved or loaded */
77
78#if (WORD_SIZE==64)
79#define LISP_HEAP_THRESHOLD (-511)
80#define EGC_ENABLED (-510)
81#define G0_THRESHOLD (-509)
82#define G1_THRESHOLD (-508)
83#define G2_THRESHOLD (-507)
84#else
85#define LISP_HEAP_THRESHOLD (-1023)
86#define EGC_ENABLED (-1022)
87#define G0_THRESHOLD (-1021)
88#define G1_THRESHOLD (-1020)
89#define G2_THRESHOLD (-1019)
90#endif
91
92#ifdef PPC
93#ifdef PPC64
94#define lisp_global(g) (((LispObj *) (0x3000+(LOWMEM_BIAS)))[(g)])
95#define nrs_symbol(s) (((lispsymbol *) (0x3000+(LOWMEM_BIAS)))[(s)])
96#else
97#define lisp_global(g) (((LispObj *) (nil_value-fulltag_nil))[(g)])
98#define nrs_symbol(s) (((lispsymbol *) (nil_value+(8-fulltag_nil)+8))[(s)])
99#endif
100#endif
101
102#ifdef X8664
103#define lisp_global(g) (((LispObj *) (0x13000+(LOWMEM_BIAS)))[(g)])
104#define nrs_symbol(s) (((lispsymbol *) (0x13020+(LOWMEM_BIAS)))[(s)])
105#endif
106
107#ifdef X8632
108#define lisp_global(g) (((LispObj *) (0x13000+(LOWMEM_BIAS)))[(g)])
109#define nrs_symbol(s) (((lispsymbol *) (0x13008+(LOWMEM_BIAS)))[(s)])
110#endif
111
112#ifdef ARM
113#define lisp_global(g) (((LispObj *) (0x10000000))[(g)])
114#define nrs_symbol(s) (((lispsymbol *) (0x10000010))[(s)])
115#endif
116
117#define nrs_T                           (nrs_symbol(0))         /* t */
118#define nrs_NILSYM                      (nrs_symbol(1))         /* nil */
119#define nrs_ERRDISP                     (nrs_symbol(2))         /* %err-disp */
120#define nrs_CMAIN                       (nrs_symbol(3))         /* cmain */
121#define nrs_EVAL                        (nrs_symbol(4))         /* eval */
122#define nrs_APPEVALFN                   (nrs_symbol(5))         /* apply-evaluated-function */
123#define nrs_ERROR                       (nrs_symbol(6))         /* error */
124#define nrs_DEFUN                       (nrs_symbol(7))         /* %defun */
125#define nrs_DEFVAR                      (nrs_symbol(8))         /* %defvar */
126#define nrs_DEFCONSTANT                 (nrs_symbol(9))         /* %defconstant */
127#define nrs_MACRO                       (nrs_symbol(10))        /* %macro */
128#define nrs_KERNELRESTART               (nrs_symbol(11))        /* %kernel-restart */
129#define nrs_PACKAGE                     (nrs_symbol(12))        /* *package* */
130#define nrs_TOTAL_BYTES_FREED           (nrs_symbol(13))        /* *total-bytes-freed* */
131#define nrs_KALLOWOTHERKEYS             (nrs_symbol(14))        /* :allow-other-keys */
132#define nrs_TOPLCATCH                   (nrs_symbol(15))        /* %toplevel-catch% */
133#define nrs_TOPLFUNC                    (nrs_symbol(16))        /* %toplevel-function% */
134#define nrs_CALLBACKS                   (nrs_symbol(17))        /* %pascal-functions% */
135#define nrs_ALLMETEREDFUNS              (nrs_symbol(18))        /* *all-metered-functions* */
136#define nrs_TOTAL_GC_MICROSECONDS       (nrs_symbol(19))        /* *total-gc-microseconds* */
137#define nrs_BUILTIN_FUNCTIONS           (nrs_symbol(20))        /* %builtin-functions% */
138#define nrs_UDF                         (nrs_symbol(21))        /* %unbound-function% */
139#define nrs_INIT_MISC                   (nrs_symbol(22))        /* %init-misc% */
140#define nrs_MACRO_CODE                  (nrs_symbol(23))        /* %macro-code% */
141#define nrs_CLOSURE_CODE                (nrs_symbol(24))        /* %closure-code% */
142#define nrs_NEW_GCABLE_PTR              (nrs_symbol(25))        /* %new-gcable-ptr */
143#define nrs_GC_EVENT_STATUS_BITS        (nrs_symbol(26))        /* *gc-event-status-bits* */
144#define nrs_POST_GC_HOOK                (nrs_symbol(27))        /* *post-gc-hook* */
145#define nrs_HANDLERS                    (nrs_symbol(28))        /* %handlers% */
146#define nrs_ALL_PACKAGES                (nrs_symbol(29))        /* %all-packages% */
147#define nrs_KEYWORD_PACKAGE             (nrs_symbol(30))        /* *keyword-package* */
148#define nrs_FINALIZATION_ALIST          (nrs_symbol(31))        /* %finalization-alist% */
149#define nrs_FOREIGN_THREAD_CONTROL      (nrs_symbol(32))        /* %foreign-thread-control */
150#define num_nilreg_symbols 33
151#define nilreg_symbols_end ((BytePtr) &(nrs_symbol(num_nilreg_symbols)))
152#endif
Note: See TracBrowser for help on using the repository browser.