mirror of https://github.com/PCSX2/pcsx2.git
microVU: Improved existing flag hack slightly
This commit is contained in:
parent
51fbb2c313
commit
7ff36afd35
|
@ -288,16 +288,28 @@ __fi void mVUanalyzeR2(mV, int Ft, bool canBeNOP) {
|
|||
//------------------------------------------------------------------
|
||||
__ri void flagSet(mV, bool setMacFlag) {
|
||||
int curPC = iPC;
|
||||
bool calcOPS = false;
|
||||
|
||||
//Check which ops need to do the flag settings, also check for runs of ops as they can do multiple calculations to get the sticky status flags (VP2)
|
||||
for (int i = mVUcount, j = 0; i > 0; i--, j++) {
|
||||
j += mVUstall;
|
||||
incPC2(-2);
|
||||
incPC(-2);
|
||||
if (sFLAG.doFlag && (j >= 3)) {
|
||||
if (setMacFlag) { mFLAG.doFlag = 1; }
|
||||
//Calculation only ops write to VF00
|
||||
if (calcOPS == true && (mVUup.VF_write.reg != 0))
|
||||
break;
|
||||
|
||||
if (setMacFlag) { mFLAG.doFlag = 1; break; }
|
||||
else { sFLAG.doNonSticky = 1; }
|
||||
break;
|
||||
calcOPS = true;
|
||||
}
|
||||
else {
|
||||
if (calcOPS == true)
|
||||
break;
|
||||
}
|
||||
}
|
||||
iPC = curPC;
|
||||
setCode();
|
||||
}
|
||||
|
||||
__ri void mVUanalyzeSflag(mV, int It) {
|
||||
|
@ -305,7 +317,7 @@ __ri void mVUanalyzeSflag(mV, int It) {
|
|||
analyzeVIreg2(mVU, It, mVUlow.VI_write, 1);
|
||||
if (!It) { mVUlow.isNOP = 1; }
|
||||
else {
|
||||
mVUsFlagHack = 0; // Don't Optimize Out Status Flags for this block
|
||||
//mVUsFlagHack = 0; // Don't Optimize Out Status Flags for this block
|
||||
mVUinfo.swapOps = 1;
|
||||
flagSet(mVU, 0);
|
||||
if (mVUcount < 4) {
|
||||
|
|
Loading…
Reference in New Issue