Linux may not care, but Darwin will barf if we don't actually

align the stack on the code we generate.  Fix some existing code
to do what the comments claim it already does, and then actually
use that code. :)


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1650 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
bushing
2008-12-25 02:24:46 +00:00
parent 0ed845f3d4
commit 84711122ee
2 changed files with 3 additions and 20 deletions

View File

@ -103,6 +103,7 @@ void XEmitter::ABI_CallFunctionAC(void *func, const Gen::OpArg &arg1, u32 param2
}
void XEmitter::ABI_PushAllCalleeSavedRegsAndAdjustStack() {
ABI_AlignStack(0);
// Note: 4 * 4 = 16 bytes, so alignment is preserved.
PUSH(EBP);
PUSH(EBX);
@ -115,6 +116,7 @@ void XEmitter::ABI_PopAllCalleeSavedRegsAndAdjustStack() {
POP(ESI);
POP(EBX);
POP(EBP);
ABI_RestoreStack(0);
}
unsigned int XEmitter::ABI_GetAlignedFrameSize(unsigned int frameSize) {