mirror of https://github.com/PCSX2/pcsx2.git
microVU: more flag "stuff" xD
<JakeStine>cotton: your commits always contain "stuff" <JakeStine>I think you should rename one of your files to "microVU_stuff" <Dwarg>And maybe others called "microVU_junk" and "microVU_crap" <Dwarg>Then you could be much clearer <Dwarg>"Fixed some junk, broke some crap, added some stuff...." <JakeStine>lol <cotton>lol git-svn-id: http://pcsx2.googlecode.com/svn/trunk@972 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
6cceed6268
commit
ac1ecd5812
|
@ -255,7 +255,12 @@ microVUt(void) mVUanalyzeSflag(int It) {
|
||||||
|
|
||||||
microVUt(void) mVUanalyzeFSSET() {
|
microVUt(void) mVUanalyzeFSSET() {
|
||||||
microVU* mVU = mVUx;
|
microVU* mVU = mVUx;
|
||||||
mVUinfo |= _isFSSSET;
|
mVUinfo |= _isFSSET;
|
||||||
|
// mVUinfo &= ~_doStatus;
|
||||||
|
// Note: I'm not entirely sure if the non-sticky flags
|
||||||
|
// should be taken from the current upper instruction
|
||||||
|
// or if they should be taken from the previous instruction
|
||||||
|
// Uncomment the above line if the latter-case is true
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
|
|
|
@ -60,17 +60,21 @@ microVUt(void) mVUstatusFlagOp() {
|
||||||
microVU* mVU = mVUx;
|
microVU* mVU = mVUx;
|
||||||
int curPC = iPC;
|
int curPC = iPC;
|
||||||
int i = mVUcount;
|
int i = mVUcount;
|
||||||
|
bool runLoop = 1;
|
||||||
if (doStatus) { mVUinfo |= _isSflag; }
|
if (doStatus) { mVUinfo |= _isSflag; }
|
||||||
else {
|
else {
|
||||||
for (; i > 0; i--) {
|
for (; i > 0; i--) {
|
||||||
incPC2(-2);
|
incPC2(-2);
|
||||||
|
if (isSflag) { runLoop = 0; break; }
|
||||||
if (doStatus) { mVUinfo |= _isSflag; break; }
|
if (doStatus) { mVUinfo |= _isSflag; break; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (; i > 0; i--) {
|
if (runLoop) {
|
||||||
incPC2(-2);
|
for (; i > 0; i--) {
|
||||||
if (isSflag) break;
|
incPC2(-2);
|
||||||
mVUinfo &= ~(_doStatus|_doDivFlag);
|
if (isSflag) break;
|
||||||
|
mVUinfo &= ~_doStatus;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
iPC = curPC;
|
iPC = curPC;
|
||||||
}
|
}
|
||||||
|
@ -98,7 +102,7 @@ microVUt(void) mVUsetFlags(int* bStatus, int* bMac) {
|
||||||
int xCount = mVUcount; // Backup count
|
int xCount = mVUcount; // Backup count
|
||||||
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) && isFSSET) mVUstatusFlagOp<vuIndex>(); // Don't Optimize out on the last ~4+ instructions
|
||||||
|
|
||||||
yS += (mVUstall > 3) ? 3 : mVUstall;
|
yS += (mVUstall > 3) ? 3 : mVUstall;
|
||||||
if (yS > zS) {
|
if (yS > zS) {
|
||||||
|
|
|
@ -184,7 +184,7 @@ declareAllVariables
|
||||||
#define _memReadIt (1<<24) // Read If (VI reg) from memory (used by branches)
|
#define _memReadIt (1<<24) // Read If (VI reg) from memory (used by branches)
|
||||||
#define _writesVI (1<<25) // Current Instruction writes to VI
|
#define _writesVI (1<<25) // Current Instruction writes to VI
|
||||||
#define _swapOps (1<<26) // Runs Lower Instruction Before Upper Instruction
|
#define _swapOps (1<<26) // Runs Lower Instruction Before Upper Instruction
|
||||||
#define _isFSSSET (1<<27) // Cur Instruction is FSSET
|
#define _isFSSET (1<<27) // Cur Instruction is FSSET
|
||||||
#define _doDivFlag (1<<28) // Transfer Div flag to Status Flag
|
#define _doDivFlag (1<<28) // Transfer Div flag to Status Flag
|
||||||
|
|
||||||
//#define _isBranch2 (1<<31) // Cur Instruction is a Branch that writes VI regs (BAL/JALR)
|
//#define _isBranch2 (1<<31) // Cur Instruction is a Branch that writes VI regs (BAL/JALR)
|
||||||
|
|
Loading…
Reference in New Issue