From b2319c76364b5d264b441f903155cf371f0f4ff0 Mon Sep 17 00:00:00 2001 From: cottonvibes Date: Mon, 7 Mar 2011 21:07:45 +0000 Subject: [PATCH] microVU: Fix constant recompilation problem in Street Fighter EX3 git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4403 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/x86/microVU_Analyze.inl | 15 ++++++++++++--- pcsx2/x86/microVU_Compile.inl | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/pcsx2/x86/microVU_Analyze.inl b/pcsx2/x86/microVU_Analyze.inl index c91d8a3bfe..89837f6c2f 100644 --- a/pcsx2/x86/microVU_Analyze.inl +++ b/pcsx2/x86/microVU_Analyze.inl @@ -291,7 +291,10 @@ __ri void mVUanalyzeSflag(mV, int It) { mVUsFlagHack = 0; // Don't Optimize Out Status Flags for this block mVUinfo.swapOps = 1; flagSet(mVU, 0); - if (mVUcount < 4) { mVUpBlock->pState.needExactMatch |= 1; } + if (mVUcount < 4) { + if (!(mVUpBlock->pState.needExactMatch & 1)) // The only time this should happen is on the first program block + DevCon.WriteLn(Color_Green, "microVU%d: pState's sFlag Info was expected to be set [%04x]", getIndex, xPC); + } } } @@ -312,7 +315,10 @@ __ri void mVUanalyzeMflag(mV, int Is, int It) { else { mVUinfo.swapOps = 1; flagSet(mVU, 1); - if (mVUcount < 4) { mVUpBlock->pState.needExactMatch |= 2; } + if (mVUcount < 4) { + if (!(mVUpBlock->pState.needExactMatch & 2)) // The only time this should happen is on the first program block + DevCon.WriteLn(Color_Green, "microVU%d: pState's mFlag Info was expected to be set [%04x]", getIndex, xPC); + } } } @@ -323,7 +329,10 @@ __ri void mVUanalyzeMflag(mV, int Is, int It) { __fi void mVUanalyzeCflag(mV, int It) { mVUinfo.swapOps = 1; mVUlow.readFlags = 1; - if (mVUcount < 4) { mVUpBlock->pState.needExactMatch |= 4; } + if (mVUcount < 4) { + if (!(mVUpBlock->pState.needExactMatch & 4)) // The only time this should happen is on the first program block + DevCon.WriteLn(Color_Green, "microVU%d: pState's cFlag Info was expected to be set [%04x]", getIndex, xPC); + } analyzeVIreg2(It, mVUlow.VI_write, 1); } diff --git a/pcsx2/x86/microVU_Compile.inl b/pcsx2/x86/microVU_Compile.inl index 66de449577..a3c06883d0 100644 --- a/pcsx2/x86/microVU_Compile.inl +++ b/pcsx2/x86/microVU_Compile.inl @@ -330,7 +330,7 @@ __fi bool doEarlyExit(microVU* mVU) { // Saves Pipeline State for resuming from early exits static __fi void mVUsavePipelineState(microVU* mVU) { - u32* lpS = (u32*)&mVU->prog.lpState.vi15; + u32* lpS = (u32*)&mVU->prog.lpState; for (int i = 0; i < (sizeof(microRegInfo)-4)/4; i++, lpS++) { xMOV(ptr32[lpS], lpS[0]); }