mirror of https://github.com/PCSX2/pcsx2.git
microVU:
- Fixed a problem that was causing microPrograms to be cached when they shouldn't be (introduced in r1209). This also fixes broken logging in some games, and is a small-speedup. - Minor Changes git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1230 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
31c5c234ef
commit
996440bab0
|
@ -222,7 +222,7 @@ microVUt(int) mVUcmpProg(int progIndex, bool progUsed, bool needOverflowCheck, b
|
|||
mVU->prog.cleared = 0;
|
||||
mVU->prog.isSame = cmpWholeProg ? 1 : -1;
|
||||
mVU->prog.prog[progIndex].last_used = 3;
|
||||
if (!needOverflowCheck || mVU->prog.prog[progIndex].used < 0x7fffffff) {
|
||||
if (needOverflowCheck && (mVU->prog.prog[progIndex].used < 0x7fffffff)) {
|
||||
mVU->prog.prog[progIndex].used++; // increment 'used' (avoiding overflows if necessary)
|
||||
}
|
||||
return 1;
|
||||
|
|
|
@ -34,6 +34,13 @@
|
|||
else { ajmp = JMPcc((uptr)0); } \
|
||||
break
|
||||
|
||||
#define branchWarning() { \
|
||||
if (mVUbranch) { \
|
||||
Console::Error("microVU%d Warning: Branch in E-bit/Branch delay slot! [%04x]", params vuIndex, xPC); \
|
||||
mVUinfo |= _isNOP; \
|
||||
} \
|
||||
}
|
||||
|
||||
#define startLoop() { mVUdebug1(); mVUstall = 0; memset(&mVUregsTemp, 0, sizeof(mVUregsTemp)); }
|
||||
#define calcCycles(reg, x) { reg = ((reg > x) ? (reg - x) : 0); }
|
||||
#define tCycles(dest, src) { dest = aMax(dest, src); }
|
||||
|
@ -50,7 +57,7 @@ microVUt(void) mVUcheckIsSame() {
|
|||
microVU* mVU = mVUx;
|
||||
|
||||
if (mVU->prog.isSame == -1) {
|
||||
mVU->prog.isSame = !!memcmp_mmx(mVU->prog.prog[mVU->prog.cur].data, mVU->regs->Micro, mVU->microSize);
|
||||
mVU->prog.isSame = !memcmp_mmx(mVU->prog.prog[mVU->prog.cur].data, mVU->regs->Micro, mVU->microSize);
|
||||
}
|
||||
if (mVU->prog.isSame == 0) {
|
||||
mVUcacheProg<vuIndex>(mVU->prog.cur);
|
||||
|
@ -235,7 +242,7 @@ microVUt(void*) __fastcall mVUcompile(u32 startPC, uptr pState) {
|
|||
if (mVU->p) { mVUinfo |= _readP; }
|
||||
if (mVU->q) { mVUinfo |= _readQ; }
|
||||
else { mVUinfo |= _writeQ; }
|
||||
if (branch >= 2) { mVUinfo |= _isEOB | ((branch == 3) ? _isBdelay : 0); mVUcount++; if (mVUbranch) { Console::Error("microVU Warning: Branch in E-bit/Branch delay slot!"); mVUinfo |= _isNOP; } break; }
|
||||
if (branch >= 2) { mVUinfo |= _isEOB | ((branch == 3) ? _isBdelay : 0); mVUcount++; branchWarning(); break; }
|
||||
else if (branch == 1) { branch = 2; }
|
||||
if (mVUbranch) { mVUsetFlagInfo<vuIndex>(); branch = 3; mVUbranch = 0; mVUinfo |= _isBranch; }
|
||||
incPC(1);
|
||||
|
@ -308,7 +315,7 @@ microVUt(void*) __fastcall mVUcompile(u32 startPC, uptr pState) {
|
|||
}
|
||||
// Conditional Branches
|
||||
mVUprint("mVUcompile conditional branch");
|
||||
if (bBlock) { // Branch non-taken has already been compiled
|
||||
if (bBlock) { // Branch non-taken has already been compiled
|
||||
incPC(-3); // Go back to branch opcode (to get branch imm addr)
|
||||
|
||||
if (mVUblocks[branchAddr/8] == NULL)
|
||||
|
|
|
@ -202,6 +202,7 @@ microVUt(void) mVUpass4(int startPC) {
|
|||
if (mVUbranch) { branch = 3; mVUbranch = 0; }
|
||||
incPC(1);
|
||||
}
|
||||
//if (mVUcount == 4) { mVUflagInfo |= 0xfff; } // Is this Too Slow? 99% of games probably don't need this.
|
||||
iPC = oldPC;
|
||||
mVUcount = oldCount;
|
||||
mVUbranch = oldBranch;
|
||||
|
|
Loading…
Reference in New Issue