/* -----------------------------------------------------------------------------
- * $Id: StgMacros.h,v 1.28 2000/07/20 17:06:41 rrt Exp $
+ * $Id: StgMacros.h,v 1.32 2000/08/02 14:13:27 rrt Exp $
*
* (c) The GHC Team, 1998-1999
*
#define EF_(f) extern F_ f(void)
#define EDF_(f) extern DLLIMPORT F_ f(void)
-/* Use this rather than EF_ or EDF_ throughout the RTS */
-#define ERTSF_(f) extern DLL_IMPORT_RTS F_ f(void)
-
+#define EXTINFO_RTS extern DLL_IMPORT_RTS INFO_TBL_CONST StgInfoTable
#define ED_ extern
-#define EDD_ extern DLLIMPORT
+#define EDD_ extern DLLIMPORT
#define ED_RO_ extern const
#define ID_ static
#define ID_RO_ static const
#define HP_CHK_GEN(headroom,liveness,reentry,tag_assts) \
if ((Hp += (headroom)) > HpLim ) { \
- ERTSF_(stg_gen_chk); \
+ EXTFUN_RTS(stg_gen_chk); \
tag_assts \
R9.w = (W_)LIVENESS_MASK(liveness); \
R10.w = (W_)reentry; \
#define STK_CHK_GEN(headroom,liveness,reentry,tag_assts) \
if ((Sp - (headroom)) < SpLim) { \
- ERTSF_(stg_gen_chk); \
+ EXTFUN_RTS(stg_gen_chk); \
tag_assts \
R9.w = (W_)LIVENESS_MASK(liveness); \
R10.w = (W_)reentry; \
#define MAYBE_GC(liveness,reentry) \
if (doYouWantToGC()) { \
- ERTSF_(stg_gen_hp); \
+ EXTFUN_RTS(stg_gen_hp); \
R9.w = (W_)LIVENESS_MASK(liveness); \
R10.w = (W_)reentry; \
JMP_(stg_gen_hp); \
out to be slowing us down we can make specialised ones.
-------------------------------------------------------------------------- */
-ERTSF_(stg_gen_yield);
-ERTSF_(stg_gen_block);
+EXTFUN_RTS(stg_gen_yield);
+EXTFUN_RTS(stg_gen_block);
#define YIELD(liveness,reentry) \
{ \
#define BLOCK_NP(ptrs) \
{ \
- ERTSF_(stg_block_##ptrs); \
+ EXTFUN_RTS(stg_block_##ptrs); \
JMP_(stg_block_##ptrs); \
}
We use a RET_DYN frame the same as for a dynamic heap check.
------------------------------------------------------------------------- */
-#if COMPILING_RTS
-EI_(stg_gen_chk_info);
-#else
-EDI_(stg_gen_chk_info);
-#endif
+EXTINFO_RTS(stg_gen_chk_info);
+
/* -----------------------------------------------------------------------------
Vectored Returns
STGCALL1(getStablePtr,reg_fe_binder)
#define REGISTER_IMPORT(reg_mod_name) \
- do { ERTSF_(reg_mod_name); \
- PUSH_INIT_STACK(reg_mod_name) ; \
- } while (0)
-
+ PUSH_INIT_STACK(reg_mod_name)
+
#define END_MOD_INIT() \
}}; \
JMP_(POP_INIT_STACK()); \