On platforms where the OpenGL library uses the CDECL calling convention, the stack should be increased after making a call.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@334 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Maarten ter Huurne 2008-08-27 01:04:54 +00:00
parent a8982b1d18
commit 0f3e8ddced
1 changed files with 16 additions and 0 deletions

View File

@ -1337,7 +1337,11 @@ void CallCdeclFunction3(void* fnptr, u32 arg0, u32 arg1, u32 arg2)
PUSH(32, Imm32(arg1));
PUSH(32, Imm32(arg0));
CALL(fnptr);
#ifdef _WIN32
// don't inc stack
#else
ADD(32, R(ESP), Imm8(3 * 4));
#endif
#endif
}
@ -1366,7 +1370,11 @@ void CallCdeclFunction4(void* fnptr, u32 arg0, u32 arg1, u32 arg2, u32 arg3)
PUSH(32, Imm32(arg1));
PUSH(32, Imm32(arg0));
CALL(fnptr);
#ifdef _WIN32
// don't inc stack
#else
ADD(32, R(ESP), Imm8(4 * 4));
#endif
#endif
}
@ -1398,7 +1406,11 @@ void CallCdeclFunction5(void* fnptr, u32 arg0, u32 arg1, u32 arg2, u32 arg3, u32
PUSH(32, Imm32(arg1));
PUSH(32, Imm32(arg0));
CALL(fnptr);
#ifdef _WIN32
// don't inc stack
#else
ADD(32, R(ESP), Imm8(5 * 4));
#endif
#endif
}
@ -1433,7 +1445,11 @@ void CallCdeclFunction6(void* fnptr, u32 arg0, u32 arg1, u32 arg2, u32 arg3, u32
PUSH(32, Imm32(arg1));
PUSH(32, Imm32(arg0));
CALL(fnptr);
#ifdef _WIN32
// don't inc stack
#else
ADD(32, R(ESP), Imm8(6 * 4));
#endif
#endif
}