Author: hpoussin
Date: Mon Sep 3 14:22:13 2007
New Revision: 28810
URL:
http://svn.reactos.org/svn/reactos?rev=28810&view=rev
Log:
Align stack to 16 bytes on mips
Modified:
trunk/reactos/lib/3rdparty/mingw/crt1.c
trunk/reactos/lib/3rdparty/mingw/wcrt1.c
Modified: trunk/reactos/lib/3rdparty/mingw/crt1.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/mingw/crt1.c?…
==============================================================================
--- trunk/reactos/lib/3rdparty/mingw/crt1.c (original)
+++ trunk/reactos/lib/3rdparty/mingw/crt1.c Mon Sep 3 14:22:13 2007
@@ -215,9 +215,16 @@
/* Adust references to dllimported data that have non-zero offsets. */
_pei386_runtime_relocator ();
+#if defined(__i386__)
/* Align the stack to 16 bytes for the sake of SSE ops in main
or in functions inlined into main. */
asm __volatile__ ("andl $-16, %%esp" : : : "%esp");
+#elif defined(__mips__)
+ /* Align the stack to 16 bytes */
+ asm __volatile__ ("andi %sp,%sp,-16" : : : "%sp");
+#else
+#error Unsupported architecture
+#endif
/*
* Call the main function. If the user does not supply one
Modified: trunk/reactos/lib/3rdparty/mingw/wcrt1.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/mingw/wcrt1.c…
==============================================================================
--- trunk/reactos/lib/3rdparty/mingw/wcrt1.c (original)
+++ trunk/reactos/lib/3rdparty/mingw/wcrt1.c Mon Sep 3 14:22:13 2007
@@ -216,10 +216,13 @@
/* Adust references to dllimported data that have non-zero offsets. */
_pei386_runtime_relocator ();
+#if defined(__i386__)
/* Align the stack to 16 bytes for the sake of SSE ops in main
or in functions inlined into main. */
-#if defined(__i386__)
asm __volatile__ ("andl $-16, %%esp" : : : "%esp");
+#elif defined(__mips__)
+ /* Align the stack to 16 bytes */
+ asm __volatile__ ("andi %sp,%sp,-16" : : : "%sp");
#else
#error Unsupported architecture
#endif