X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FStgStartup.hc;h=bed23129b0c0231940ff53df1a9d4084dc32ef68;hb=50027272414438955dbc41696541cbd25da55883;hp=147baa0e187ccfb29abb84454ddafcd6f3eaf201;hpb=0938c182dc6801d1cef414e8d61dc084557fc6f1;p=ghc-hetmet.git diff --git a/ghc/rts/StgStartup.hc b/ghc/rts/StgStartup.hc index 147baa0..bed2312 100644 --- a/ghc/rts/StgStartup.hc +++ b/ghc/rts/StgStartup.hc @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: StgStartup.hc,v 1.12 2000/04/26 09:44:38 simonmar Exp $ + * $Id: StgStartup.hc,v 1.15 2001/03/23 16:36:21 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -7,6 +7,7 @@ * * ---------------------------------------------------------------------------*/ +#include "Stg.h" #include "Rts.h" #include "StgRun.h" /* StgReturn */ #include "StgStartup.h" @@ -76,9 +77,10 @@ STGFUN(stg_stop_thread_entry) * tidy up the registers and return to the scheduler. */ - /* Move Su just off the end of the stack, we're about to spam the - * STOP_FRAME with the return value. + /* Move Sp to the last word on the stack, and Su to just past the end + * of the stack. We then place the return value at the top of the stack. */ + Sp += sizeofW(StgStopFrame) - 1; Su = (StgUpdateFrame *)(Sp+1); Sp[0] = R1.w; @@ -137,8 +139,6 @@ STGFUN(stg_enterStackTop) we currently disable module initialisation for Hugs. -------------------------------------------------------------------------- */ -#ifndef INTERPRETER - extern F_ *init_stack; STGFUN(stg_init_ret) @@ -164,5 +164,3 @@ STGFUN(stg_init) START_MOD_INIT(__init_PrelGHC); END_MOD_INIT(); - -#endif /* !INTERPRETER */