da9392f6d16a65c53888b5a88b723592cc13a04d
[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 extern lispobj *dynamic_space_free_pointer;
29 extern lispobj *current_auto_gc_trigger;
30 #endif
31
32 extern void globals_init(void);
33
34 #else  LANGUAGE_ASSEMBLY
35
36 /* These are needed by ./assem.s */
37
38 #ifdef mips
39 #define EXTERN(name,bytes) .extern name bytes
40 #endif
41 #ifdef sparc
42 #ifdef SVR4
43 #define EXTERN(name,bytes) .global name
44 #else
45 #define EXTERN(name,bytes) .global _ ## name
46 #endif
47 #endif
48 #ifdef ibmrt
49 #define EXTERN(name,bytes) .globl _/**/name
50 #endif
51
52 #ifdef __i386__
53 #ifdef __linux__
54 #define EXTERN(name,bytes) .globl _/**/name
55 #else
56 #define EXTERN(name,bytes) .global _ ## name
57 #endif
58 #endif
59
60 EXTERN(foreign_function_call_active, 4)
61
62 EXTERN(current_control_stack_pointer, 4)
63 EXTERN(current_control_frame_pointer, 4)
64 #if !defined(ibmrt) && !defined(__i386__)
65 EXTERN(current_binding_stack_pointer, 4)
66 EXTERN(dynamic_space_free_pointer, 4)
67 #endif
68
69 #ifdef mips
70 EXTERN(current_flags_register, 4)
71 #endif
72
73 #endif LANGUAGE_ASSEMBLY
74
75 #endif _INCLUDED_GLOBALS_H_