[project @ 2004-08-13 13:04:50 by simonmar]
[ghc-hetmet.git] / ghc / includes / RtsConfig.h
1 /* -----------------------------------------------------------------------------
2  *
3  * (c) The GHC Team, 1998-2004
4  *
5  * Rts settings.
6  *
7  * NOTE: assumes #include "ghcconfig.h"
8  * 
9  * NB: THIS FILE IS INCLUDED IN NON-C CODE AND DATA!  #defines only please.
10  * ---------------------------------------------------------------------------*/
11
12 #ifndef RTSCONFIG_H
13 #define RTSCONFIG_H
14
15 /*
16  * SUPPORT_LONG_LONGS controls whether we need to support long longs on a
17  * particular platform.   On 64-bit platforms, we don't need to support
18  * long longs since regular machine words will do just fine.
19  */
20 #if HAVE_LONG_LONG && SIZEOF_VOID_P < 8
21 #define SUPPORT_LONG_LONGS 1
22 #endif
23
24 /*
25  * Whether the runtime system will use libbfd for debugging purposes.
26  */
27 #if defined(DEBUG) && defined(HAVE_BFD_H) && !defined(_WIN32) && !defined(PAR) && !defined(GRAN)
28 #define USING_LIBBFD 1
29 #endif
30
31 /* Turn lazy blackholing and eager blackholing on/off.
32  *
33  * Using eager blackholing makes things easier to debug because
34  * the blackholes are more predictable - but it's slower and less sexy.
35  *
36  * For now, do lazy and not eager.
37  */
38
39 /* TICKY_TICKY needs EAGER_BLACKHOLING to verify no double-entries of
40  * single-entry thunks.
41  *
42  * SMP needs EAGER_BLACKHOLING because it has to lock thunks
43  * synchronously, in case another thread is trying to evaluate the
44  * same thunk simultaneously.
45  */
46 #if defined(SMP) || defined(TICKY_TICKY)
47 #  define EAGER_BLACKHOLING
48 #else
49 #  define LAZY_BLACKHOLING
50 #endif
51
52 /* TABLES_NEXT_TO_CODE says whether to assume that info tables are
53  * assumed to reside just before the code for a function.
54  *
55  * UNDEFINING THIS WON'T WORK ON ITS OWN.  You have been warned.
56  */
57 #if !defined(USE_MINIINTERPRETER) && !defined(ia64_TARGET_ARCH)
58 #define TABLES_NEXT_TO_CODE
59 #endif
60
61 /* -----------------------------------------------------------------------------
62    Labels - entry labels & info labels point to the same place in
63    TABLES_NEXT_TO_CODE, so we only generate the _info label.  Jumps
64    must therefore be directed to foo_info rather than foo_entry when
65    TABLES_NEXT_TO_CODE is on.
66
67    This isn't a good place for these macros, but they need to be
68    available to .cmm sources as well as C and we don't have a better
69    place.
70    -------------------------------------------------------------------------- */
71
72 #ifdef TABLES_NEXT_TO_CODE
73 #define ENTRY_LBL(f) f##_info
74 #else
75 #define ENTRY_LBL(f) f##_entry
76 #endif
77
78 #ifdef TABLES_NEXT_TO_CODE
79 #define RET_LBL(f) f##_info
80 #else
81 #define RET_LBL(f) f##_ret
82 #endif
83
84 #endif /* RTSCONFIG_H */