mirror of
https://github.com/darlinghq/darling-cocotron.git
synced 2024-11-23 12:09:51 +00:00
Align stacks for non-main entry points - that's needed with gcc 3.1 on Windows so we don't crash when trying to use SSE2
This commit is contained in:
parent
97aba61b2f
commit
a22301eb95
@ -1660,7 +1660,8 @@ const int kWindowMaxDim = 10000;
|
||||
return DefWindowProcW(_handle,message,wParam,lParam);
|
||||
}
|
||||
|
||||
static LRESULT CALLBACK windowProcedure(HWND handle,UINT message,WPARAM wParam,LPARAM lParam){
|
||||
// Be sure the stack is aligned in case someone wants to do exotic things like SSE2
|
||||
static LRESULT __attribute__((force_align_arg_pointer)) CALLBACK windowProcedure(HWND handle,UINT message,WPARAM wParam,LPARAM lParam){
|
||||
NSAutoreleasePool *pool=[NSAutoreleasePool new];
|
||||
Win32Window *self=GetProp(handle,"Win32Window");
|
||||
LRESULT result;
|
||||
|
@ -71,7 +71,8 @@ static NSThread* mainThread = nil;
|
||||
}
|
||||
|
||||
#ifdef WINDOWS
|
||||
static unsigned __stdcall nsThreadStartThread(void* t)
|
||||
// Be sure the stack is aligned in case the thread wants to do exotic things like SSE2
|
||||
static __attribute__((force_align_arg_pointer)) unsigned __stdcall nsThreadStartThread(void* t)
|
||||
#else
|
||||
static void *nsThreadStartThread(void* t)
|
||||
#endif
|
||||
|
@ -316,7 +316,12 @@ typedef struct pthread_start_routine_args_win32 {
|
||||
void *arg;
|
||||
} pthread_start_routine_args;
|
||||
|
||||
#ifdef WINDOWS
|
||||
// Be sure the stack is aligned in case the thread wants to do exotic things like SSE2
|
||||
unsigned __attribute__((force_align_arg_pointer)) __stdcall startroutine_thunk_for_win32_beginthreadex(void *arg)
|
||||
#else
|
||||
unsigned __stdcall startroutine_thunk_for_win32_beginthreadex(void *arg)
|
||||
#endif
|
||||
{
|
||||
pthread_start_routine_args *threadArgs = (pthread_start_routine_args *)arg;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user