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 #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"
51 #include "../includes/NativeDefs.h"
54 # define BYTES_PER_WORD 8
55 # define BYTES_PER_WORD_STR "8"
59 # define BYTES_PER_WORD 4
60 # define BYTES_PER_WORD_STR "4"
64 # define BYTES_PER_WORD 4
65 # define BYTES_PER_WORD_STR "4"
68 ---------------------------------------------
71 # define IF_ARCH_alpha(x,y) x
73 # define IF_ARCH_alpha(x,y) y
76 ---------------------------------------------
79 # define IF_ARCH_i386(x,y) x
81 # define IF_ARCH_i386(x,y) y
83 -- - - - - - - - - - - - - - - - - - - - - -
85 # define IF_OS_freebsd(x,y) x
87 # define IF_OS_freebsd(x,y) y
89 -- - - - - - - - - - - - - - - - - - - - - -
91 # define IF_OS_netbsd(x,y) x
93 # define IF_OS_netbsd(x,y) y
95 -- - - - - - - - - - - - - - - - - - - - - -
97 # define IF_OS_openbsd(x,y) x
99 # define IF_OS_openbsd(x,y) y
101 -- - - - - - - - - - - - - - - - - - - - - -
103 # define IF_OS_linux(x,y) x
105 # define IF_OS_linux(x,y) y
107 -- - - - - - - - - - - - - - - - - - - - - -
108 #if linuxaout_TARGET_OS
109 # define IF_OS_linuxaout(x,y) x
111 # define IF_OS_linuxaout(x,y) y
113 -- - - - - - - - - - - - - - - - - - - - - -
115 # define IF_OS_bsdi(x,y) x
117 # define IF_OS_bsdi(x,y) y
119 -- - - - - - - - - - - - - - - - - - - - - -
120 #if cygwin32_TARGET_OS
121 # define IF_OS_cygwin32(x,y) x
123 # define IF_OS_cygwin32(x,y) y
125 ---------------------------------------------
126 #if sparc_TARGET_ARCH
127 # define IF_ARCH_sparc(x,y) x
129 # define IF_ARCH_sparc(x,y) y
131 -- - - - - - - - - - - - - - - - - - - - - -
133 # define IF_OS_sunos4(x,y) x
135 # define IF_OS_sunos4(x,y) y
137 -- - - - - - - - - - - - - - - - - - - - - -
138 -- NB: this will catch i386-*-solaris2, too
139 #if solaris2_TARGET_OS
140 # define IF_OS_solaris2(x,y) x
142 # define IF_OS_solaris2(x,y) y
144 ---------------------------------------------