/* -----------------------------------------------------------------------------
- * $Id: Regs.h,v 1.10 2001/11/08 12:46:31 simonmar Exp $
+ * $Id: Regs.h,v 1.14 2003/11/14 14:28:08 stolz Exp $
*
* (c) The GHC Team, 1998-1999
*
} StgSparkPool;
typedef struct {
- StgFunPtr stgChk0;
- StgFunPtr stgChk1;
StgFunPtr stgGCEnter1;
- StgFunPtr stgUpdatePAP;
+ StgFunPtr stgGCFun;
} StgFunTable;
typedef struct StgRegTable_ {
StgDouble rD2;
StgWord64 rL1;
StgPtr rSp;
- StgUpdateFrame *rSu;
StgPtr rSpLim;
StgPtr rHp;
StgPtr rHpLim;
#if defined(SMP) || defined(PAR)
StgSparkPool rSparks; // per-task spark pool
#endif
-#if defined(SMP)
- struct StgRegTable_ *link; // per-task register tables are linked together
-#endif
} StgRegTable;
* structure, so that we can index both forwards and backwards to take
* advantage of shorter instruction forms on some archs (eg. x86).
*/
-typedef struct {
+typedef struct Capability_ {
StgFunTable f;
StgRegTable r;
+#if defined(SMP)
+ struct Capability_ *link; /* per-task register tables are linked together */
+#endif
} Capability;
/* No such thing as a MainRegTable under SMP - each thread must
* Registers Hp and HpLim are global across the entire system, and are
* copied into the RegTable before executing a thread.
*
- * Registers Sp, Su, and SpLim are saved in the TSO for the
+ * Registers Sp and SpLim are saved in the TSO for the
* thread, but are copied into the RegTable before executing a thread.
*
* All other registers are "general purpose", and are used for passing
*/
#define SAVE_Sp (CurrentTSO->sp)
-#define SAVE_Su (CurrentTSO->su)
#define SAVE_SpLim (CurrentTSO->splim)
#define SAVE_Hp (BaseReg->rHp)
#define Sp (BaseReg->rSp)
#endif
-#ifdef REG_Su
-GLOBAL_REG_DECL(StgUpdateFrame *,Su,REG_Su)
-#else
-#define Su (BaseReg->rSu)
-#endif
-
#ifdef REG_SpLim
GLOBAL_REG_DECL(P_,SpLim,REG_SpLim)
#else
#define FunReg ((StgFunTable *)((void *)BaseReg - sizeof(StgFunTable)))
-#define stg_chk_0 (FunReg->stgChk0)
-#define stg_chk_1 (FunReg->stgChk1)
#define stg_gc_enter_1 (FunReg->stgGCEnter1)
-#define stg_update_PAP (FunReg->stgUpdatePAP)
+#define stg_gc_fun (FunReg->stgGCFun)
/* -----------------------------------------------------------------------------
For any registers which are denoted "caller-saves" by the C calling
#define CALLER_RESTORE_Sp /* nothing */
#endif
-#ifdef CALLER_SAVES_Su
-#define CALLER_SAVE_Su SAVE_Su = Su;
-#define CALLER_RESTORE_Su Su = SAVE_Su;
-#else
-#define CALLER_SAVE_Su /* nothing */
-#define CALLER_RESTORE_Su /* nothing */
-#endif
-
#ifdef CALLER_SAVES_SpLim
#define CALLER_SAVE_SpLim SAVE_SpLim = SpLim;
#define CALLER_RESTORE_SpLim SpLim = SAVE_SpLim;
be addressed relative to it */
#define CALLER_SAVE_SYSTEM \
CALLER_SAVE_Sp \
- CALLER_SAVE_Su \
CALLER_SAVE_SpLim \
CALLER_SAVE_Hp \
CALLER_SAVE_HpLim \
#define CALLER_RESTORE_SYSTEM \
CALLER_RESTORE_Base \
CALLER_RESTORE_Sp \
- CALLER_RESTORE_Su \
CALLER_RESTORE_SpLim \
CALLER_RESTORE_Hp \
CALLER_RESTORE_HpLim \