Added the memcheck for stXx.

This commit is contained in:
skidau 2012-04-21 21:38:57 +10:00
parent 0fc390b552
commit 8ff3954069
1 changed files with 11 additions and 8 deletions

View File

@ -405,10 +405,13 @@ void Jit64::stXx(UGeckoInstruction inst)
gpr.Lock(a, b, s);
gpr.FlushLockX(ECX, EDX);
if (inst.SUBOP10 & 32) {
if (inst.SUBOP10 & 32)
{
MEMCHECK_START
gpr.BindToRegister(a, true, true);
ADD(32, gpr.R(a), gpr.R(b));
MOV(32, R(EDX), gpr.R(a));
MEMCHECK_END
} else {
MOV(32, R(EDX), gpr.R(a));
ADD(32, R(EDX), gpr.R(b));
@ -425,12 +428,6 @@ void Jit64::stXx(UGeckoInstruction inst)
MOV(32, R(ECX), gpr.R(s));
SafeWriteRegToReg(ECX, EDX, accessSize, 0);
//MEMCHECK_START
// TODO: Insert rA update code here
//MEMCHECK_END
gpr.UnlockAll();
gpr.UnlockAllX();
}
@ -438,6 +435,9 @@ void Jit64::stXx(UGeckoInstruction inst)
// A few games use these heavily in video codecs.
void Jit64::lmw(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(LoadStore)
#ifdef _M_X64
gpr.FlushLockX(ECX);
MOV(32, R(EAX), Imm32((u32)(s32)inst.SIMM_16));
@ -458,6 +458,9 @@ void Jit64::lmw(UGeckoInstruction inst)
void Jit64::stmw(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(LoadStore)
#ifdef _M_X64
gpr.FlushLockX(ECX);
MOV(32, R(EAX), Imm32((u32)(s32)inst.SIMM_16));