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.
This commit is contained in:
Akash 2015-09-19 12:19:52 +05:30
parent f5a38ab954
commit ffebefb65e
3 changed files with 8 additions and 13 deletions

View File

@ -54,7 +54,7 @@ void mVUDTendProgram(mV, microFlagCycles* mFC, int isEbit) {
} }
//Run any pending XGKick, providing we've got to it. //Run any pending XGKick, providing we've got to it.
if (mVUinfo.doXGKICK && xPC >= mVUinfo.XGKICKPC) { if (mVUinfo.doXGKICK && xPC >= mVUinfo.XGKICKPC) {
mVU_XGKICK_DELAY(mVU, true); mVU_XGKICK_DELAY(mVU);
} }
if (doEarlyExit(mVU)) { if (doEarlyExit(mVU)) {
if (!isVU1) xCALL(mVU0clearlpStateJIT); if (!isVU1) xCALL(mVU0clearlpStateJIT);
@ -113,7 +113,7 @@ void mVUendProgram(mV, microFlagCycles* mFC, int isEbit) {
mVUdivSet(mVU); mVUdivSet(mVU);
} }
if (mVUinfo.doXGKICK) { if (mVUinfo.doXGKICK) {
mVU_XGKICK_DELAY(mVU, true); mVU_XGKICK_DELAY(mVU);
} }
if (doEarlyExit(mVU)) { if (doEarlyExit(mVU)) {
if (!isVU1) if (!isVU1)

View File

@ -499,7 +499,7 @@ void* mVUcompileSingleInstruction(microVU& mVU, u32 startPC, uptr pState, microF
mVUincCycles(mVU, 1); //Just incase the is XGKick mVUincCycles(mVU, 1); //Just incase the is XGKick
if (mVUinfo.doXGKICK) { if (mVUinfo.doXGKICK) {
mVU_XGKICK_DELAY(mVU, true); mVU_XGKICK_DELAY(mVU);
} }
return thisPtr; return thisPtr;
@ -624,7 +624,7 @@ void* mVUcompile(microVU& mVU, u32 startPC, uptr pState) {
} }
if (mVUinfo.doXGKICK) { if (mVUinfo.doXGKICK) {
mVU_XGKICK_DELAY(mVU, true); mVU_XGKICK_DELAY(mVU);
} }
if (isEvilBlock) { if (isEvilBlock) {

View File

@ -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); mVUbackupRegs(mVU);
#if 0 // XGkick Break - ToDo: Change "SomeGifPathValue" to w/e needs to be tested #if 0 // XGkick Break - ToDo: Change "SomeGifPathValue" to w/e needs to be tested
xTEST (ptr32[&SomeGifPathValue], 1); // If '1', breaks execution xTEST (ptr32[&SomeGifPathValue], 1); // If '1', breaks execution
xMOV (ptr32[&mVU.resumePtrXG], (uptr)xGetPtr() + 10 + 6); xMOV (ptr32[&mVU.resumePtrXG], (uptr)xGetPtr() + 10 + 6);
xJcc32(Jcc_NotZero, (uptr)mVU.exitFunctXG - ((uptr)xGetPtr()+6)); xJcc32(Jcc_NotZero, (uptr)mVU.exitFunctXG - ((uptr)xGetPtr()+6));
#endif #endif
if (memVI) xMOV(gprT2, ptr32[&mVU.VIxgkick]); xMOV(gprT2, ptr32[&mVU.VIxgkick]);
else mVUallocVIa(mVU, gprT2, _Is_);
xCALL(mVU_XGKICK_); xCALL(mVU_XGKICK_);
mVUrestoreRegs(mVU); mVUrestoreRegs(mVU);
} }
@ -1228,12 +1227,8 @@ static __fi void mVU_XGKICK_DELAY(mV, bool memVI) {
mVUop(mVU_XGKICK) { mVUop(mVU_XGKICK) {
pass1 { mVUanalyzeXGkick(mVU, _Is_, mVU_XGKICK_CYCLES); } pass1 { mVUanalyzeXGkick(mVU, _Is_, mVU_XGKICK_CYCLES); }
pass2 { pass2 {
if (!mVU_XGKICK_CYCLES) { if (mVUinfo.doXGKICK) { // check for XGkick Transfer
mVU_XGKICK_DELAY(mVU, false); mVU_XGKICK_DELAY(mVU);
return;
}
else if (mVUinfo.doXGKICK) {
mVU_XGKICK_DELAY(mVU, true);
mVUinfo.doXGKICK = false; mVUinfo.doXGKICK = false;
} }