mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-09 09:39:13 +00:00
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:
parent
2dafbfb3ef
commit
c5c0b36046
4 changed files with 10 additions and 67 deletions
|
@ -584,7 +584,8 @@ void VertexLoader::CompileVertexTranslator()
|
|||
PanicAlert("Trying to recompile a vertex translator");
|
||||
|
||||
m_compiledCode = GetCodePtr();
|
||||
ABI_PushRegistersAndAdjustStack(ABI_ALL_CALLEE_SAVED, 8);
|
||||
// We don't use any callee saved registers or anything but RAX.
|
||||
ABI_PushRegistersAndAdjustStack(0, 8);
|
||||
|
||||
// Start loop here
|
||||
const u8 *loop_start = GetCodePtr();
|
||||
|
@ -845,7 +846,7 @@ void VertexLoader::CompileVertexTranslator()
|
|||
SUB(32, MatR(RAX), Imm8(1));
|
||||
|
||||
J_CC(CC_NZ, loop_start);
|
||||
ABI_PopRegistersAndAdjustStack(ABI_ALL_CALLEE_SAVED, 8);
|
||||
ABI_PopRegistersAndAdjustStack(0, 8);
|
||||
RET();
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue