JIT: fix memcheck with stXx
This commit is contained in:
parent
9a19314969
commit
b3c1cec197
|
@ -435,10 +435,11 @@ void Jit64::stXx(UGeckoInstruction inst)
|
|||
|
||||
int a = inst.RA, b = inst.RB, s = inst.RS;
|
||||
FALLBACK_IF(!a || a == s || a == b);
|
||||
bool update = !!(inst.SUBOP10 & 32);
|
||||
|
||||
gpr.Lock(a, b, s);
|
||||
|
||||
if (inst.SUBOP10 & 32)
|
||||
if (update)
|
||||
{
|
||||
gpr.BindToRegister(a, true, true);
|
||||
ADD(32, gpr.R(a), gpr.R(b));
|
||||
|
@ -485,6 +486,14 @@ void Jit64::stXx(UGeckoInstruction inst)
|
|||
}
|
||||
SafeWriteRegToReg(reg_value, RSCRATCH2, accessSize, 0, CallerSavedRegistersInUse());
|
||||
|
||||
if (update && js.memcheck)
|
||||
{
|
||||
// revert the address change if an exception occurred
|
||||
MEMCHECK_START(true)
|
||||
SUB(32, gpr.R(a), gpr.R(b));
|
||||
MEMCHECK_END;
|
||||
}
|
||||
|
||||
gpr.UnlockAll();
|
||||
gpr.UnlockAllX();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue