[project @ 2002-12-05 23:49:43 by mthomas]
[ghc-hetmet.git] / ghc / includes / StgTypes.h
index 6ceb80c..e864d81 100644 (file)
@@ -1,10 +1,10 @@
 /* -----------------------------------------------------------------------------
- * $Id: StgTypes.h,v 1.15 2000/11/07 17:05:47 simonmar Exp $
+ * $Id: StgTypes.h,v 1.18 2001/10/03 13:57:42 simonmar Exp $
  *
  * (c) The GHC Team, 1998-2000
  *
  * Various C datatypes used in the run-time system.  This is the
- * lowest-level include file (after config.h).
+ * lowest-level include file, after config.h and Derived.h.
  *
  * This module should define types *only*, all beginning with "Stg".
  *
@@ -25,7 +25,7 @@
        StgCode, StgArray, StgByteArray, StgStablePtr, StgFunPtr,
        StgUnion.
 
- * WARNING: Keep this file and HsFFI.h in synch!
+ * WARNING: Keep this file, MachDeps.h, and HsFFI.h in synch!
  *
  * NOTE: assumes #include "config.h"
  * 
@@ -36,6 +36,8 @@
 #ifndef STGTYPES_H
 #define STGTYPES_H
 
+#include "Derived.h"
+
 /*
  * First, platform-dependent definitions of size-specific integers.
  * Assume for now that the int type is 32 bits.
@@ -57,15 +59,6 @@ typedef unsigned int             StgWord32;
 #error GHC untested on this architecture: sizeof(unsigned int) != 4
 #endif
 
-/* This #define controls whether we need to support long longs on a particular
- * platform. 
- *
- * ToDo: find a proper home for (derived) configuration information like this.
- */
-#if HAVE_LONG_LONG && SIZEOF_VOID_P < 8
-#define SUPPORT_LONG_LONGS
-#endif
-
 #ifdef SUPPORT_LONG_LONGS
 /* assume long long is 64 bits */
 typedef signed long long int   StgInt64;
@@ -97,6 +90,8 @@ typedef StgWord32          StgWord;
 #endif
 #endif
 
+#define W_MASK  (sizeof(W_)-1)
+
 typedef void*              StgAddr;
 
 /*