summaryrefslogtreecommitdiff
path: root/rts/HeapStackCheck.cmm
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2012-03-20 01:32:03 +0000
committerIan Lynagh <igloo@earth.li>2012-03-20 01:32:03 +0000
commite24091b0d1b898ccdcb986ebbcc9635352b51d43 (patch)
tree0743c558bbadb11273e46ec61bb440e05fbf0daf /rts/HeapStackCheck.cmm
parent15e29424ca1da1ae469807793149dc2e928d9283 (diff)
downloadhaskell-e24091b0d1b898ccdcb986ebbcc9635352b51d43.tar.gz
Fix stg_block_async on registerised Win64
Diffstat (limited to 'rts/HeapStackCheck.cmm')
-rw-r--r--rts/HeapStackCheck.cmm11
1 files changed, 9 insertions, 2 deletions
diff --git a/rts/HeapStackCheck.cmm b/rts/HeapStackCheck.cmm
index 199f0cd378..469cecdb3a 100644
--- a/rts/HeapStackCheck.cmm
+++ b/rts/HeapStackCheck.cmm
@@ -679,15 +679,22 @@ INFO_TABLE_RET( stg_block_async, RET_SMALL, W_ unused )
len = TO_W_(StgAsyncIOResult_len(ares));
errC = TO_W_(StgAsyncIOResult_errCode(ares));
foreign "C" free(ares "ptr");
-#ifdef GhcUnregisterised
+#if defined(GhcUnregisterised)
Sp(1) = errC;
Sp(0) = len;
jump %ENTRY_CODE(Sp(2));
-#else
+#elif defined(i386_HOST_ARCH)
R1 = len;
Sp_adj(1);
Sp(0) = errC;
jump %ENTRY_CODE(Sp(1));
+#elif defined(x86_64_HOST_ARCH)
+ R1 = len;
+ R2 = errC;
+ Sp_adj(2);
+ jump %ENTRY_CODE(Sp(0));
+#else
+#error Unexpected arch
#endif
}