*
* 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
#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 */