cpp: Use #pragma once instead of #ifndef guards
[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://ghc.haskell.org/trac/ghc/wiki/Commentary/SourceTree/Includes
12 *
13 * ---------------------------------------------------------------------------*/
14
15 #pragma once
16
17 /*
18 * Defining NO_REGS causes no global registers to be used. NO_REGS is
19 * typically defined by GHC, via a command-line option passed to gcc,
20 * when the -funregisterised flag is given.
21 *
22 * NB. When NO_REGS is on, calling & return conventions may be
23 * different. For example, all function arguments will be passed on
24 * the stack, and components of an unboxed tuple will be returned on
25 * the stack rather than in registers.
26 */
27 #ifdef NO_REGS
28
29 #define MACHREGS_NO_REGS 1
30
31 #else
32
33 #define MACHREGS_NO_REGS 0
34
35 #define MACHREGS_i386 i386_TARGET_ARCH
36 #define MACHREGS_x86_64 x86_64_TARGET_ARCH
37 #define MACHREGS_powerpc (powerpc_TARGET_ARCH || powerpc64_TARGET_ARCH \
38 || powerpc64le_TARGET_ARCH || rs6000_TARGET_ARCH)
39 #define MACHREGS_sparc sparc_TARGET_ARCH
40 #define MACHREGS_arm arm_TARGET_ARCH
41 #define MACHREGS_aarch64 aarch64_TARGET_ARCH
42 #define MACHREGS_darwin darwin_TARGET_OS
43
44 #endif
45
46 #include "MachRegs.h"