microVU: minor changes...

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1719 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
cottonvibes 2009-08-31 22:44:18 +00:00
parent 455d0a4c87
commit 536073957a
5 changed files with 9 additions and 7 deletions

View File

@ -88,7 +88,7 @@ microVUt(void) mVUreset(mV) {
u8* z = (mVU->cache + 0x1000); // Dispatcher Code is in first page of cache u8* z = (mVU->cache + 0x1000); // Dispatcher Code is in first page of cache
mVU->prog.x86start = z; mVU->prog.x86start = z;
mVU->prog.x86ptr = z; mVU->prog.x86ptr = z;
mVU->prog.x86end = (u8*)((uptr)z + (uptr)(mVU->cacheSize - (mVU->cacheSize*.05))); mVU->prog.x86end = (u8*)((uptr)z + (uptr)(mVU->cacheSize - (_1mb * 3))); // 3mb "Safe Zone"
for (int i = 0; i <= mVU->prog.max; i++) { for (int i = 0; i <= mVU->prog.max; i++) {
if (!mVU->index) mVUclearProg<0>(i); if (!mVU->index) mVUclearProg<0>(i);

View File

@ -96,11 +96,12 @@ public:
} }
return NULL; return NULL;
} }
void printInfo() { void printInfo(int pc) {
if (listI < 7) return;
microBlockLink* linkI = &blockList; microBlockLink* linkI = &blockList;
for (int i = 0; i <= listI; i++) { for (int i = 0; i <= listI; i++) {
DevCon::Status("[Block #%d][q=%02d][p=%02d][xgkick=%d][vi15=%08x][viBackup=%02d][flags=%02x][exactMatch=%x]", DevCon::Status("[%04x][Block #%d][q=%02d][p=%02d][xgkick=%d][vi15=%08x][viBackup=%02d][flags=%02x][exactMatch=%x]",
params i, linkI->block->pState.q, linkI->block->pState.p, linkI->block->pState.xgkick, linkI->block->pState.vi15, params pc, i, linkI->block->pState.q, linkI->block->pState.p, linkI->block->pState.xgkick, linkI->block->pState.vi15,
linkI->block->pState.viBackUp, linkI->block->pState.flags, linkI->block->pState.needExactMatch); linkI->block->pState.viBackUp, linkI->block->pState.flags, linkI->block->pState.needExactMatch);
linkI = linkI->next; linkI = linkI->next;
} }
@ -142,7 +143,7 @@ struct microProgManager {
microRegInfo lpState; // Pipeline state from where program left off (useful for continuing execution) microRegInfo lpState; // Pipeline state from where program left off (useful for continuing execution)
}; };
#define mVUcacheSize (mMaxProg * (0x100000 * 0.5)) // 0.5mb per program #define mVUcacheSize ((mMaxProg < 20) ? (_1mb * 10) : (mMaxProg * (_1mb * 0.5))) // 0.5mb per program
struct microVU { struct microVU {
PCSX2_ALIGNED16(u32 macFlag[4]); // 4 instances of mac flag (used in execution) PCSX2_ALIGNED16(u32 macFlag[4]); // 4 instances of mac flag (used in execution)

View File

@ -315,7 +315,7 @@ microVUt(void) mVUanalyzeMflag(mV, int Is, int It) {
analyzeVIreg1(Is, mVUlow.VI_read[0]); analyzeVIreg1(Is, mVUlow.VI_read[0]);
analyzeVIreg2(It, mVUlow.VI_write, 1); analyzeVIreg2(It, mVUlow.VI_write, 1);
if (!It) { mVUlow.isNOP = 1; } if (!It) { mVUlow.isNOP = 1; }
else { // Need set _doMac for 4 previous Ops (need to do all 4 because stalls could change the result needed) else {
mVUinfo.swapOps = 1; mVUinfo.swapOps = 1;
flagSet(mVU, 1); flagSet(mVU, 1);
if (mVUcount < 4) { mVUpBlock->pState.needExactMatch |= 2; } if (mVUcount < 4) { mVUpBlock->pState.needExactMatch |= 2; }

View File

@ -123,7 +123,7 @@ microVUx(void) mVUcleanUp() {
//if (!(ax % 100000)) { //if (!(ax % 100000)) {
// for (u32 i = 0; i < (mVU->progSize / 2); i++) { // for (u32 i = 0; i < (mVU->progSize / 2); i++) {
// if (mVUcurProg.block[i]) { // if (mVUcurProg.block[i]) {
// mVUcurProg.block[i]->printInfo(); // mVUcurProg.block[i]->printInfo(i*8);
// } // }
// } // }
//} //}

View File

@ -221,6 +221,7 @@ typedef u32 (__fastcall *mVUCall)(void*, void*);
#define Rmem (uptr)&mVU->regs->VI[REG_R].UL #define Rmem (uptr)&mVU->regs->VI[REG_R].UL
#define aWrap(x, m) ((x > m) ? 0 : x) #define aWrap(x, m) ((x > m) ? 0 : x)
#define shuffleSS(x) ((x==1)?(0x27):((x==2)?(0xc6):((x==4)?(0xe1):(0xe4)))) #define shuffleSS(x) ((x==1)?(0x27):((x==2)?(0xc6):((x==4)?(0xe1):(0xe4))))
#define _1mb (0x100000)
// Flag Info // Flag Info
#define __Status (mVUregs.needExactMatch & 1) #define __Status (mVUregs.needExactMatch & 1)