mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 12:19:12 +00:00
Add a helper to make zero-argument calls from an aligned stack
correctly. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1663 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
b92c831857
commit
be4c7e1399
2 changed files with 13 additions and 0 deletions
|
@ -61,6 +61,12 @@ void XEmitter::ABI_EmitEpilogue(int maxCallParams)
|
|||
// Shared code between Win32 and Unix32
|
||||
// ====================================
|
||||
|
||||
void XEmitter::ABI_CallFunction(void *func) {
|
||||
ABI_AlignStack(0);
|
||||
CALL(func);
|
||||
ABI_RestoreStack(0);
|
||||
}
|
||||
|
||||
void XEmitter::ABI_CallFunctionC(void *func, u32 param1) {
|
||||
ABI_AlignStack(1 * 4);
|
||||
PUSH(32, Imm32(param1));
|
||||
|
@ -156,6 +162,10 @@ void XEmitter::ABI_RestoreStack(unsigned int frameSize) {
|
|||
|
||||
#else
|
||||
|
||||
void XEmitter::ABI_CallFunction(void *func) {
|
||||
CALL(func);
|
||||
}
|
||||
|
||||
void XEmitter::ABI_CallFunctionC(void *func, u32 param1) {
|
||||
MOV(32, R(ABI_PARAM1), Imm32(param1));
|
||||
CALL(func);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue