[commit: ghc] master: Fix stg_block_async on unreg compilers (69f98b8)
Simon Marlow
marlowsd at gmail.com
Tue Mar 20 12:26:17 CET 2012
On 17/03/2012 16:05, Ian Lynagh wrote:
> Repository : ssh://darcs.haskell.org//srv/darcs/ghc
>
> On branch : master
>
> http://hackage.haskell.org/trac/ghc/changeset/69f98b8fe3f70fa053494abaf01242038c4335c0
>
>> ---------------------------------------------------------------
>
> commit 69f98b8fe3f70fa053494abaf01242038c4335c0
> Author: Ian Lynagh<igloo at earth.li>
> Date: Thu Mar 15 15:07:59 2012 +0000
>
> Fix stg_block_async on unreg compilers
>
> This is only defined on Windows, so hadn't come up in our Linux
> unreg builds.
>
>> ---------------------------------------------------------------
>
> rts/HeapStackCheck.cmm | 6 ++++++
> rts/ghc.mk | 4 ++++
> 2 files changed, 10 insertions(+), 0 deletions(-)
>
> diff --git a/rts/HeapStackCheck.cmm b/rts/HeapStackCheck.cmm
> index 74545af..7ba44d3 100644
> --- a/rts/HeapStackCheck.cmm
> +++ b/rts/HeapStackCheck.cmm
> @@ -679,10 +679,16 @@ INFO_TABLE_RET( stg_block_async, RET_SMALL, W_ unused )
> len = StgAsyncIOResult_len(ares);
> errC = StgAsyncIOResult_errCode(ares);
> foreign "C" free(ares "ptr");
> +#ifdef GhcUnregisterised
> + Sp(1) = errC;
> + Sp(0) = len;
> + jump %ENTRY_CODE(Sp(2));
> +#else
> R1 = len;
> Sp_adj(1);
> Sp(0) = errC;
> jump %ENTRY_CODE(Sp(1));
> +#endif
> }
Incidentally, a better fix is to use RET_NN(), which will avoid the
#ifdef. See PrimOps.cmm for some examples.
Cheers,
Simon
More information about the Cvs-ghc
mailing list