Align stack to 16 bytes on mips

svn path=/trunk/; revision=28810
This commit is contained in:
Hervé Poussineau 2007-09-03 10:22:13 +00:00
parent b60824e779
commit b3ab8c804e
2 changed files with 11 additions and 1 deletions

View file

@ -215,9 +215,16 @@ __mingw_CRTStartup (void)
/* 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

View file

@ -216,10 +216,13 @@ __mingw_wCRTStartup (void)
/* 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