Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/a3dc885bd1e13ef4951b8e36feb5258677b963d4

>---------------------------------------------------------------

commit a3dc885bd1e13ef4951b8e36feb5258677b963d4
Author: Ian Lynagh <[email protected]>
Date:   Mon Mar 19 15:06:05 2012 +0000

    Use win32AllocStack on Win64 too

>---------------------------------------------------------------

 rts/Schedule.c |    2 +-
 rts/StgCRun.c  |   24 ++++++++++++------------
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/rts/Schedule.c b/rts/Schedule.c
index aa22e06..7dca764 100644
--- a/rts/Schedule.c
+++ b/rts/Schedule.c
@@ -611,7 +611,7 @@ schedulePreLoop(void)
 {
   // initialisation for scheduler - what cannot go into initScheduler()  
 
-#if defined(mingw32_HOST_OS) && defined(i386_HOST_ARCH) && 
!defined(GhcUnregisterised)
+#if defined(mingw32_HOST_OS) && !defined(GhcUnregisterised)
     win32AllocStack();
 #endif
 }
diff --git a/rts/StgCRun.c b/rts/StgCRun.c
index 70244fe..15f9fd2 100644
--- a/rts/StgCRun.c
+++ b/rts/StgCRun.c
@@ -98,6 +98,18 @@ StgFunPtr StgReturn(void)
 #define STG_RETURN "StgReturn"
 #endif
 
+#if defined(mingw32_HOST_OS)
+// On windows the stack has to be allocated 4k at a time, otherwise
+// we get a segfault.  The C compiler knows how to do this (it calls
+// _alloca()), so we make sure that we can allocate as much stack as
+// we need:
+StgWord8 *win32AllocStack(void)
+{
+    StgWord8 stack[RESERVED_C_STACK_BYTES + 16 + 12];
+    return stack;
+}
+#endif
+
 /* 
-----------------------------------------------------------------------------
    x86 architecture
    -------------------------------------------------------------------------- 
*/
@@ -211,18 +223,6 @@ StgRunIsImplementedInAssembler(void)
     );
 }
 
-#if defined(mingw32_HOST_OS)
-// On windows the stack has to be allocated 4k at a time, otherwise
-// we get a segfault.  The C compiler knows how to do this (it calls
-// _alloca()), so we make sure that we can allocate as much stack as
-// we need:
-StgWord8 *win32AllocStack(void)
-{
-    StgWord8 stack[RESERVED_C_STACK_BYTES + 16 + 12];
-    return stack;
-}
-#endif
-
 #endif
 
 /* ----------------------------------------------------------------------------



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to