Remove use of R9, and fix associated bugs
[ghc.git] / includes / stg / HaskellMachRegs.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 HASKELLMACHREGS_H
16 #define HASKELLMACHREGS_H
17
18 /*
19 * Defining NO_REGS causes no global registers to be used. NO_REGS is
20 * typically defined by GHC, via a command-line option passed to gcc,
21 * when the -funregisterised flag is given.
22 *
23 * NB. When NO_REGS is on, calling & return conventions may be
24 * different. For example, all function arguments will be passed on
25 * the stack, and components of an unboxed tuple will be returned on
26 * the stack rather than in registers.
27 */
28 #ifdef NO_REGS
29
30 #define MACHREGS_NO_REGS 1
31
32 #else
33
34 #define MACHREGS_NO_REGS 0
35
36 #define MACHREGS_i386 i386_TARGET_ARCH
37 #define MACHREGS_x86_64 x86_64_TARGET_ARCH
38 #define MACHREGS_powerpc (powerpc_TARGET_ARCH || powerpc64_TARGET_ARCH || rs6000_TARGET_ARCH)
39 #define MACHREGS_sparc sparc_TARGET_ARCH
40 #define MACHREGS_arm arm_TARGET_ARCH
41 #define MACHREGS_darwin darwin_TARGET_OS
42
43 #endif
44
45 #include "MachRegs.h"
46
47 #endif /* HASKELLMACHREGS_H */