mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
DSP jit: fixed some crash by pop/push (close to bhaal's solution)
If it breaks 64bit you know what to uncomment :-) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5400 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -93,7 +93,8 @@ void DSPEmitter::checkExceptions() {
|
|||||||
|
|
||||||
ABI_CallFunction((void *)&DSPCore_CheckExceptions);
|
ABI_CallFunction((void *)&DSPCore_CheckExceptions);
|
||||||
|
|
||||||
ABI_RestoreStack(0);
|
// ABI_RestoreStack(0);
|
||||||
|
ABI_PopAllCalleeSavedRegsAndAdjustStack();
|
||||||
RET();
|
RET();
|
||||||
|
|
||||||
SetJumpTarget(skipCheck);
|
SetJumpTarget(skipCheck);
|
||||||
@ -149,7 +150,8 @@ void DSPEmitter::Default(UDSPInstruction _inst)
|
|||||||
const u8 *DSPEmitter::Compile(int start_addr) {
|
const u8 *DSPEmitter::Compile(int start_addr) {
|
||||||
AlignCode16();
|
AlignCode16();
|
||||||
const u8 *entryPoint = GetCodePtr();
|
const u8 *entryPoint = GetCodePtr();
|
||||||
ABI_AlignStack(0);
|
ABI_PushAllCalleeSavedRegsAndAdjustStack();
|
||||||
|
// ABI_AlignStack(0);
|
||||||
|
|
||||||
int addr = start_addr;
|
int addr = start_addr;
|
||||||
checkExceptions();
|
checkExceptions();
|
||||||
@ -178,7 +180,8 @@ const u8 *DSPEmitter::Compile(int start_addr) {
|
|||||||
// These functions branch and therefore only need to be called in the
|
// These functions branch and therefore only need to be called in the
|
||||||
// end of each block and in this order
|
// end of each block and in this order
|
||||||
ABI_CallFunction((void *)&DSPInterpreter::HandleLoop);
|
ABI_CallFunction((void *)&DSPInterpreter::HandleLoop);
|
||||||
ABI_RestoreStack(0);
|
// ABI_RestoreStack(0);
|
||||||
|
ABI_PopAllCalleeSavedRegsAndAdjustStack();
|
||||||
RET();
|
RET();
|
||||||
|
|
||||||
SetJumpTarget(rLoopAddressExit);
|
SetJumpTarget(rLoopAddressExit);
|
||||||
@ -200,7 +203,8 @@ const u8 *DSPEmitter::Compile(int start_addr) {
|
|||||||
addr += opcode->size;
|
addr += opcode->size;
|
||||||
}
|
}
|
||||||
|
|
||||||
ABI_RestoreStack(0);
|
// ABI_RestoreStack(0);
|
||||||
|
ABI_PopAllCalleeSavedRegsAndAdjustStack();
|
||||||
RET();
|
RET();
|
||||||
|
|
||||||
blocks[start_addr] = (CompiledCode)entryPoint;
|
blocks[start_addr] = (CompiledCode)entryPoint;
|
||||||
|
Reference in New Issue
Block a user