From 64d66745a2ca353600b47dd30fcad01533d276db Mon Sep 17 00:00:00 2001
From: sof <unknown>
Date: Fri, 9 Jan 1998 13:33:03 +0000
Subject: [PATCH] [project @ 1998-01-09 13:33:03 by sof] startPerformIO: push
 realWorld# token on the B stack now.

---
 ghc/runtime/c-as-asm/PerformIO.lhc | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/ghc/runtime/c-as-asm/PerformIO.lhc b/ghc/runtime/c-as-asm/PerformIO.lhc
index 04fd72dc557b..198603559fdd 100644
--- a/ghc/runtime/c-as-asm/PerformIO.lhc
+++ b/ghc/runtime/c-as-asm/PerformIO.lhc
@@ -107,24 +107,24 @@ STGFUN(startPerformIO)
     
     /* first off, check for stk space.. */
 #if defined(CONCURRENT) || !defined(STACK_CHECK_BY_PAGE_FAULT) 
-    STK_CHK(LivenessReg,1/*A*/,1/*B*/, 0, 0, 0/*prim*/, 0/*re-enter*/);
+    STK_CHK(LivenessReg,0/*A*/,2/*B*/, 0, 0, 0/*prim*/, 0/*re-enter*/);
 #else
-    STK_CHK(LivenessReg,1/*A*/,0, 0, 0, 0/*prim*/, 0/*re-enter*/);
+    STK_CHK(LivenessReg,0/*A*/,1, 0, 0, 0/*prim*/, 0/*re-enter*/);
 #endif
 
     /* Put a suitable return address on the B stack */
     RetReg = (StgRetAddr) UNVEC(stopPerformIODirectReturn,vtbl_stopPerformIO);
 
-    /* Put a World State Token on the A stack */
-    /* This is necessary because we've not unboxed it (to reveal a void) yet */
-    SpA -= AREL(1);
-    *SpA = (P_) realWorldZh_closure;
-
     /* Save away C stack pointer so that we can restore it when we leave
        the Haskell world.
     */
-    SpB[1] = (W_)SAVE_esp;
-    SpB    = SpB + 1;
+    SpB -= BREL(1);
+    *SpB = (W_)SAVE_esp;
+
+    /* Put a World State Token on the B stack */
+    /* This is necessary because we've not unboxed it (to reveal a void) yet */
+    SpB -= BREL(1);
+    *SpB = (W_) realWorldZh_closure;
 
     Node = unstable_Closure; /* Point to the closure for main/errorIO-arg */
     ENT_VIA_NODE();
-- 
GitLab