4 COMPILING_NCG is used to control the visibility of
5 relevant information from the GHC header files when
6 compiling the native code generator modules.
15 IMPORTANT! If you put extra tabs/spaces in these macro definitions,
16 you will screw up the layout where they are used in case expressions!
18 (This is cpp-dependent, of course)
20 ** Convenience macros for writing the native-code generator **
24 #define FAST_REG_NO FAST_INT
26 #include "../../includes/config.h"
30 #undef sparc_TARGET_ARCH
31 #undef sunos4_TARGET_OS
32 #undef i386_TARGET_ARCH
33 #define i386_TARGET_ARCH 1
34 #undef linuxaout_TARGET_OS
35 #define linuxaout_TARGET_OS 1
39 #undef sparc_TARGET_ARCH
40 #undef sunos4_TARGET_OS
41 #undef alpha_TARGET_ARCH
42 #define alpha_TARGET_ARCH 1
46 # define STOLEN_X86_REGS 4
47 -- HACK: go for the max
50 #include "../../includes/MachRegs.h"
53 # define BYTES_PER_WORD 8
54 # define BYTES_PER_WORD_STR "8"
56 # include "../../includes/alpha-dec-osf1.h"
60 # define BYTES_PER_WORD 4
61 # define BYTES_PER_WORD_STR "4"
63 # if linuxaout_TARGET_OS
64 # include "../../includes/i386-unknown-linuxaout.h"
67 # include "../../includes/i386-unknown-linux.h"
69 # if freebsd_TARGET_OS
70 # include "../../includes/i386-unknown-freebsd.h"
73 # include "../../includes/i386-unknown-netbsd.h"
76 # include "../../includes/i386-unknown-bsdi.h"
78 # if cygwin32_TARGET_OS
79 # include "../../includes/i386-unknown-cygwin32.h"
81 # if solaris2_TARGET_OS
82 # include "../../includes/i386-unknown-solaris2.h"
87 # define BYTES_PER_WORD 4
88 # define BYTES_PER_WORD_STR "4"
91 # include "../../includes/sparc-sun-sunos4.h"
93 # if solaris2_TARGET_OS
94 # include "../../includes/sparc-sun-solaris2.h"
98 ---------------------------------------------
100 #if alpha_TARGET_ARCH
101 # define IF_ARCH_alpha(x,y) x
103 # define IF_ARCH_alpha(x,y) y
106 ---------------------------------------------
109 # define IF_ARCH_i386(x,y) x
111 # define IF_ARCH_i386(x,y) y
113 -- - - - - - - - - - - - - - - - - - - - - -
114 #if freebsd_TARGET_OS
115 # define IF_OS_freebsd(x,y) x
117 # define IF_OS_freebsd(x,y) y
119 -- - - - - - - - - - - - - - - - - - - - - -
121 # define IF_OS_netbsd(x,y) x
123 # define IF_OS_netbsd(x,y) y
125 -- - - - - - - - - - - - - - - - - - - - - -
127 # define IF_OS_linux(x,y) x
129 # define IF_OS_linux(x,y) y
131 -- - - - - - - - - - - - - - - - - - - - - -
132 #if linuxaout_TARGET_OS
133 # define IF_OS_linuxaout(x,y) x
135 # define IF_OS_linuxaout(x,y) y
137 -- - - - - - - - - - - - - - - - - - - - - -
139 # define IF_OS_bsdi(x,y) x
141 # define IF_OS_bsdi(x,y) y
143 -- - - - - - - - - - - - - - - - - - - - - -
144 #if cygwin32_TARGET_OS
145 # define IF_OS_cygwin32(x,y) x
147 # define IF_OS_cygwin32(x,y) y
149 ---------------------------------------------
150 #if sparc_TARGET_ARCH
151 # define IF_ARCH_sparc(x,y) x
153 # define IF_ARCH_sparc(x,y) y
155 -- - - - - - - - - - - - - - - - - - - - - -
157 # define IF_OS_sunos4(x,y) x
159 # define IF_OS_sunos4(x,y) y
161 -- - - - - - - - - - - - - - - - - - - - - -
162 -- NB: this will catch i386-*-solaris2, too
163 #if solaris2_TARGET_OS
164 # define IF_OS_solaris2(x,y) x
166 # define IF_OS_solaris2(x,y) y
168 ---------------------------------------------