Merge pull request #9932 from JosJuice/jitarm64-dcbz-backpatch
JitArm64: Fix dcbz backpatch
This commit is contained in:
commit
5af5656383
|
@ -104,9 +104,10 @@ void JitArm64::EmitBackpatchRoutine(u32 flags, bool fastmem, bool do_farcode, AR
|
||||||
else if (flags & BackPatchInfo::FLAG_ZERO_256)
|
else if (flags & BackPatchInfo::FLAG_ZERO_256)
|
||||||
{
|
{
|
||||||
// This literally only stores 32bytes of zeros to the target address
|
// This literally only stores 32bytes of zeros to the target address
|
||||||
ADD(addr, addr, MEM_REG);
|
ARM64Reg temp = ARM64Reg::X30;
|
||||||
STP(IndexType::Signed, ARM64Reg::ZR, ARM64Reg::ZR, addr, 0);
|
ADD(temp, addr, MEM_REG);
|
||||||
STP(IndexType::Signed, ARM64Reg::ZR, ARM64Reg::ZR, addr, 16);
|
STP(IndexType::Signed, ARM64Reg::ZR, ARM64Reg::ZR, temp, 0);
|
||||||
|
STP(IndexType::Signed, ARM64Reg::ZR, ARM64Reg::ZR, temp, 16);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -597,7 +597,7 @@ void JitArm64::dcbz(UGeckoInstruction inst)
|
||||||
|
|
||||||
int a = inst.RA, b = inst.RB;
|
int a = inst.RA, b = inst.RB;
|
||||||
|
|
||||||
gpr.Lock(ARM64Reg::W0);
|
gpr.Lock(ARM64Reg::W0, ARM64Reg::W30);
|
||||||
|
|
||||||
ARM64Reg addr_reg = ARM64Reg::W0;
|
ARM64Reg addr_reg = ARM64Reg::W0;
|
||||||
|
|
||||||
|
@ -641,9 +641,6 @@ void JitArm64::dcbz(UGeckoInstruction inst)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// We don't care about being /too/ terribly efficient here
|
|
||||||
// As long as we aren't falling back to interpreter we're winning a lot
|
|
||||||
|
|
||||||
BitSet32 gprs_to_push = gpr.GetCallerSavedUsed();
|
BitSet32 gprs_to_push = gpr.GetCallerSavedUsed();
|
||||||
BitSet32 fprs_to_push = fpr.GetCallerSavedUsed();
|
BitSet32 fprs_to_push = fpr.GetCallerSavedUsed();
|
||||||
gprs_to_push[DecodeReg(ARM64Reg::W0)] = 0;
|
gprs_to_push[DecodeReg(ARM64Reg::W0)] = 0;
|
||||||
|
@ -651,7 +648,7 @@ void JitArm64::dcbz(UGeckoInstruction inst)
|
||||||
EmitBackpatchRoutine(BackPatchInfo::FLAG_ZERO_256, true, true, ARM64Reg::W0,
|
EmitBackpatchRoutine(BackPatchInfo::FLAG_ZERO_256, true, true, ARM64Reg::W0,
|
||||||
EncodeRegTo64(addr_reg), gprs_to_push, fprs_to_push);
|
EncodeRegTo64(addr_reg), gprs_to_push, fprs_to_push);
|
||||||
|
|
||||||
gpr.Unlock(ARM64Reg::W0);
|
gpr.Unlock(ARM64Reg::W0, ARM64Reg::W30);
|
||||||
}
|
}
|
||||||
|
|
||||||
void JitArm64::eieio(UGeckoInstruction inst)
|
void JitArm64::eieio(UGeckoInstruction inst)
|
||||||
|
|
Loading…
Reference in New Issue