mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-07 00:28:56 +00:00
Compute stack usage correctly in ABI_CallFunctionPC.
(The numbers need to be consistent with the actual usage, or else the stack gets corrupted.)
This commit is contained in:
parent
e4081b29f9
commit
4eab240e25
1 changed files with 2 additions and 2 deletions
|
@ -213,11 +213,11 @@ void XEmitter::ABI_CallFunctionCCCP(void *func, u32 param1, u32 param2,u32 param
|
||||||
}
|
}
|
||||||
|
|
||||||
void XEmitter::ABI_CallFunctionPC(void *func, void *param1, u32 param2) {
|
void XEmitter::ABI_CallFunctionPC(void *func, void *param1, u32 param2) {
|
||||||
ABI_AlignStack(3 * 4);
|
ABI_AlignStack(2 * 4);
|
||||||
PUSH(32, Imm32(param2));
|
PUSH(32, Imm32(param2));
|
||||||
PUSH(32, Imm32((u32)param1));
|
PUSH(32, Imm32((u32)param1));
|
||||||
CALL(func);
|
CALL(func);
|
||||||
ABI_RestoreStack(3 * 4);
|
ABI_RestoreStack(2 * 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
void XEmitter::ABI_CallFunctionPPC(void *func, void *param1, void *param2,u32 param3) {
|
void XEmitter::ABI_CallFunctionPPC(void *func, void *param1, void *param2,u32 param3) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue