[project @ 2002-09-13 15:02:25 by simonpj]
[ghc-hetmet.git] / ghc / compiler / nativeGen / NCG.h
index 4b3049b..9d11c21 100644 (file)
@@ -1,5 +1,16 @@
+#define COMMA ,
+
 #ifndef NCG_H
 #define NCG_H
+#if 0
+ COMPILING_NCG is used to control the visibility of 
+ relevant information from the GHC header files when
+ compiling the native code generator modules.
+#endif
+
+#ifndef COMPILING_NCG
+#define COMPILING_NCG
+#endif
 
 #if 0
 
@@ -12,9 +23,7 @@ you will screw up the layout where they are used in case expressions!
 
 #endif
 
-#define FAST_REG_NO FAST_INT
-
-#include "../../includes/platform.h"
+#include "../includes/config.h"
 
 #if 0
 {-testing only-}
@@ -37,49 +46,23 @@ you will screw up the layout where they are used in case expressions!
 # define STOLEN_X86_REGS 4
 -- HACK: go for the max
 #endif
-#include "../../includes/MachRegs.h"
+
+#include "../includes/MachRegs.h"
+#include "../includes/NativeDefs.h"
 
 #if alpha_TARGET_ARCH
 # define BYTES_PER_WORD 8
 # define BYTES_PER_WORD_STR "8"
-
-# include "../../includes/alpha-dec-osf1.h"
 #endif
 
 #if i386_TARGET_ARCH
 # define BYTES_PER_WORD 4
 # define BYTES_PER_WORD_STR "4"
-
-# if linuxaout_TARGET_OS
-#  include "../../includes/i386-unknown-linuxaout.h"
-# endif
-# if linux_TARGET_OS
-#  include "../../includes/i386-unknown-linux.h"
-# endif
-# if freebsd_TARGET_OS
-#  include "../../includes/i386-unknown-freebsd.h"
-# endif
-# if netbsd_TARGET_OS
-#  include "../../includes/i386-unknown-netbsd.h"
-# endif
-# if bsdi_TARGET_OS
-#  include "../../includes/i386-unknown-bsdi.h"
-# endif
-# if solaris2_TARGET_OS
-#  include "../../includes/i386-unknown-solaris2.h"
-# endif
 #endif
 
 #if sparc_TARGET_ARCH
 # define BYTES_PER_WORD 4
 # define BYTES_PER_WORD_STR "4"
-
-# if sunos4_TARGET_OS
-#  include "../../includes/sparc-sun-sunos4.h"
-# endif
-# if solaris2_TARGET_OS
-#  include "../../includes/sparc-sun-solaris2.h"
-# endif
 #endif
 
 ---------------------------------------------
@@ -110,6 +93,12 @@ you will screw up the layout where they are used in case expressions!
 # define IF_OS_netbsd(x,y) y
 #endif
 -- - - - - - - - - - - - - - - - - - - - - - 
+#if openbsd_TARGET_OS
+# define IF_OS_openbsd(x,y) x
+#else
+# define IF_OS_openbsd(x,y) y
+#endif
+-- - - - - - - - - - - - - - - - - - - - - - 
 #if linux_TARGET_OS
 # define IF_OS_linux(x,y) x
 #else
@@ -127,6 +116,12 @@ you will screw up the layout where they are used in case expressions!
 #else
 # define IF_OS_bsdi(x,y) y
 #endif
+-- - - - - - - - - - - - - - - - - - - - - - 
+#if cygwin32_TARGET_OS
+# define IF_OS_cygwin32(x,y) x
+#else
+# define IF_OS_cygwin32(x,y) y
+#endif
 ---------------------------------------------
 #if sparc_TARGET_ARCH
 # define IF_ARCH_sparc(x,y) x