X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FStgStartup.cmm;h=f8940c4196d685148a5c05394fbc06836f703bb9;hb=cd47700887365ca2a6af17d03e731efce65cf2ac;hp=33345cfcc5dd28fd21c6d70e66efe2e4b1cc2fca;hpb=9ff76535edb25ab7434284adddb5c64708ecb547;p=ghc-hetmet.git diff --git a/rts/StgStartup.cmm b/rts/StgStartup.cmm index 33345cf..f8940c4 100644 --- a/rts/StgStartup.cmm +++ b/rts/StgStartup.cmm @@ -28,24 +28,18 @@ ASSERT(Hp != 0); \ ASSERT(Sp != 0); \ ASSERT(SpLim != 0); \ - ASSERT(HpLim != 0); \ - ASSERT(SpLim - WDS(RESERVED_STACK_WORDS) <= Sp); \ - ASSERT(HpLim >= Hp); + ASSERT(SpLim - WDS(RESERVED_STACK_WORDS) <= Sp); /* ----------------------------------------------------------------------------- Returning from the STG world. -------------------------------------------------------------------------- */ +INFO_TABLE_RET( stg_stop_thread, STOP_FRAME, #if defined(PROFILING) -#define STOP_THREAD_BITMAP 3 -#define STOP_THREAD_WORDS 2 -#else -#define STOP_THREAD_BITMAP 0 -#define STOP_THREAD_WORDS 0 + W_ unused, + W_ unused #endif - -INFO_TABLE_RET( stg_stop_thread, STOP_THREAD_WORDS, STOP_THREAD_BITMAP, - STOP_FRAME) +) { /* The final exit. @@ -128,6 +122,13 @@ stg_returnToSchedButFirst jump R2; } +stg_threadFinished +{ + StgRegTable_rRet(BaseReg) = ThreadFinished; + R1 = BaseReg; + jump StgReturn; +} + /* ----------------------------------------------------------------------------- Strict IO application - performing an IO action and entering its result. @@ -139,46 +140,15 @@ stg_returnToSchedButFirst forceIO takes care of this, performing the IO action and entering the results that comes back. - ------------------------------------------------------------------------- */ - -INFO_TABLE_RET( stg_forceIO, 0/*size*/, 0/*bitmap*/, RET_SMALL) -#ifdef REG_R1 -{ - Sp_adj(1); - ENTER(); -} -#else -{ - R1 = Sp(0); - Sp_adj(2); - ENTER(); -} -#endif - -/* ----------------------------------------------------------------------------- - Non-strict IO application. - - This stack frame works like stg_forceIO_info except that it - doesn't evaluate the return value. We need the layer because the - return convention for an IO action differs depending on whether R1 - is a register or not. ------------------------------------------------------------------------- */ -INFO_TABLE_RET( stg_noforceIO, 0/*size*/, 0/*bitmap*/, RET_SMALL ) +INFO_TABLE_RET( stg_forceIO, RET_SMALL) -#ifdef REG_R1 { Sp_adj(1); - jump %ENTRY_CODE(Sp(0)); -} -#else -{ - R1 = Sp(0); - Sp_adj(2); - jump %ENTRY_CODE(Sp(0)); + ENTER(); } -#endif /* ----------------------------------------------------------------------------- Special STG entry points for module registration.