mirror of
https://github.com/reactos/reactos.git
synced 2024-09-15 15:19:37 +00:00
Align stack to 16 bytes on mips
svn path=/trunk/; revision=28810
This commit is contained in:
parent
b60824e779
commit
b3ab8c804e
7
reactos/lib/3rdparty/mingw/crt1.c
vendored
7
reactos/lib/3rdparty/mingw/crt1.c
vendored
|
@ -215,9 +215,16 @@ __mingw_CRTStartup (void)
|
||||||
/* Adust references to dllimported data that have non-zero offsets. */
|
/* Adust references to dllimported data that have non-zero offsets. */
|
||||||
_pei386_runtime_relocator ();
|
_pei386_runtime_relocator ();
|
||||||
|
|
||||||
|
#if defined(__i386__)
|
||||||
/* Align the stack to 16 bytes for the sake of SSE ops in main
|
/* Align the stack to 16 bytes for the sake of SSE ops in main
|
||||||
or in functions inlined into main. */
|
or in functions inlined into main. */
|
||||||
asm __volatile__ ("andl $-16, %%esp" : : : "%esp");
|
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
|
* Call the main function. If the user does not supply one
|
||||||
|
|
5
reactos/lib/3rdparty/mingw/wcrt1.c
vendored
5
reactos/lib/3rdparty/mingw/wcrt1.c
vendored
|
@ -216,10 +216,13 @@ __mingw_wCRTStartup (void)
|
||||||
/* Adust references to dllimported data that have non-zero offsets. */
|
/* Adust references to dllimported data that have non-zero offsets. */
|
||||||
_pei386_runtime_relocator ();
|
_pei386_runtime_relocator ();
|
||||||
|
|
||||||
|
#if defined(__i386__)
|
||||||
/* Align the stack to 16 bytes for the sake of SSE ops in main
|
/* Align the stack to 16 bytes for the sake of SSE ops in main
|
||||||
or in functions inlined into main. */
|
or in functions inlined into main. */
|
||||||
#if defined(__i386__)
|
|
||||||
asm __volatile__ ("andl $-16, %%esp" : : : "%esp");
|
asm __volatile__ ("andl $-16, %%esp" : : : "%esp");
|
||||||
|
#elif defined(__mips__)
|
||||||
|
/* Align the stack to 16 bytes */
|
||||||
|
asm __volatile__ ("andi %sp,%sp,-16" : : : "%sp");
|
||||||
#else
|
#else
|
||||||
#error Unsupported architecture
|
#error Unsupported architecture
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue