mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 07:09:48 -06:00
JitArm64: Always lock Q0 in psq_stXX
Q0 is used as a scratch register by EmitBackpatchRoutine.
Fixes a vertex explosion in Spider-Man 2 that was uncovered by 20b2300
.
This commit is contained in:
@ -151,8 +151,9 @@ void JitArm64::psq_stXX(UGeckoInstruction inst)
|
|||||||
const int i = indexed ? inst.Ix : inst.I;
|
const int i = indexed ? inst.Ix : inst.I;
|
||||||
const int w = indexed ? inst.Wx : inst.W;
|
const int w = indexed ? inst.Wx : inst.W;
|
||||||
|
|
||||||
|
fpr.Lock(ARM64Reg::Q0);
|
||||||
if (!js.assumeNoPairedQuantize)
|
if (!js.assumeNoPairedQuantize)
|
||||||
fpr.Lock(ARM64Reg::Q0, ARM64Reg::Q1);
|
fpr.Lock(ARM64Reg::Q1);
|
||||||
|
|
||||||
const bool have_single = fpr.IsSingle(inst.RS);
|
const bool have_single = fpr.IsSingle(inst.RS);
|
||||||
|
|
||||||
@ -259,9 +260,10 @@ void JitArm64::psq_stXX(UGeckoInstruction inst)
|
|||||||
fpr.Unlock(VS);
|
fpr.Unlock(VS);
|
||||||
|
|
||||||
gpr.Unlock(ARM64Reg::W0, ARM64Reg::W1, ARM64Reg::W30);
|
gpr.Unlock(ARM64Reg::W0, ARM64Reg::W1, ARM64Reg::W30);
|
||||||
|
fpr.Unlock(ARM64Reg::Q0);
|
||||||
if (!js.assumeNoPairedQuantize)
|
if (!js.assumeNoPairedQuantize)
|
||||||
{
|
{
|
||||||
gpr.Unlock(ARM64Reg::W2);
|
gpr.Unlock(ARM64Reg::W2);
|
||||||
fpr.Unlock(ARM64Reg::Q0, ARM64Reg::Q1);
|
fpr.Unlock(ARM64Reg::Q1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user