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"
53 #include "../includes/NativeDefs.h"
56 # define BYTES_PER_WORD 8
57 # define BYTES_PER_WORD_STR "8"
61 # define BYTES_PER_WORD 4
62 # define BYTES_PER_WORD_STR "4"
66 # define BYTES_PER_WORD 4
67 # define BYTES_PER_WORD_STR "4"
70 ---------------------------------------------
73 # define IF_ARCH_alpha(x,y) x
75 # define IF_ARCH_alpha(x,y) y
78 ---------------------------------------------
81 # define IF_ARCH_i386(x,y) x
83 # define IF_ARCH_i386(x,y) y
85 -- - - - - - - - - - - - - - - - - - - - - -
87 # define IF_OS_freebsd(x,y) x
89 # define IF_OS_freebsd(x,y) y
91 -- - - - - - - - - - - - - - - - - - - - - -
93 # define IF_OS_netbsd(x,y) x
95 # define IF_OS_netbsd(x,y) y
97 -- - - - - - - - - - - - - - - - - - - - - -
99 # define IF_OS_openbsd(x,y) x
101 # define IF_OS_openbsd(x,y) y
103 -- - - - - - - - - - - - - - - - - - - - - -
105 # define IF_OS_linux(x,y) x
107 # define IF_OS_linux(x,y) y
109 -- - - - - - - - - - - - - - - - - - - - - -
110 #if linuxaout_TARGET_OS
111 # define IF_OS_linuxaout(x,y) x
113 # define IF_OS_linuxaout(x,y) y
115 -- - - - - - - - - - - - - - - - - - - - - -
117 # define IF_OS_bsdi(x,y) x
119 # define IF_OS_bsdi(x,y) y
121 -- - - - - - - - - - - - - - - - - - - - - -
122 #if cygwin32_TARGET_OS
123 # define IF_OS_cygwin32(x,y) x
125 # define IF_OS_cygwin32(x,y) y
127 ---------------------------------------------
128 #if sparc_TARGET_ARCH
129 # define IF_ARCH_sparc(x,y) x
131 # define IF_ARCH_sparc(x,y) y
133 -- - - - - - - - - - - - - - - - - - - - - -
135 # define IF_OS_sunos4(x,y) x
137 # define IF_OS_sunos4(x,y) y
139 -- - - - - - - - - - - - - - - - - - - - - -
140 -- NB: this will catch i386-*-solaris2, too
141 #if solaris2_TARGET_OS
142 # define IF_OS_solaris2(x,y) x
144 # define IF_OS_solaris2(x,y) y
146 ---------------------------------------------