Code tidy-up: Use RET_NN in stg_block_async
authorIan Lynagh <igloo@earth.li>
Tue, 20 Mar 2012 15:00:08 +0000 (15:00 +0000)
committerIan Lynagh <igloo@earth.li>
Tue, 20 Mar 2012 15:01:29 +0000 (15:01 +0000)
rts/HeapStackCheck.cmm
rts/ghc.mk

index 469cecd..90691fa 100644 (file)
@@ -679,23 +679,8 @@ 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");
-#if defined(GhcUnregisterised)
-    Sp(1) = errC;
-    Sp(0) = len;
-    jump %ENTRY_CODE(Sp(2));
-#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
+    RET_NN(len, errC);
 }
 
 stg_block_async
index e5fff56..95faea8 100644 (file)
@@ -312,7 +312,6 @@ rts/RtsUtils_CC_OPTS += -DGhcUnregisterised=\"$(GhcUnregisterised)\"
 rts/RtsUtils_CC_OPTS += -DGhcEnableTablesNextToCode=\"$(GhcEnableTablesNextToCode)\"
 
 ifeq "$(GhcUnregisterised)" "YES"
-rts/HeapStackCheck_HC_OPTS += -DGhcUnregisterised=1
 rts/PrimOps_HC_OPTS += -DGhcUnregisterised=1
 rts/Schedule_CC_OPTS += -DGhcUnregisterised=1
 endif