JitArm64: Fix fresx/frsqrtex unlocking W0 too early
fpr.RW may clobber GPRs that are not locked. Fixes https://bugs.dolphin-emu.org/issues/12656.
This commit is contained in:
parent
ee863e6722
commit
1c4155f800
|
@ -564,13 +564,15 @@ void JitArm64::fresx(UGeckoInstruction inst)
|
||||||
|
|
||||||
BL(GetAsmRoutines()->fres);
|
BL(GetAsmRoutines()->fres);
|
||||||
|
|
||||||
gpr.Unlock(ARM64Reg::W0, ARM64Reg::W1, ARM64Reg::W2, ARM64Reg::W3, ARM64Reg::W4, ARM64Reg::W30);
|
gpr.Unlock(ARM64Reg::W1, ARM64Reg::W2, ARM64Reg::W3, ARM64Reg::W4, ARM64Reg::W30);
|
||||||
fpr.Unlock(ARM64Reg::Q0);
|
fpr.Unlock(ARM64Reg::Q0);
|
||||||
|
|
||||||
const ARM64Reg VD = fpr.RW(d, RegType::Duplicated);
|
const ARM64Reg VD = fpr.RW(d, RegType::Duplicated);
|
||||||
m_float_emit.FMOV(EncodeRegToDouble(VD), ARM64Reg::X0);
|
m_float_emit.FMOV(EncodeRegToDouble(VD), ARM64Reg::X0);
|
||||||
|
|
||||||
SetFPRFIfNeeded(false, ARM64Reg::X0);
|
SetFPRFIfNeeded(false, ARM64Reg::X0);
|
||||||
|
|
||||||
|
gpr.Unlock(ARM64Reg::W0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void JitArm64::frsqrtex(UGeckoInstruction inst)
|
void JitArm64::frsqrtex(UGeckoInstruction inst)
|
||||||
|
@ -591,13 +593,15 @@ void JitArm64::frsqrtex(UGeckoInstruction inst)
|
||||||
|
|
||||||
BL(GetAsmRoutines()->frsqrte);
|
BL(GetAsmRoutines()->frsqrte);
|
||||||
|
|
||||||
gpr.Unlock(ARM64Reg::W0, ARM64Reg::W1, ARM64Reg::W2, ARM64Reg::W3, ARM64Reg::W4, ARM64Reg::W30);
|
gpr.Unlock(ARM64Reg::W1, ARM64Reg::W2, ARM64Reg::W3, ARM64Reg::W4, ARM64Reg::W30);
|
||||||
fpr.Unlock(ARM64Reg::Q0);
|
fpr.Unlock(ARM64Reg::Q0);
|
||||||
|
|
||||||
const ARM64Reg VD = fpr.RW(d, RegType::LowerPair);
|
const ARM64Reg VD = fpr.RW(d, RegType::LowerPair);
|
||||||
m_float_emit.FMOV(EncodeRegToDouble(VD), ARM64Reg::X0);
|
m_float_emit.FMOV(EncodeRegToDouble(VD), ARM64Reg::X0);
|
||||||
|
|
||||||
SetFPRFIfNeeded(false, ARM64Reg::X0);
|
SetFPRFIfNeeded(false, ARM64Reg::X0);
|
||||||
|
|
||||||
|
gpr.Unlock(ARM64Reg::W0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Since the following float conversion functions are used in non-arithmetic PPC float
|
// Since the following float conversion functions are used in non-arithmetic PPC float
|
||||||
|
|
Loading…
Reference in New Issue