X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=includes%2FRegs.h;h=beb71c9184fded30b85f2ead36d583cb29c5f087;hb=5d379cbe65e406d5c3a848fe7fcd090cafbfeb78;hp=cf083c957d5433a27c76b3d54ef350107f140b91;hpb=cf9650f2a1690c04051c716124bb0350adc74ae7;p=ghc-hetmet.git diff --git a/includes/Regs.h b/includes/Regs.h index cf083c9..beb71c9 100644 --- a/includes/Regs.h +++ b/includes/Regs.h @@ -23,6 +23,7 @@ #define REGS_H typedef struct { + StgWord stgEagerBlackholeInfo; StgFunPtr stgGCEnter1; StgFunPtr stgGCFun; } StgFunTable; @@ -46,11 +47,6 @@ typedef union { StgTSOPtr t; } StgUnion; -// Urgh.. we don't know the size of an MP_INT here because we haven't -// #included gmp.h. We should really autoconf this, but GMP may not -// be available at ./configure time if we're building it (GMP) locally. -#define MP_INT_WORDS 3 - /* * This is the table that holds shadow-locations for all the STG * registers. The shadow locations are used when: @@ -86,14 +82,6 @@ typedef struct StgRegTable_ { struct bdescr_ *rCurrentNursery; /* Hp/HpLim point into this block */ struct bdescr_ *rCurrentAlloc; /* for allocation using allocate() */ StgWord rHpAlloc; /* number of *bytes* being allocated in heap */ - // rmp_tmp1..rmp_result2 are only used in THREADED_RTS builds to - // avoid per-thread temps in bss, but currently always incldue here - // so we just run mkDerivedConstants once - StgWord rmp_tmp_w[MP_INT_WORDS]; - StgWord rmp_tmp1[MP_INT_WORDS]; - StgWord rmp_tmp2[MP_INT_WORDS]; - StgWord rmp_result1[MP_INT_WORDS]; - StgWord rmp_result2[MP_INT_WORDS]; StgWord rRet; // holds the return code of the thread } StgRegTable; @@ -132,7 +120,6 @@ typedef struct StgRegTable_ { #define SAVE_SpLim (CurrentTSO->splim) #define SAVE_Hp (BaseReg->rHp) -#define SAVE_HpLim (BaseReg->rHpLim) #define SAVE_CurrentTSO (BaseReg->rCurrentTSO) #define SAVE_CurrentNursery (BaseReg->rCurrentNursery) @@ -348,7 +335,7 @@ GLOBAL_REG_DECL(P_,Hp,REG_Hp) #endif #if defined(REG_HpLim) && !defined(NO_GLOBAL_REG_DECLS) -GLOBAL_REG_DECL(P_,HpLim,REG_HpLim) +#error HpLim cannot be in a register #else #define HpLim (BaseReg->rHpLim) #endif @@ -397,10 +384,11 @@ GLOBAL_REG_DECL(bdescr *,HpAlloc,REG_HpAlloc) -------------------------------------------------------------------------- */ -#define FunReg ((StgFunTable *)((void *)BaseReg - sizeof(StgFunTable))) +#define FunReg ((StgFunTable *)((void *)BaseReg - STG_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 @@ -568,14 +556,6 @@ GLOBAL_REG_DECL(bdescr *,HpAlloc,REG_HpAlloc) #define CALLER_RESTORE_Hp /* nothing */ #endif -#ifdef CALLER_SAVES_HpLim -#define CALLER_SAVE_HpLim SAVE_HpLim = HpLim; -#define CALLER_RESTORE_HpLim HpLim = SAVE_HpLim; -#else -#define CALLER_SAVE_HpLim /* nothing */ -#define CALLER_RESTORE_HpLim /* nothing */ -#endif - #ifdef CALLER_SAVES_Base #ifdef THREADED_RTS #error "Can't have caller-saved BaseReg with THREADED_RTS" @@ -642,7 +622,6 @@ GLOBAL_REG_DECL(bdescr *,HpAlloc,REG_HpAlloc) CALLER_SAVE_Sp \ CALLER_SAVE_SpLim \ CALLER_SAVE_Hp \ - CALLER_SAVE_HpLim \ CALLER_SAVE_CurrentTSO \ CALLER_SAVE_CurrentNursery \ CALLER_SAVE_Base @@ -671,7 +650,6 @@ GLOBAL_REG_DECL(bdescr *,HpAlloc,REG_HpAlloc) CALLER_RESTORE_Sp \ CALLER_RESTORE_SpLim \ CALLER_RESTORE_Hp \ - CALLER_RESTORE_HpLim \ CALLER_RESTORE_CurrentTSO \ CALLER_RESTORE_CurrentNursery