mirror of https://github.com/PCSX2/pcsx2.git
microVU: minor changes...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2632 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
3afa45d34b
commit
fc6bfb58f1
|
@ -81,7 +81,7 @@ public:
|
|||
for (int i = 0; i <= listI; i++) {
|
||||
if ((linkI->block->pState.q == pState->q)
|
||||
&& (linkI->block->pState.p == pState->p)
|
||||
&& (linkI->block->pState.vi15 == pState->vi15)
|
||||
&& ((linkI->block->pState.vi15 == pState->vi15) || !CHECK_VU_CONSTPROP)
|
||||
&& (linkI->block->pState.flags == pState->flags)
|
||||
&& (linkI->block->pState.xgkick == pState->xgkick)
|
||||
&& (linkI->block->pState.viBackUp == pState->viBackUp)
|
||||
|
|
|
@ -428,7 +428,7 @@ _f void mVUanalyzeNormBranch(mV, int It, bool isBAL) {
|
|||
_f void mVUanalyzeJump(mV, int Is, int It, bool isJALR) {
|
||||
mVUbranchCheck(mVU);
|
||||
mVUlow.branch = (isJALR) ? 10 : 9;
|
||||
if (mVUconstReg[Is].isValid && !CHECK_VU_CONSTHACK) {
|
||||
if (mVUconstReg[Is].isValid && CHECK_VU_CONSTPROP) {
|
||||
mVUlow.constJump.isValid = 1;
|
||||
mVUlow.constJump.regValue = mVUconstReg[Is].regValue;
|
||||
//DevCon.Status("microVU%d: Constant JR/JALR Address Optimization", mVU->index);
|
||||
|
|
|
@ -384,7 +384,7 @@ _r void* mVUcompile(microVU* mVU, u32 startPC, uptr pState) {
|
|||
}
|
||||
|
||||
// Fix up vi15 const info for propagation through blocks
|
||||
mVUregs.vi15 = (mVUconstReg[15].isValid && !CHECK_VU_CONSTHACK) ? ((1<<31) | (mVUconstReg[15].regValue&0xffff)) : 0;
|
||||
mVUregs.vi15 = (mVUconstReg[15].isValid && CHECK_VU_CONSTPROP) ? ((1<<31) | (mVUconstReg[15].regValue&0xffff)) : 0;
|
||||
|
||||
mVUsetFlags(mVU, mFC); // Sets Up Flag instances
|
||||
mVUoptimizePipeState(mVU); // Optimize the End Pipeline State for nicer Block Linking
|
||||
|
|
|
@ -265,7 +265,7 @@ void mVUflagPass(mV, u32 startPC, u32 xCount) {
|
|||
_f void mVUsetFlagInfo(mV) {
|
||||
branchType1 { incPC(-1); mVUflagPass(mVU, branchAddr, 4); incPC(1); }
|
||||
branchType2 {
|
||||
if (!mVUlow.constJump.isValid || CHECK_VU_CONSTHACK) { mVUregs.needExactMatch |= 0x7; }
|
||||
if (!mVUlow.constJump.isValid || !CHECK_VU_CONSTPROP) { mVUregs.needExactMatch |= 0x7; }
|
||||
else { mVUflagPass(mVU, (mVUlow.constJump.regValue*8)&(mVU->microMemSize-8), 4); }
|
||||
}
|
||||
branchType3 {
|
||||
|
|
|
@ -236,8 +236,13 @@ typedef u32 (__fastcall *mVUCall)(void*, void*);
|
|||
// Reg Alloc
|
||||
#define doRegAlloc 1 // Set to 0 to flush every 64bit Instruction (Turns off regAlloc)
|
||||
|
||||
// Constant Propagation
|
||||
#define CHECK_VU_CONSTPROP 0
|
||||
// Enables Constant Propagation for Jumps based on vi15
|
||||
// allowing us to know many indirect jump target addresses.
|
||||
// Makes GoW a lot slower due to extra recompilation time!
|
||||
|
||||
// Speed Hacks
|
||||
#define CHECK_VU_CONSTHACK 1 // Disables Constant Propagation for Jumps
|
||||
#define CHECK_VU_FLAGHACK (EmuConfig.Speedhacks.vuFlagHack) // (Can cause Infinite loops, SPS, etc...)
|
||||
#define CHECK_VU_MINMAXHACK (EmuConfig.Speedhacks.vuMinMax) // (Can cause SPS, Black Screens, etc...)
|
||||
|
||||
|
|
Loading…
Reference in New Issue