remove empty dir
[ghc-hetmet.git] / ghc / compiler / nativeGen / NCG.h
index e023463..b17f682 100644 (file)
@@ -1,88 +1,37 @@
-#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
-
-IMPORTANT!  If you put extra tabs/spaces in these macro definitions,
-you will screw up the layout where they are used in case expressions!
+/* -----------------------------------------------------------------------------
 
-(This is cpp-dependent, of course)
-
-** Convenience macros for writing the native-code generator **
-
-#endif
+   (c) The University of Glasgow, 1994-2004
 
-#define FAST_REG_NO FAST_INT
+   Native-code generator header file - just useful macros for now.
 
-#include "../includes/config.h"
+   -------------------------------------------------------------------------- */
 
-#if 0
-{-testing only-}
-#undef sparc_TARGET_ARCH
-#undef sunos4_TARGET_OS
-#undef i386_TARGET_ARCH
-#define i386_TARGET_ARCH 1
-#undef linuxaout_TARGET_OS
-#define linuxaout_TARGET_OS 1
-#endif
-#if 0
-{-testing only-}
-#undef sparc_TARGET_ARCH
-#undef sunos4_TARGET_OS
-#undef alpha_TARGET_ARCH
-#define alpha_TARGET_ARCH 1
-#endif
-
-#if i386_TARGET_ARCH
-# define STOLEN_X86_REGS 4
--- HACK: go for the max
-#endif
-
-#include "../includes/MachRegs.h"
-#include "../includes/NativeDefs.h"
-
-#if alpha_TARGET_ARCH
-# define BYTES_PER_WORD 8
-# define BYTES_PER_WORD_STR "8"
-#endif
-
-#if i386_TARGET_ARCH
-# define BYTES_PER_WORD 4
-# define BYTES_PER_WORD_STR "4"
-#endif
+#ifndef NCG_H
+#define NCG_H
 
-#if sparc_TARGET_ARCH
-# define BYTES_PER_WORD 4
-# define BYTES_PER_WORD_STR "4"
-#endif
+#include "ghc_boot_platform.h"
 
----------------------------------------------
+#define COMMA ,
 
+-- - - - - - - - - - - - - - - - - - - - - - 
 #if alpha_TARGET_ARCH
 # define IF_ARCH_alpha(x,y) x
 #else
 # define IF_ARCH_alpha(x,y) y
 #endif
-
----------------------------------------------
-
+-- - - - - - - - - - - - - - - - - - - - - - 
 #if i386_TARGET_ARCH
 # define IF_ARCH_i386(x,y) x
 #else
 # define IF_ARCH_i386(x,y) y
 #endif
 -- - - - - - - - - - - - - - - - - - - - - - 
+#if x86_64_TARGET_ARCH
+# define IF_ARCH_x86_64(x,y) x
+#else
+# define IF_ARCH_x86_64(x,y) y
+#endif
+-- - - - - - - - - - - - - - - - - - - - - - 
 #if freebsd_TARGET_OS
 # define IF_OS_freebsd(x,y) x
 #else
@@ -124,7 +73,7 @@ you will screw up the layout where they are used in case expressions!
 #else
 # define IF_OS_cygwin32(x,y) y
 #endif
----------------------------------------------
+-- - - - - - - - - - - - - - - - - - - - - - 
 #if sparc_TARGET_ARCH
 # define IF_ARCH_sparc(x,y) x
 #else
@@ -143,5 +92,17 @@ you will screw up the layout where they are used in case expressions!
 #else
 # define IF_OS_solaris2(x,y) y
 #endif
+-- - - - - - - - - - - - - - - - - - - - - - 
+#if powerpc_TARGET_ARCH
+# define IF_ARCH_powerpc(x,y) x
+#else
+# define IF_ARCH_powerpc(x,y) y
+#endif
+-- - - - - - - - - - - - - - - - - - - - - - 
+#if darwin_TARGET_OS
+# define IF_OS_darwin(x,y) x
+#else
+# define IF_OS_darwin(x,y) y
+#endif
 ---------------------------------------------
 #endif