Skip to content

Commit

Permalink
[ARM] Fix Savestates.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sonicadvance1 committed Aug 30, 2013
1 parent 8bb16d8 commit 7cceace
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Source/Core/Core/Src/PowerPC/JitArm32/JitAsm.cpp
Expand Up @@ -44,7 +44,12 @@ JitArmAsmRoutineManager asm_routines;
void JitArmAsmRoutineManager::Generate()
{
enterCode = GetCodePtr();
PUSH(2, R11, _LR); // R11 is frame pointer in Debug.
PUSH(9, R4, R5, R6, R7, R8, R9, R10, R11, _LR);
// Take care to 8-byte align stack for function calls.
// We are misaligned here because of an odd number of args for PUSH.
// It's not like x86 where you need to account for an extra 4 bytes
// consumed by CALL.
SUB(_SP, _SP, 4);

MOVI2R(R0, (u32)&CoreTiming::downcount);
MOVI2R(R9, (u32)&PowerPC::ppcState.spr[0]);
Expand Down Expand Up @@ -129,7 +134,9 @@ void JitArmAsmRoutineManager::Generate()

SetJumpTarget(Exit);

POP(2, R11, _PC);
ADD(_SP, _SP, 4);

POP(9, R4, R5, R6, R7, R8, R9, R10, R11, _PC); // Returns
FlushIcache();
}

Expand Down

0 comments on commit 7cceace

Please sign in to comment.