Use Sp instead of the global init_stack for the stack pointer during
module initialisation. This should cut down the code size for module
initialisation blocks.
/* -----------------------------------------------------------------------------
/* -----------------------------------------------------------------------------
- * $Id: StgMacros.h,v 1.22 2000/03/15 17:36:02 simonmar Exp $
+ * $Id: StgMacros.h,v 1.23 2000/03/16 12:40:40 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
*
* (c) The GHC Team, 1998-1999
*
Module initialisation
-------------------------------------------------------------------------- */
Module initialisation
-------------------------------------------------------------------------- */
-extern F_ *init_stack;
-
#define PUSH_INIT_STACK(reg_function) \
#define PUSH_INIT_STACK(reg_function) \
- *(init_stack++) = (F_)reg_function
+ *(Sp++) = (W_)reg_function
#define POP_INIT_STACK() \
#define POP_INIT_STACK() \
#define START_MOD_INIT(reg_mod_name) \
static int _module_registered = 0; \
#define START_MOD_INIT(reg_mod_name) \
static int _module_registered = 0; \
/* -----------------------------------------------------------------------------
/* -----------------------------------------------------------------------------
- * $Id: StgStartup.hc,v 1.7 2000/03/09 11:49:34 simonmar Exp $
+ * $Id: StgStartup.hc,v 1.8 2000/03/16 12:40:40 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
*
* (c) The GHC Team, 1998-1999
*
+extern F_ *init_stack;
+
STGFUN(stg_init_ret)
{
FB_
STGFUN(stg_init_ret)
{
FB_
EF_(__init_Main);
EF_(__init_Prelude);
FB_
EF_(__init_Main);
EF_(__init_Prelude);
FB_
PUSH_INIT_STACK(stg_init_ret);
PUSH_INIT_STACK(__init_Prelude);
JMP_(__init_Main);
PUSH_INIT_STACK(stg_init_ret);
PUSH_INIT_STACK(__init_Prelude);
JMP_(__init_Main);