mirror of https://github.com/PCSX2/pcsx2.git
Merge pull request #839 from ssakash/patch-1
MicroVU: Fix a logically dead code for XGKick Instruction
This commit is contained in:
commit
931fdf0bcd
|
@ -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)
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue