Some Win64 fixes
authorIan Lynagh <igloo@earth.li>
Thu, 15 Mar 2012 16:54:34 +0000 (16:54 +0000)
committerIan Lynagh <igloo@earth.li>
Thu, 15 Mar 2012 17:04:58 +0000 (17:04 +0000)
Convert some sizes, as CLong is a different size to pointers

includes/Cmm.h
rts/HeapStackCheck.cmm

index 11c02b4..f582ca9 100644 (file)
 // allocate() - this includes many of the primops.
 #define MAYBE_GC(liveness,reentry)                     \
     if (bdescr_link(CurrentNursery) == NULL || \
-        generation_n_new_large_words(W_[g0]) >= CLong[large_alloc_lim]) {   \
+        generation_n_new_large_words(W_[g0]) >= TO_W_(CLong[large_alloc_lim])) {   \
        R9  = liveness;                                 \
         R10 = reentry;                                 \
         HpAlloc = 0;                                   \
index 7ba44d3..199f0cd 100644 (file)
@@ -676,8 +676,8 @@ INFO_TABLE_RET( stg_block_async, RET_SMALL, W_ unused )
     W_ len, errC;
 
     ares = Sp(1);
-    len = StgAsyncIOResult_len(ares);
-    errC = StgAsyncIOResult_errCode(ares);
+    len = TO_W_(StgAsyncIOResult_len(ares));
+    errC = TO_W_(StgAsyncIOResult_errCode(ares));
     foreign "C" free(ares "ptr");
 #ifdef GhcUnregisterised
     Sp(1) = errC;