declare stable_ptr_table (should fix via-C compilation)
[ghc.git] / includes / stg / RtsMachRegs.h
1 /* -----------------------------------------------------------------------------
2 *
3 * (c) The GHC Team, 1998-2011
4 *
5 * Registers used in STG code. Might or might not correspond to
6 * actual machine registers.
7 *
8 * Do not #include this file directly: #include "Rts.h" instead.
9 *
10 * To understand the structure of the RTS headers, see the wiki:
11 * http://hackage.haskell.org/trac/ghc/wiki/Commentary/SourceTree/Includes
12 *
13 * ---------------------------------------------------------------------------*/
14
15 #ifndef RTSMACHREGS_H
16 #define RTSMACHREGS_H
17
18 #ifdef UnregisterisedCompiler
19 #ifndef NO_REGS
20 #define NO_REGS
21 #endif
22 #endif
23
24 /*
25 * Defining NO_REGS causes no global registers to be used. NO_REGS is
26 * typically defined by GHC, via a command-line option passed to gcc,
27 * when the -funregisterised flag is given.
28 *
29 * NB. When NO_REGS is on, calling & return conventions may be
30 * different. For example, all function arguments will be passed on
31 * the stack, and components of an unboxed tuple will be returned on
32 * the stack rather than in registers.
33 */
34 #ifdef NO_REGS
35
36 #define MACHREGS_NO_REGS 1
37
38 #else
39
40 #define MACHREGS_NO_REGS 0
41
42 #define MACHREGS_i386 i386_HOST_ARCH
43 #define MACHREGS_x86_64 x86_64_HOST_ARCH
44 #define MACHREGS_powerpc (powerpc_HOST_ARCH || powerpc64_HOST_ARCH || rs6000_HOST_ARCH)
45 #define MACHREGS_sparc sparc_HOST_ARCH
46 #define MACHREGS_arm arm_HOST_ARCH
47 #define MACHREGS_darwin darwin_HOST_OS
48
49 #endif
50
51 #include "MachRegs.h"
52
53 #endif /* RTSMACHREGS_H */