Remove the inaccurately named ABI_PushAllCalleeSavedRegsAndAdjustStack (it didn't preserve FPRs!) and replace with ABI_PushRegistersAndAdjustStack.
To avoid FPRs being pushed unnecessarily, I checked the uses: DSPEmitter doesn't use FPRs, and VertexLoader doesn't use anything but RAX, so I specified the register list accordingly. The regular JIT, however, does use FPRs, and as far as I can tell, it was incorrect not to save them in the outer routine. Since the dispatcher loop is only exited when pausing or stopping, this should have no noticeable performance impact.
This commit is contained in:
1 parent
2dafbfb3ef
commit
c5c0b36046
4 files changed
+10
-67
No files matched your search
@@ -16,7 +16,7 @@ using namespace Gen;
|
||||
void Jit64AsmRoutineManager::Generate()
|
||||
{
|
||||
enterCode = AlignCode16();
|
||||
ABI_PushAllCalleeSavedRegsAndAdjustStack();
|
||||
ABI_PushRegistersAndAdjustStack(ABI_ALL_CALLEE_SAVED, 8);
|
||||
|
||||
// Two statically allocated registers.
|
||||
MOV(64, R(RMEM), Imm64((u64)Memory::base));
|
||||
@@ -39,7 +39,7 @@ void Jit64AsmRoutineManager::Generate()
|
||||
ABI_CallFunction(reinterpret_cast<void *>(&PowerPC::CheckBreakPoints));
|
||||
TEST(32, M((void*)PowerPC::GetStatePtr()), Imm32(0xFFFFFFFF));
|
||||
FixupBranch noBreakpoint = J_CC(CC_Z);
|
||||
ABI_PopAllCalleeSavedRegsAndAdjustStack();
|
||||
ABI_PopRegistersAndAdjustStack(ABI_ALL_CALLEE_SAVED, 8);
|
||||
RET();
|
||||
SetJumpTarget(noBreakpoint);
|
||||
SetJumpTarget(notStepping);
|
||||
@@ -126,7 +126,7 @@ void Jit64AsmRoutineManager::Generate()
|
||||
J_CC(CC_Z, outerLoop);
|
||||
|
||||
//Landing pad for drec space
|
||||
ABI_PopAllCalleeSavedRegsAndAdjustStack();
|
||||
ABI_PopRegistersAndAdjustStack(ABI_ALL_CALLEE_SAVED, 8);
|
||||
RET();
|
||||
|
||||
GenerateCommon();
|
||||
|
||||
Reference in new issue
Block a user