fix ASM for MinGW

This commit is contained in:
anyc 2014-05-29 01:19:09 +02:00
parent 149d058535
commit 2a27ea0689
2 changed files with 7 additions and 6 deletions

View File

@ -671,16 +671,17 @@ static void RCT2_CALLPROC_WE_MOUSE_DOWN(int address, int widgetIndex, rct_windo
#else
__asm__("\
push %[address]\n\
mov edx, widgetIndex \n\
mov edi, widget
mov edi, %[widget] \n\
mov eax, %[w] \n\
push edx \n\
push eax \n\
mov edx, %[widgetIndex] \n\
push edi \n\
push eax \n\
push edx \n\
mov esi, %[w] \n\
call [esp+12] \n\
add esp, 16 \n\
" :[address] "+m" (address), [w] "+m" (w) : : "eax", "esi");
" :[address] "+m" (address), [w] "+m" (w), [widget] "+m" (widget), [widgetIndex] "+m" (widgetIndex): : "eax", "esi", "edx", "edi"
);
#endif
}

View File

@ -189,7 +189,7 @@ static void window_banner_mousedown(int widgetIndex, rct_window*w, rct_widget* w
#ifdef _MSC_VER
//__asm mov widgetIndex, dx
#else
__asm__ ( "mov %[widgetIndex], dx " : [widgetIndex] "+m" (widgetIndex) );
// __asm__ ( "mov %[widgetIndex], dx " : [widgetIndex] "+m" (widgetIndex) );
#endif