From ffebefb65ec2b0a43168c3fa56410f97b2e8e550 Mon Sep 17 00:00:00 2001 From: Akash Date: Sat, 19 Sep 2015 12:19:52 +0530 Subject: [PATCH] MicroVU: Rework a logically dead code for XGkick. mVU_XGKICK_CYCLES can only take delay cycle values 1 and 6, it can't take NULL value. the conditional check and parameter is useless here. --- pcsx2/x86/microVU_Branch.inl | 4 ++-- pcsx2/x86/microVU_Compile.inl | 4 ++-- pcsx2/x86/microVU_Lower.inl | 13 ++++--------- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/pcsx2/x86/microVU_Branch.inl b/pcsx2/x86/microVU_Branch.inl index 361382f548..e2b81e59cf 100644 --- a/pcsx2/x86/microVU_Branch.inl +++ b/pcsx2/x86/microVU_Branch.inl @@ -54,7 +54,7 @@ void mVUDTendProgram(mV, microFlagCycles* mFC, int isEbit) { } //Run any pending XGKick, providing we've got to it. if (mVUinfo.doXGKICK && xPC >= mVUinfo.XGKICKPC) { - mVU_XGKICK_DELAY(mVU, true); + mVU_XGKICK_DELAY(mVU); } if (doEarlyExit(mVU)) { if (!isVU1) xCALL(mVU0clearlpStateJIT); @@ -113,7 +113,7 @@ void mVUendProgram(mV, microFlagCycles* mFC, int isEbit) { mVUdivSet(mVU); } if (mVUinfo.doXGKICK) { - mVU_XGKICK_DELAY(mVU, true); + mVU_XGKICK_DELAY(mVU); } if (doEarlyExit(mVU)) { if (!isVU1) diff --git a/pcsx2/x86/microVU_Compile.inl b/pcsx2/x86/microVU_Compile.inl index 5d3b147ae5..1c6cba5c16 100644 --- a/pcsx2/x86/microVU_Compile.inl +++ b/pcsx2/x86/microVU_Compile.inl @@ -499,7 +499,7 @@ void* mVUcompileSingleInstruction(microVU& mVU, u32 startPC, uptr pState, microF mVUincCycles(mVU, 1); //Just incase the is XGKick if (mVUinfo.doXGKICK) { - mVU_XGKICK_DELAY(mVU, true); + mVU_XGKICK_DELAY(mVU); } return thisPtr; @@ -624,7 +624,7 @@ void* mVUcompile(microVU& mVU, u32 startPC, uptr pState) { } if (mVUinfo.doXGKICK) { - mVU_XGKICK_DELAY(mVU, true); + mVU_XGKICK_DELAY(mVU); } if (isEvilBlock) { diff --git a/pcsx2/x86/microVU_Lower.inl b/pcsx2/x86/microVU_Lower.inl index 02c4113431..2868f3e664 100644 --- a/pcsx2/x86/microVU_Lower.inl +++ b/pcsx2/x86/microVU_Lower.inl @@ -1212,15 +1212,14 @@ void __fastcall mVU_XGKICK_(u32 addr) { } } -static __fi void mVU_XGKICK_DELAY(mV, bool memVI) { +static __fi void mVU_XGKICK_DELAY(mV) { mVUbackupRegs(mVU); #if 0 // XGkick Break - ToDo: Change "SomeGifPathValue" to w/e needs to be tested xTEST (ptr32[&SomeGifPathValue], 1); // If '1', breaks execution xMOV (ptr32[&mVU.resumePtrXG], (uptr)xGetPtr() + 10 + 6); xJcc32(Jcc_NotZero, (uptr)mVU.exitFunctXG - ((uptr)xGetPtr()+6)); #endif - if (memVI) xMOV(gprT2, ptr32[&mVU.VIxgkick]); - else mVUallocVIa(mVU, gprT2, _Is_); + xMOV(gprT2, ptr32[&mVU.VIxgkick]); xCALL(mVU_XGKICK_); mVUrestoreRegs(mVU); } @@ -1228,12 +1227,8 @@ static __fi void mVU_XGKICK_DELAY(mV, bool memVI) { mVUop(mVU_XGKICK) { pass1 { mVUanalyzeXGkick(mVU, _Is_, mVU_XGKICK_CYCLES); } pass2 { - if (!mVU_XGKICK_CYCLES) { - mVU_XGKICK_DELAY(mVU, false); - return; - } - else if (mVUinfo.doXGKICK) { - mVU_XGKICK_DELAY(mVU, true); + if (mVUinfo.doXGKICK) { // check for XGkick Transfer + mVU_XGKICK_DELAY(mVU); mVUinfo.doXGKICK = false; }