add support for flattening recursive-let
[ghc-hetmet.git] / includes / MachDeps.h
index abe4405..f97d3e8 100644 (file)
@@ -7,6 +7,10 @@
  *
  * NB: Keep in sync with HsFFI.h and StgTypes.h.
  * NB: THIS FILE IS INCLUDED IN HASKELL SOURCE!
+ *
+ * To understand the structure of the RTS headers, see the wiki:
+ *   http://hackage.haskell.org/trac/ghc/wiki/Commentary/SourceTree/Includes
+ *
  * ---------------------------------------------------------------------------*/
 
 #ifndef MACHDEPS_H
@@ -58,9 +62,6 @@
 #define SIZEOF_HSFUNPTR         SIZEOF_VOID_P
 #define ALIGNMENT_HSFUNPTR      ALIGNMENT_VOID_P
 
-#define SIZEOF_HSFOREIGNPTR     SIZEOF_VOID_P
-#define ALIGNMENT_HSFOREIGNPTR  ALIGNMENT_VOID_P
-
 #define SIZEOF_HSSTABLEPTR      SIZEOF_VOID_P
 #define ALIGNMENT_HSSTABLEPTR   ALIGNMENT_VOID_P
 
 #endif
 #endif
 
+#ifndef TAG_BITS
+#if SIZEOF_HSWORD == 4
+#define TAG_BITS                2
+#else 
+#define TAG_BITS                3
+#endif
+#endif
+
+#define TAG_MASK ((1 << TAG_BITS) - 1)
+
 #endif /* MACHDEPS_H */