X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=includes%2FMachDeps.h;h=f97d3e87d4aa762fc9239851727aa3f1e195fbf2;hb=fff1f6194c3c39de53cd645bda9865fb131b1c68;hp=abe4405d5ed9bf6e793bd7e168dd5da2dfd5d40b;hpb=0065d5ab628975892cea1ec7303f968c3338cbe1;p=ghc-hetmet.git diff --git a/includes/MachDeps.h b/includes/MachDeps.h index abe4405..f97d3e8 100644 --- a/includes/MachDeps.h +++ b/includes/MachDeps.h @@ -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 @@ -105,4 +106,14 @@ #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 */