6 COMPILING_NCG is used to control the visibility of
7 relevant information from the GHC header files when
8 compiling the native code generator modules.
17 IMPORTANT! If you put extra tabs/spaces in these macro definitions,
18 you will screw up the layout where they are used in case expressions!
20 (This is cpp-dependent, of course)
22 ** Convenience macros for writing the native-code generator **
26 #define FAST_REG_NO FAST_INT
28 #include "../../includes/config.h"
32 #undef sparc_TARGET_ARCH
33 #undef sunos4_TARGET_OS
34 #undef i386_TARGET_ARCH
35 #define i386_TARGET_ARCH 1
36 #undef linuxaout_TARGET_OS
37 #define linuxaout_TARGET_OS 1
41 #undef sparc_TARGET_ARCH
42 #undef sunos4_TARGET_OS
43 #undef alpha_TARGET_ARCH
44 #define alpha_TARGET_ARCH 1
48 # define STOLEN_X86_REGS 4
49 -- HACK: go for the max
52 #include "../../includes/MachRegs.h"
55 # define BYTES_PER_WORD 8
56 # define BYTES_PER_WORD_STR "8"
59 # include "../../includes/alpha-dec-osf1.h"
62 # include "../../includes/alpha-dec-osf3.h"
67 # define BYTES_PER_WORD 4
68 # define BYTES_PER_WORD_STR "4"
70 # if linuxaout_TARGET_OS
71 # include "../../includes/i386-unknown-linuxaout.h"
74 # include "../../includes/i386-unknown-linux.h"
76 # if freebsd_TARGET_OS
77 # include "../../includes/i386-unknown-freebsd.h"
80 # include "../../includes/i386-unknown-netbsd.h"
83 # include "../../includes/i386-unknown-bsdi.h"
85 # if cygwin32_TARGET_OS
86 # include "../../includes/i386-unknown-cygwin32.h"
88 # if solaris2_TARGET_OS
89 # include "../../includes/i386-unknown-solaris2.h"
94 # define BYTES_PER_WORD 4
95 # define BYTES_PER_WORD_STR "4"
98 # include "../../includes/sparc-sun-sunos4.h"
100 # if solaris2_TARGET_OS
101 # include "../../includes/sparc-sun-solaris2.h"
105 ---------------------------------------------
107 #if alpha_TARGET_ARCH
108 # define IF_ARCH_alpha(x,y) x
110 # define IF_ARCH_alpha(x,y) y
113 ---------------------------------------------
116 # define IF_ARCH_i386(x,y) x
118 # define IF_ARCH_i386(x,y) y
120 -- - - - - - - - - - - - - - - - - - - - - -
121 #if freebsd_TARGET_OS
122 # define IF_OS_freebsd(x,y) x
124 # define IF_OS_freebsd(x,y) y
126 -- - - - - - - - - - - - - - - - - - - - - -
128 # define IF_OS_netbsd(x,y) x
130 # define IF_OS_netbsd(x,y) y
132 -- - - - - - - - - - - - - - - - - - - - - -
134 # define IF_OS_linux(x,y) x
136 # define IF_OS_linux(x,y) y
138 -- - - - - - - - - - - - - - - - - - - - - -
139 #if linuxaout_TARGET_OS
140 # define IF_OS_linuxaout(x,y) x
142 # define IF_OS_linuxaout(x,y) y
144 -- - - - - - - - - - - - - - - - - - - - - -
146 # define IF_OS_bsdi(x,y) x
148 # define IF_OS_bsdi(x,y) y
150 -- - - - - - - - - - - - - - - - - - - - - -
151 #if cygwin32_TARGET_OS
152 # define IF_OS_cygwin32(x,y) x
154 # define IF_OS_cygwin32(x,y) y
156 ---------------------------------------------
157 #if sparc_TARGET_ARCH
158 # define IF_ARCH_sparc(x,y) x
160 # define IF_ARCH_sparc(x,y) y
162 -- - - - - - - - - - - - - - - - - - - - - -
164 # define IF_OS_sunos4(x,y) x
166 # define IF_OS_sunos4(x,y) y
168 -- - - - - - - - - - - - - - - - - - - - - -
169 -- NB: this will catch i386-*-solaris2, too
170 #if solaris2_TARGET_OS
171 # define IF_OS_solaris2(x,y) x
173 # define IF_OS_solaris2(x,y) y
175 ---------------------------------------------