diff options
| author | nakeee <nakeee@gmail.com> | 2010-04-23 08:15:00 +0000 |
|---|---|---|
| committer | nakeee <nakeee@gmail.com> | 2010-04-23 08:15:00 +0000 |
| commit | de081d09008cd9128165d3cd45a72409d2a27cdd (patch) | |
| tree | 6e22b521228e19eeaa0251eec28df9fde2c132c1 /Source/Core/DSPCore | |
| parent | 05e3808beb0b14cc29436104cc2af18b636d8b96 (diff) | |
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
Diffstat (limited to 'Source/Core/DSPCore')
| -rw-r--r-- | Source/Core/DSPCore/Src/DSPEmitter.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/Core/DSPCore/Src/DSPEmitter.cpp b/Source/Core/DSPCore/Src/DSPEmitter.cpp index 78cb7bf6a1..8311d0b931 100644 --- a/Source/Core/DSPCore/Src/DSPEmitter.cpp +++ b/Source/Core/DSPCore/Src/DSPEmitter.cpp @@ -93,7 +93,8 @@ void DSPEmitter::checkExceptions() { ABI_CallFunction((void *)&DSPCore_CheckExceptions); - ABI_RestoreStack(0); + // ABI_RestoreStack(0); + ABI_PopAllCalleeSavedRegsAndAdjustStack(); RET(); SetJumpTarget(skipCheck); @@ -149,7 +150,8 @@ void DSPEmitter::Default(UDSPInstruction _inst) const u8 *DSPEmitter::Compile(int start_addr) { AlignCode16(); const u8 *entryPoint = GetCodePtr(); - ABI_AlignStack(0); + ABI_PushAllCalleeSavedRegsAndAdjustStack(); + // ABI_AlignStack(0); int addr = start_addr; checkExceptions(); @@ -178,7 +180,8 @@ const u8 *DSPEmitter::Compile(int start_addr) { // These functions branch and therefore only need to be called in the // end of each block and in this order ABI_CallFunction((void *)&DSPInterpreter::HandleLoop); - ABI_RestoreStack(0); + // ABI_RestoreStack(0); + ABI_PopAllCalleeSavedRegsAndAdjustStack(); RET(); SetJumpTarget(rLoopAddressExit); @@ -200,7 +203,8 @@ const u8 *DSPEmitter::Compile(int start_addr) { addr += opcode->size; } - ABI_RestoreStack(0); + // ABI_RestoreStack(0); + ABI_PopAllCalleeSavedRegsAndAdjustStack(); RET(); blocks[start_addr] = (CompiledCode)entryPoint; |
