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 __ppc_constants__ |
---|
19 | #define __ppc_constants__ 1 |
---|
20 | |
---|
21 | /* Register usage: */ |
---|
22 | #define rzero 0 |
---|
23 | #define sp 1 |
---|
24 | #define linux_sys_reg 2 /* volatile reg on Darwin ; thread ptr on Linux32, TOC on |
---|
25 | Linux64. */ |
---|
26 | #define imm0 3 |
---|
27 | #define imm1 4 |
---|
28 | #define imm2 5 |
---|
29 | #define imm3 6 |
---|
30 | #define imm4 7 |
---|
31 | #define imm5 8 |
---|
32 | #define allocptr 9 |
---|
33 | #define allocbase 10 |
---|
34 | #define nargs 11 |
---|
35 | #define tsp 12 |
---|
36 | #define loc_pc 14 /* code vector locative */ |
---|
37 | #define vsp 15 |
---|
38 | #define fn 16 |
---|
39 | #define temp3 17 |
---|
40 | #define temp2 18 |
---|
41 | #define temp1 19 |
---|
42 | #define temp0 20 |
---|
43 | #define arg_x 21 |
---|
44 | #define arg_y 22 |
---|
45 | #define arg_z 23 |
---|
46 | #define save7 24 |
---|
47 | #define save6 25 |
---|
48 | #define save5 26 |
---|
49 | #define save4 27 |
---|
50 | #define save3 28 |
---|
51 | #define save2 29 |
---|
52 | #define save1 30 |
---|
53 | #define save0 31 |
---|
54 | |
---|
55 | #define vfp save0 /* frame pointer if needed (stack consing). */ |
---|
56 | #define fname temp3 |
---|
57 | #define nfn temp2 |
---|
58 | #define next_method_context temp1 |
---|
59 | #define closure_data temp0 |
---|
60 | |
---|
61 | |
---|
62 | #define BA_MASK ((unsigned) ((-1<<26) | (1<<1))) |
---|
63 | #define BA_VAL ((unsigned) ((18<<26) | (1<<1))) |
---|
64 | |
---|
65 | #define TCR_FLAG_BIT_FOREIGN fixnumshift |
---|
66 | #define TCR_FLAG_BIT_AWAITING_PRESET (fixnumshift+1) |
---|
67 | #define TCR_FLAG_BIT_ALT_SUSPEND (fixnumshift+2) |
---|
68 | #define TCR_FLAG_BIT_PROPAGATE_EXCEPTION (fixnumshift+3) |
---|
69 | #define TCR_FLAG_BIT_SUSPEND_ACK_PENDING (fixnumshift+4) |
---|
70 | #define TCR_FLAG_BIT_PENDING_EXCEPTION (fixnumshift+5) |
---|
71 | #define TCR_FLAG_BIT_FOREIGN_EXCEPTION (fixnumshift+6) |
---|
72 | #define TCR_FLAG_BIT_PENDING_SUSPEND (fixnumshift+7) |
---|
73 | |
---|
74 | #define TCR_STATE_FOREIGN (1) |
---|
75 | #define TCR_STATE_LISP (0) |
---|
76 | #define TCR_STATE_EXCEPTION_WAIT (2) |
---|
77 | #define TCR_STATE_EXCEPTION_RETURN (4) |
---|
78 | |
---|
79 | #ifdef PPC64 |
---|
80 | #include "ppc-constants64.h" |
---|
81 | #else |
---|
82 | #include "ppc-constants32.h" |
---|
83 | #endif |
---|
84 | |
---|
85 | #define dnode_size (node_size*2) |
---|
86 | #define dnode_shift (node_shift+1) |
---|
87 | |
---|
88 | #define INTERRUPT_LEVEL_BINDING_INDEX (1) |
---|
89 | |
---|
90 | #endif /* __ppc_constants__ */ |
---|
91 | |
---|
92 | |
---|