mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 01:29:42 -06:00
Fix stack misalignment issues.
- Call ABI_AlignStack even on x86-64. - Have ABI_AlignStack respect the difference in current alignment between the root JIT function, which has a prolog, and ProtectFunction thunks, which do not. This was causing many games to crash on start on OS X. Since this might otherwise mean changing the stack pointer before every call... - Have one prolog/epilog function rather than two (one of which definitely did not do what it was thought to do), and make it actually work like a normal one, so that the stack frame shows up properly in the debugger. There should be no performance impact.
This commit is contained in:
@ -652,14 +652,9 @@ public:
|
||||
void ABI_PushAllCallerSavedRegsAndAdjustStack();
|
||||
void ABI_PopAllCallerSavedRegsAndAdjustStack();
|
||||
|
||||
unsigned int ABI_GetAlignedFrameSize(unsigned int frameSize);
|
||||
void ABI_AlignStack(unsigned int frameSize);
|
||||
void ABI_RestoreStack(unsigned int frameSize);
|
||||
|
||||
// Sets up a __cdecl function.
|
||||
// Only x64 really needs the parameter count.
|
||||
void ABI_EmitPrologue(int maxCallParams);
|
||||
void ABI_EmitEpilogue(int maxCallParams);
|
||||
unsigned int ABI_GetAlignedFrameSize(unsigned int frameSize, bool noProlog = false);
|
||||
void ABI_AlignStack(unsigned int frameSize, bool noProlog = false);
|
||||
void ABI_RestoreStack(unsigned int frameSize, bool noProlog = false);
|
||||
|
||||
#ifdef _M_IX86
|
||||
inline int ABI_GetNumXMMRegs() { return 8; }
|
||||
|
Reference in New Issue
Block a user