summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2012-03-19 15:06:05 +0000
committerIan Lynagh <igloo@earth.li>2012-03-19 15:06:05 +0000
commita3dc885bd1e13ef4951b8e36feb5258677b963d4 (patch)
treeedc303af0822afdb3ed8242a9a2519dac91978d4 /rts
parent6260064eb5cb05778e2b66d556154e2045e89bf2 (diff)
downloadhaskell-a3dc885bd1e13ef4951b8e36feb5258677b963d4.tar.gz
Use win32AllocStack on Win64 too
Diffstat (limited to 'rts')
-rw-r--r--rts/Schedule.c2
-rw-r--r--rts/StgCRun.c24
2 files changed, 13 insertions, 13 deletions
diff --git a/rts/Schedule.c b/rts/Schedule.c
index aa22e06bd9..7dca76438b 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 70244fef68..15f9fd26a8 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
/* ----------------------------------------------------------------------------