f91de8af838d5934ecabc3d560bf3f4ea3dac6c9
[sbcl.git] / src / runtime / globals.h
1 /*
2  * This software is part of the SBCL system. See the README file for
3  * more information.
4  *
5  * This software is derived from the CMU CL system, which was
6  * written at Carnegie Mellon University and released into the
7  * public domain. The software is in the public domain and is
8  * provided with absolutely no warranty. See the COPYING and CREDITS
9  * files for more information.
10  */
11
12 #if !defined(_INCLUDE_GLOBALS_H_)
13 #define _INCLUDED_GLOBALS_H_
14
15 #ifndef LANGUAGE_ASSEMBLY
16
17 #include "runtime.h"
18
19 extern int foreign_function_call_active;
20
21 extern lispobj *current_control_stack_pointer;
22 extern lispobj *current_control_frame_pointer;
23 #if !defined(ibmrt) && !defined(__i386__)
24 extern lispobj *current_binding_stack_pointer;
25 #endif
26
27 #if !defined(ibmrt) && !defined(__i386__)
28 /* FIXME: why doesn't the x86 need this? */
29 extern lispobj *dynamic_space_free_pointer;
30 extern lispobj *current_auto_gc_trigger;
31 #endif
32 extern lispobj *current_dynamic_space;
33
34
35 extern void globals_init(void);
36
37 #else  LANGUAGE_ASSEMBLY
38
39 /* These are needed by assem.S. */
40
41 #ifdef mips
42 #define EXTERN(name,bytes) .extern name bytes
43 #endif
44 #ifdef sparc
45 #ifdef SVR4
46 #define EXTERN(name,bytes) .global name
47 #else
48 #define EXTERN(name,bytes) .global _ ## name
49 #endif
50 #endif
51 #ifdef ibmrt
52 #define EXTERN(name,bytes) .globl _/**/name
53 #endif
54
55 #ifdef alpha
56 #ifdef linux
57 #define EXTERN(name,bytes) .globl name 
58 #endif
59 #endif
60
61 /* I'm very dubious about this.  Linux hasn't used _ on external names
62  * since ELF became prevalent - i.e. about 1996, on x86    -dan 20010125 */
63 #ifdef __i386__
64 #ifdef __linux__
65 #define EXTERN(name,bytes) .globl _/**/name
66 #else
67 #define EXTERN(name,bytes) .global _ ## name
68 #endif
69 #endif
70
71 EXTERN(foreign_function_call_active, 4)
72
73 EXTERN(current_control_stack_pointer, 4)
74 EXTERN(current_control_frame_pointer, 4)
75 EXTERN(current_binding_stack_pointer, 4)
76 EXTERN(dynamic_space_free_pointer, 4)
77 EXTERN(current_dynamic_space, 4)
78
79 #ifdef mips
80 EXTERN(current_flags_register, 4)
81 #endif
82
83 #endif LANGUAGE_ASSEMBLY
84
85 #endif _INCLUDED_GLOBALS_H_