summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2012-03-15 15:07:59 +0000
committerIan Lynagh <igloo@earth.li>2012-03-15 15:57:13 +0000
commit69f98b8fe3f70fa053494abaf01242038c4335c0 (patch)
treeb2cc6db1a2e5cf72d4477b41d4188d1facd529bb
parent97c24cddca60e80ec150483482c2a5dc1e506a76 (diff)
downloadhaskell-69f98b8fe3f70fa053494abaf01242038c4335c0.tar.gz
Fix stg_block_async on unreg compilers
This is only defined on Windows, so hadn't come up in our Linux unreg builds.
-rw-r--r--rts/HeapStackCheck.cmm6
-rw-r--r--rts/ghc.mk4
2 files changed, 10 insertions, 0 deletions
diff --git a/rts/HeapStackCheck.cmm b/rts/HeapStackCheck.cmm
index 74545af149..7ba44d3bcd 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 fc634c7ff2..99b917cd56 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