source: trunk/ccl/lisp-kernel/constants.h @ 557

Last change on this file since 557 was 557, checked in by gb, 16 years ago

PPC64 changes (some of them rather suspect ...). 32-bit kernel may be a
little funky ...

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.1 KB
Line 
1/*
2   Copyright (C) 1994-2001 Digitool, Inc
3   This file is part of OpenMCL. 
4
5   OpenMCL is licensed under the terms of the Lisp Lesser GNU Public
6   License , known as the LLGPL and distributed with OpenMCL as the
7   file "LICENSE".  The LLGPL consists of a preamble and the LGPL,
8   which is distributed with OpenMCL as the file "LGPL".  Where these
9   conflict, the preamble takes precedence. 
10
11   OpenMCL is referenced in the preamble as the "LIBRARY."
12
13   The LLGPL is also available online at
14   http://opensource.franz.com/preamble.html
15*/
16
17#ifndef __constants__
18#define __constants__ 1
19
20/*  Register usage: */
21#define rzero 0
22#define sp 1
23#define rcontext 2
24#define imm0 3
25#define imm1 4
26#define imm2 5
27#define imm3 6
28#define imm4 7
29#define imm5 8
30#define allocptr 9
31#define allocbase 10
32#define nargs 11
33#define tsp 12
34#define vsp 13
35#define loc_pc 14               /*  code vector locative */
36#define fn 15           
37#define temp4 16
38#define temp3 17
39#define temp2 18
40#define temp1 19
41#define temp0 20       
42#define arg_x 21
43#define arg_y 22
44#define arg_z 23
45#define save7 24
46#define save6 25
47#define save5 26
48#define save4 27
49#define save3 28
50#define save2 29
51#define save1 30
52#define save0 31
53
54#define vfp save0       /*  frame pointer if needed (stack consing). */
55#define fname temp3
56#define nfn temp2
57#define next_method_context temp1
58#define closure_data temp0
59
60/*
61  These were previously global variables.  There are lots of implicit
62  assumptions about the size of a heap segment, so they might as well
63  be constants.
64*/
65
66#define heap_segment_size 0x00010000
67#define log2_heap_segment_size 16
68
69#define BA_MASK ((unsigned) ((-1<<26) | (1<<1)))
70#define BA_VAL  ((unsigned) ((18<<26) | (1<<1)))
71
72#define TCR_FLAG_BIT_FOREIGN fixnumshift
73#define TCR_FLAG_BIT_AWAITING_PRESET (fixnumshift+1)
74#define TCR_FLAG_BIT_ALT_SUSPEND (fixnumshift+2)
75
76#define TCR_STATE_FOREIGN (1)
77#define TCR_STATE_LISP    (0)
78#define TCR_STATE_EXCEPTION_WAIT (2)
79#define TCR_STATE_EXCEPTION_RETURN (4)
80
81#ifdef PPC64
82#include "constants64.h"
83#else
84#include "constants32.h"
85#endif
86
87#define dnode_size (node_size*2)
88#define dnode_shift node_shift+1
89
90#endif
Note: See TracBrowser for help on using the repository browser.