JitArm64: Fix for stack push/pop ABI.
This commit is contained in:
parent
6aa54a029e
commit
8829af62cb
|
@ -753,6 +753,7 @@ void JitArm64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer* code_buf, JitBlock*
|
|||
|
||||
gpr.Lock(W30);
|
||||
BitSet32 regs_in_use = gpr.GetCallerSavedUsed();
|
||||
BitSet32 fprs_in_use = fpr.GetCallerSavedUsed();
|
||||
regs_in_use[W30] = 0;
|
||||
|
||||
FixupBranch Exception = B();
|
||||
|
@ -761,8 +762,10 @@ void JitArm64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer* code_buf, JitBlock*
|
|||
FixupBranch exit = B();
|
||||
SetJumpTarget(Exception);
|
||||
ABI_PushRegisters(regs_in_use);
|
||||
m_float_emit.ABI_PushRegisters(fprs_in_use, X30);
|
||||
MOVP2R(X30, &GPFifo::FastCheckGatherPipe);
|
||||
BLR(X30);
|
||||
m_float_emit.ABI_PopRegisters(fprs_in_use, X30);
|
||||
ABI_PopRegisters(regs_in_use);
|
||||
|
||||
// Inline exception check
|
||||
|
|
|
@ -19,12 +19,15 @@ using namespace Arm64Gen;
|
|||
void JitArm64::GenerateAsm()
|
||||
{
|
||||
// This value is all of the callee saved registers that we are required to save.
|
||||
// According to the AACPS64 we need to save R19 ~ R30.
|
||||
// According to the AACPS64 we need to save R19 ~ R30 and Q8 ~ Q15.
|
||||
const u32 ALL_CALLEE_SAVED = 0x7FF80000;
|
||||
const u32 ALL_CALLEE_SAVED_FPR = 0x0000FF00;
|
||||
BitSet32 regs_to_save(ALL_CALLEE_SAVED);
|
||||
BitSet32 regs_to_save_fpr(ALL_CALLEE_SAVED_FPR);
|
||||
enterCode = GetCodePtr();
|
||||
|
||||
ABI_PushRegisters(regs_to_save);
|
||||
m_float_emit.ABI_PushRegisters(regs_to_save_fpr, X30);
|
||||
|
||||
MOVP2R(PPC_REG, &PowerPC::ppcState);
|
||||
|
||||
|
@ -175,6 +178,7 @@ void JitArm64::GenerateAsm()
|
|||
LDR(INDEX_UNSIGNED, X0, X1, 0);
|
||||
ADD(SP, X0, 0);
|
||||
|
||||
m_float_emit.ABI_PopRegisters(regs_to_save_fpr, X30);
|
||||
ABI_PopRegisters(regs_to_save);
|
||||
RET(X30);
|
||||
|
||||
|
|
Loading…
Reference in New Issue