Fix more problems caused by padding in the Capability structure
[ghc-hetmet.git] / includes / Regs.h
index cf083c9..45f9149 100644 (file)
@@ -23,6 +23,7 @@
 #define REGS_H
 
 typedef struct {
+  StgWord        stgEagerBlackholeInfo;
   StgFunPtr      stgGCEnter1;
   StgFunPtr      stgGCFun;
 } StgFunTable;
@@ -397,10 +398,11 @@ GLOBAL_REG_DECL(bdescr *,HpAlloc,REG_HpAlloc)
    -------------------------------------------------------------------------- */
 
 
-#define FunReg ((StgFunTable *)((void *)BaseReg - sizeof(StgFunTable)))
+#define FunReg ((StgFunTable *)((void *)BaseReg - FIELD_OFFSET(struct PartCapability_, r)))
 
-#define stg_gc_enter_1     (FunReg->stgGCEnter1)
-#define stg_gc_fun         (FunReg->stgGCFun)
+#define stg_EAGER_BLACKHOLE_info  (FunReg->stgEagerBlackholeInfo)
+#define stg_gc_enter_1            (FunReg->stgGCEnter1)
+#define stg_gc_fun                (FunReg->stgGCFun)
 
 /* -----------------------------------------------------------------------------
    For any registers which are denoted "caller-saves" by the C calling