Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/69f98b8fe3f70fa053494abaf01242038c4335c0

>---------------------------------------------------------------

commit 69f98b8fe3f70fa053494abaf01242038c4335c0
Author: Ian Lynagh <[email protected]>
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
 }
 
 stg_block_async
diff --git a/rts/ghc.mk b/rts/ghc.mk
index fc634c7..99b917c 100644
--- a/rts/ghc.mk
+++ b/rts/ghc.mk
@@ -311,6 +311,10 @@ rts/RtsUtils_CC_OPTS += 
-DTargetVendor=\"$(TargetVendor_CPP)\"
 rts/RtsUtils_CC_OPTS += -DGhcUnregisterised=\"$(GhcUnregisterised)\"
 rts/RtsUtils_CC_OPTS += 
-DGhcEnableTablesNextToCode=\"$(GhcEnableTablesNextToCode)\"
 
+ifeq "$(GhcUnregisterised)" "YES"
+rts/HeapStackCheck_HC_OPTS += -DGhcUnregisterised=1
+endif
+
 # Compile various performance-critical pieces *without* -fPIC -dynamic
 # even when building a shared library.  If we don't do this, then the
 # GC runs about 50% slower on x86 due to the overheads of PIC.  The



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to