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"
58 # include "../../includes/alpha-dec-osf1.h"
62 # define BYTES_PER_WORD 4
63 # define BYTES_PER_WORD_STR "4"
65 # if linuxaout_TARGET_OS
66 # include "../../includes/i386-unknown-linuxaout.h"
69 # include "../../includes/i386-unknown-linux.h"
71 # if freebsd_TARGET_OS
72 # include "../../includes/i386-unknown-freebsd.h"
75 # include "../../includes/i386-unknown-netbsd.h"
78 # include "../../includes/i386-unknown-bsdi.h"
80 # if cygwin32_TARGET_OS
81 # include "../../includes/i386-unknown-cygwin32.h"
83 # if solaris2_TARGET_OS
84 # include "../../includes/i386-unknown-solaris2.h"
89 # define BYTES_PER_WORD 4
90 # define BYTES_PER_WORD_STR "4"
93 # include "../../includes/sparc-sun-sunos4.h"
95 # if solaris2_TARGET_OS
96 # include "../../includes/sparc-sun-solaris2.h"
100 ---------------------------------------------
102 #if alpha_TARGET_ARCH
103 # define IF_ARCH_alpha(x,y) x
105 # define IF_ARCH_alpha(x,y) y
108 ---------------------------------------------
111 # define IF_ARCH_i386(x,y) x
113 # define IF_ARCH_i386(x,y) y
115 -- - - - - - - - - - - - - - - - - - - - - -
116 #if freebsd_TARGET_OS
117 # define IF_OS_freebsd(x,y) x
119 # define IF_OS_freebsd(x,y) y
121 -- - - - - - - - - - - - - - - - - - - - - -
123 # define IF_OS_netbsd(x,y) x
125 # define IF_OS_netbsd(x,y) y
127 -- - - - - - - - - - - - - - - - - - - - - -
129 # define IF_OS_linux(x,y) x
131 # define IF_OS_linux(x,y) y
133 -- - - - - - - - - - - - - - - - - - - - - -
134 #if linuxaout_TARGET_OS
135 # define IF_OS_linuxaout(x,y) x
137 # define IF_OS_linuxaout(x,y) y
139 -- - - - - - - - - - - - - - - - - - - - - -
141 # define IF_OS_bsdi(x,y) x
143 # define IF_OS_bsdi(x,y) y
145 -- - - - - - - - - - - - - - - - - - - - - -
146 #if cygwin32_TARGET_OS
147 # define IF_OS_cygwin32(x,y) x
149 # define IF_OS_cygwin32(x,y) y
151 ---------------------------------------------
152 #if sparc_TARGET_ARCH
153 # define IF_ARCH_sparc(x,y) x
155 # define IF_ARCH_sparc(x,y) y
157 -- - - - - - - - - - - - - - - - - - - - - -
159 # define IF_OS_sunos4(x,y) x
161 # define IF_OS_sunos4(x,y) y
163 -- - - - - - - - - - - - - - - - - - - - - -
164 -- NB: this will catch i386-*-solaris2, too
165 #if solaris2_TARGET_OS
166 # define IF_OS_solaris2(x,y) x
168 # define IF_OS_solaris2(x,y) y
170 ---------------------------------------------