mirror of https://github.com/PCSX2/pcsx2.git
microVU: bug fixes on some flag handling stuff.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@970 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
44446b47e7
commit
2711d14f0c
|
@ -46,7 +46,7 @@ private:
|
||||||
microBlock callersList[mMaxBlocks]; // Foreign Blocks that call Local Blocks
|
microBlock callersList[mMaxBlocks]; // Foreign Blocks that call Local Blocks
|
||||||
|
|
||||||
public:
|
public:
|
||||||
microBlockManager() { init(); }
|
microBlockManager() { init(); }
|
||||||
~microBlockManager() { close(); }
|
~microBlockManager() { close(); }
|
||||||
void init() {
|
void init() {
|
||||||
listSize = -1;
|
listSize = -1;
|
||||||
|
|
|
@ -265,19 +265,16 @@ microVUt(void) mVUanalyzeFSSET() {
|
||||||
microVUt(void) mVUanalyzeMflag(int Is, int It) {
|
microVUt(void) mVUanalyzeMflag(int Is, int It) {
|
||||||
microVU* mVU = mVUx;
|
microVU* mVU = mVUx;
|
||||||
if (!It) { mVUinfo |= _isNOP; }
|
if (!It) { mVUinfo |= _isNOP; }
|
||||||
else if (mVUcount >= 4) {
|
else { // Need set _doMac for 4 previous Ops (need to do all 4 because stalls could change the result needed)
|
||||||
incPC2(-8);
|
mVUinfo |= _swapOps;
|
||||||
if (doStatus) { mVUinfo |= _doMac; }
|
if (mVUcount > 1) {
|
||||||
else {
|
|
||||||
int curPC = iPC;
|
int curPC = iPC;
|
||||||
int i = mVUcount;
|
for (int i = mVUcount, j = 0; i > 1; i--, j++) {
|
||||||
for (; i > 0; i--) {
|
incPC(-2);
|
||||||
incPC2(-2);
|
if (doStatus) { mVUinfo |= _doMac; if (j >= 3) { break; } }
|
||||||
if (doStatus) { mVUinfo |= _doMac; break; }
|
|
||||||
}
|
}
|
||||||
iPC = curPC;
|
iPC = curPC;
|
||||||
}
|
}
|
||||||
incPC2(8);
|
|
||||||
}
|
}
|
||||||
analyzeVIreg1(Is);
|
analyzeVIreg1(Is);
|
||||||
analyzeVIreg2(It, 1);
|
analyzeVIreg2(It, 1);
|
||||||
|
|
|
@ -82,8 +82,8 @@ microVUt(void) mVUsetFlags(int* bStatus, int* bMac) {
|
||||||
// Ensure last ~4+ instructions update mac flags
|
// Ensure last ~4+ instructions update mac flags
|
||||||
int endPC = iPC;
|
int endPC = iPC;
|
||||||
int aCount = 1; // Amount of instructions needed to get 4 valid status/mac flag instances
|
int aCount = 1; // Amount of instructions needed to get 4 valid status/mac flag instances
|
||||||
for (int i = mVUcount; i > 0; i--, aCount++) {
|
for (int i = mVUcount, int iX = 0; i > 0; i--, aCount++) {
|
||||||
if (doStatus) { mVUinfo |= _doMac; if (i >= 4) { break; } }
|
if (doStatus) { mVUinfo |= _doMac; iX++; if ((iX >= 4) || (aCount > 4)) { break; } }
|
||||||
incPC2(-2);
|
incPC2(-2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,8 +99,6 @@ microVUt(void) mVUsetFlags(int* bStatus, int* bMac) {
|
||||||
iPC = mVUstartPC;
|
iPC = mVUstartPC;
|
||||||
for (mVUcount = 0; mVUcount < xCount; mVUcount++) {
|
for (mVUcount = 0; mVUcount < xCount; mVUcount++) {
|
||||||
if ((xCount - mVUcount) > aCount) mVUstatusFlagOp<vuIndex>(); // Don't Optimize out on the last ~4+ instructions
|
if ((xCount - mVUcount) > aCount) mVUstatusFlagOp<vuIndex>(); // Don't Optimize out on the last ~4+ instructions
|
||||||
if (doStatus||isFSSET||doDivFlag) { mVUinfo |= (xStatus&3) << 12; } // _fsInstance
|
|
||||||
if (doMac) { mVUinfo |= (xMac&3) << 10; } // _fmInstance
|
|
||||||
|
|
||||||
yS += (mVUstall > 3) ? 3 : mVUstall;
|
yS += (mVUstall > 3) ? 3 : mVUstall;
|
||||||
if (yS > zS) {
|
if (yS > zS) {
|
||||||
|
@ -124,8 +122,10 @@ microVUt(void) mVUsetFlags(int* bStatus, int* bMac) {
|
||||||
}
|
}
|
||||||
yM++;
|
yM++;
|
||||||
|
|
||||||
mVUinfo |= (pStatus&3) << 18; // _fvsInstance
|
mVUinfo |= (xStatus&3) << 12; // _fsInstance
|
||||||
mVUinfo |= (pMac&3) << 16; // _fvmInstance
|
mVUinfo |= (xMac&3) << 10; // _fmInstance
|
||||||
|
mVUinfo |= (pStatus&3) << 18; // _fvsInstance
|
||||||
|
mVUinfo |= (pMac&3) << 16; // _fvmInstance
|
||||||
|
|
||||||
if (doStatus||isFSSET||doDivFlag) { xStatus = (xStatus+1); }
|
if (doStatus||isFSSET||doDivFlag) { xStatus = (xStatus+1); }
|
||||||
if (doMac) { xMac = (xMac+1); }
|
if (doMac) { xMac = (xMac+1); }
|
||||||
|
|
Loading…
Reference in New Issue