From: simonmar Date: Wed, 30 Nov 2005 16:56:51 +0000 (+0000) Subject: [project @ 2005-11-30 16:56:51 by simonmar] X-Git-Tag: final_switch_to_darcs,_this_repo_is_now_live~107 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=8e86d601677c2fd4c9231d9b666b89ec49d155c4;p=ghc-hetmet.git [project @ 2005-11-30 16:56:51 by simonmar] fix bug in the case of an uncaught exception --- diff --git a/ghc/rts/Exception.cmm b/ghc/rts/Exception.cmm index 3fdfdfd..dc6305c 100644 --- a/ghc/rts/Exception.cmm +++ b/ghc/rts/Exception.cmm @@ -384,7 +384,11 @@ retry_pop_stack: Sp(0) = R1; /* save the exception */ StgTSO_what_next(CurrentTSO) = ThreadKilled::I16; SAVE_THREAD_STATE(); /* inline! */ - R1 = ThreadFinished; + + /* The return code goes in BaseReg->rRet, and BaseReg is returned in R1 */ + StgRegTable_rRet(BaseReg) = ThreadFinished; + R1 = BaseReg; + jump StgReturn; }