mirror of https://github.com/PCSX2/pcsx2.git
microVU:
-increased rec-cache so GOW2 should be happy (untested) -hacked-fixed some problems for now that I'll be working on properly fixing over the next few days. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1173 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
9e1b3fb33e
commit
d363c21e8f
|
@ -163,7 +163,7 @@ microVUt(int) mVUfindLeastUsedProg() {
|
||||||
}*/
|
}*/
|
||||||
mVUclearProg<vuIndex>(j); // Clear old data if overwriting old program
|
mVUclearProg<vuIndex>(j); // Clear old data if overwriting old program
|
||||||
mVUcacheProg<vuIndex>(j); // Cache Micro Program
|
mVUcacheProg<vuIndex>(j); // Cache Micro Program
|
||||||
Console::Notice("microVU%d: MicroProgram Cache Full!", params vuIndex);
|
//Console::Notice("microVU%d: MicroProgram Cache Full!", params vuIndex);
|
||||||
return j;
|
return j;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,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 (0x1f00000 / ((vuIndex) ? 1 : 4))
|
#define mVUcacheSize (0x2000000 / ((vuIndex) ? 1 : 4))
|
||||||
struct microVU {
|
struct microVU {
|
||||||
u32 index; // VU Index (VU0 or VU1)
|
u32 index; // VU Index (VU0 or VU1)
|
||||||
u32 microSize; // VU Micro Memory Size
|
u32 microSize; // VU Micro Memory Size
|
||||||
|
|
|
@ -234,6 +234,7 @@ microVUt(void) mVUanalyzeSQ(int Fs, int It, bool writeIt) {
|
||||||
analyzeReg1(Fs);
|
analyzeReg1(Fs);
|
||||||
analyzeVIreg1(It);
|
analyzeVIreg1(It);
|
||||||
if (writeIt) { analyzeVIreg2(It, 1); }
|
if (writeIt) { analyzeVIreg2(It, 1); }
|
||||||
|
if (mVUregsTemp.VFreg[0] == Fs) { mVUinfo |= _swapOps; }
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
|
|
|
@ -53,11 +53,11 @@ microVUt(void) mVUdispatcherA() {
|
||||||
|
|
||||||
SSE_MOVAPS_M128_to_XMM(xmmT1, (uptr)&mVU->regs->VI[REG_MAC_FLAG].UL);
|
SSE_MOVAPS_M128_to_XMM(xmmT1, (uptr)&mVU->regs->VI[REG_MAC_FLAG].UL);
|
||||||
SSE_SHUFPS_XMM_to_XMM (xmmT1, xmmT1, 0);
|
SSE_SHUFPS_XMM_to_XMM (xmmT1, xmmT1, 0);
|
||||||
SSE_MOVAPS_XMM_to_M128((uptr)&mVU->regs->VI[REG_MAC_FLAG].UL, xmmT1);
|
SSE_MOVAPS_XMM_to_M128((uptr)mVU->macFlag, xmmT1);
|
||||||
|
|
||||||
SSE_MOVAPS_M128_to_XMM(xmmT1, (uptr)&mVU->regs->VI[REG_CLIP_FLAG].UL);
|
SSE_MOVAPS_M128_to_XMM(xmmT1, (uptr)&mVU->regs->VI[REG_CLIP_FLAG].UL);
|
||||||
SSE_SHUFPS_XMM_to_XMM (xmmT1, xmmT1, 0);
|
SSE_SHUFPS_XMM_to_XMM (xmmT1, xmmT1, 0);
|
||||||
SSE_MOVAPS_XMM_to_M128((uptr)&mVU->regs->VI[REG_CLIP_FLAG].UL, xmmT1);
|
SSE_MOVAPS_XMM_to_M128((uptr)mVU->clipFlag, xmmT1);
|
||||||
|
|
||||||
SSE_MOVAPS_M128_to_XMM(xmmACC, (uptr)&mVU->regs->ACC.UL[0]);
|
SSE_MOVAPS_M128_to_XMM(xmmACC, (uptr)&mVU->regs->ACC.UL[0]);
|
||||||
SSE_MOVAPS_M128_to_XMM(xmmMax, (uptr)mVU_maxvals);
|
SSE_MOVAPS_M128_to_XMM(xmmMax, (uptr)mVU_maxvals);
|
||||||
|
|
|
@ -53,6 +53,7 @@ microVUt(void) mVUstatusFlagOp() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
iPC = curPC;
|
iPC = curPC;
|
||||||
|
Console::Status("microVU%d: FSSET Optimization", params vuIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
int findFlagInst(int* fFlag, int cycles) {
|
int findFlagInst(int* fFlag, int cycles) {
|
||||||
|
@ -172,14 +173,15 @@ microVUt(void) mVUsetupFlags(int* xStatus, int* xMac, int* xClip, int cycles) {
|
||||||
SSE_SHUFPS_XMM_to_XMM (xmmT1, xmmT1, shuffleMac);
|
SSE_SHUFPS_XMM_to_XMM (xmmT1, xmmT1, shuffleMac);
|
||||||
SSE_MOVAPS_XMM_to_M128((uptr)mVU->macFlag, xmmT1);
|
SSE_MOVAPS_XMM_to_M128((uptr)mVU->macFlag, xmmT1);
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
if (__Clip) {
|
if (__Clip) {
|
||||||
int bClip[4];
|
int bClip[4];
|
||||||
sortFlag(xClip, bClip, cycles);
|
//sortFlag(xClip, bClip, cycles);
|
||||||
|
SysPrintf("__Clip\n");
|
||||||
SSE_MOVAPS_M128_to_XMM(xmmT1, (uptr)mVU->clipFlag);
|
SSE_MOVAPS_M128_to_XMM(xmmT1, (uptr)mVU->clipFlag);
|
||||||
SSE_SHUFPS_XMM_to_XMM (xmmT1, xmmT1, shuffleClip);
|
SSE_SHUFPS_XMM_to_XMM (xmmT1, xmmT1, shuffleClip);
|
||||||
SSE_MOVAPS_XMM_to_M128((uptr)mVU->clipFlag, xmmT1);
|
SSE_MOVAPS_XMM_to_M128((uptr)mVU->clipFlag, xmmT1);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
microVUt(void) mVUpass4(int startPC) {
|
microVUt(void) mVUpass4(int startPC) {
|
||||||
|
|
|
@ -222,11 +222,11 @@ declareAllVariables
|
||||||
#define fmInstance ((mVUinfo >> 10) & 3)
|
#define fmInstance ((mVUinfo >> 10) & 3)
|
||||||
#define fsInstance ((mVUinfo >> 12) & 3)
|
#define fsInstance ((mVUinfo >> 12) & 3)
|
||||||
#define fpsInstance ((((mVUinfo>>12) & 3) - 1) & 0x3)
|
#define fpsInstance ((((mVUinfo>>12) & 3) - 1) & 0x3)
|
||||||
#define fcInstance ((mVUinfo >> 14) & 3)
|
#define fcInstance 0//((mVUinfo >> 14) & 3)
|
||||||
#define fpcInstance ((((mVUinfo>>14) & 3) - 1) & 0x3)
|
#define fpcInstance 0//((((mVUinfo>>14) & 3) - 1) & 0x3)
|
||||||
#define fvmInstance ((mVUinfo >> 16) & 3)
|
#define fvmInstance ((mVUinfo >> 16) & 3)
|
||||||
#define fvsInstance ((mVUinfo >> 18) & 3)
|
#define fvsInstance ((mVUinfo >> 18) & 3)
|
||||||
#define fvcInstance ((mVUinfo >> 20) & 3)
|
#define fvcInstance 0//((mVUinfo >> 20) & 3)
|
||||||
#define backupVI (mVUinfo & (1<<22))
|
#define backupVI (mVUinfo & (1<<22))
|
||||||
#define memReadIs (mVUinfo & (1<<23))
|
#define memReadIs (mVUinfo & (1<<23))
|
||||||
#define memReadIt (mVUinfo & (1<<24))
|
#define memReadIt (mVUinfo & (1<<24))
|
||||||
|
|
|
@ -299,7 +299,7 @@ microVUt(void) mVUrestoreRegs() {
|
||||||
POP32R(gprR); // Restore EDX
|
POP32R(gprR); // Restore EDX
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reads entire microProgram and finds out if Status Flag is Used
|
||||||
microVUt(void) mVUcheckSflag(int progIndex) {
|
microVUt(void) mVUcheckSflag(int progIndex) {
|
||||||
if (CHECK_VU_FLAGHACK) {
|
if (CHECK_VU_FLAGHACK) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue