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) {
|
__ri void flagSet(mV, bool setMacFlag) {
|
||||||
int curPC = iPC;
|
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++) {
|
for (int i = mVUcount, j = 0; i > 0; i--, j++) {
|
||||||
j += mVUstall;
|
j += mVUstall;
|
||||||
incPC2(-2);
|
incPC(-2);
|
||||||
if (sFLAG.doFlag && (j >= 3)) {
|
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; }
|
else { sFLAG.doNonSticky = 1; }
|
||||||
|
calcOPS = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (calcOPS == true)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
iPC = curPC;
|
iPC = curPC;
|
||||||
|
setCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
__ri void mVUanalyzeSflag(mV, int It) {
|
__ri void mVUanalyzeSflag(mV, int It) {
|
||||||
|
@ -305,7 +317,7 @@ __ri void mVUanalyzeSflag(mV, int It) {
|
||||||
analyzeVIreg2(mVU, It, mVUlow.VI_write, 1);
|
analyzeVIreg2(mVU, It, mVUlow.VI_write, 1);
|
||||||
if (!It) { mVUlow.isNOP = 1; }
|
if (!It) { mVUlow.isNOP = 1; }
|
||||||
else {
|
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;
|
mVUinfo.swapOps = 1;
|
||||||
flagSet(mVU, 0);
|
flagSet(mVU, 0);
|
||||||
if (mVUcount < 4) {
|
if (mVUcount < 4) {
|
||||||
|
|
Loading…
Reference in New Issue