microVU: Save PC when processing T/D bits on branches, this is to ensure the rest of the block gets compiled correctly. Could have been the reason VP2 was freaking out after loading a save.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5593 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
refraction@gmail.com 2013-03-13 11:26:42 +00:00
parent 2ef95df6e1
commit 31221a29bd
1 changed files with 6 additions and 0 deletions

View File

@ -482,8 +482,10 @@ void mVUDoDBit(microVU& mVU, microFlagCycles* mFC)
{
bool isBranch = false;
JccComparisonType Jcc;
u32 savedPC = 0;
incPC(2); //Check next slot for branch delay, if not, that's where the VU will resume anyway.
savedPC = iPC; //Save PC as it's about to get modified if it's a branch!
if(mVUinfo.isBdelay) isBranch = true;
@ -531,14 +533,17 @@ void mVUDoDBit(microVU& mVU, microFlagCycles* mFC)
else
mVUDTendProgram(mVU, mFC, 1);
eJMP.SetTarget();
iPC = savedPC;
}
void mVUDoTBit(microVU& mVU, microFlagCycles* mFC)
{
bool isBranch = false;
JccComparisonType Jcc;
u32 savedPC = 0;
incPC(2); //Check next slot for branch delay, if not, that's where the VU will resume anyway.
savedPC = iPC; //Save PC as it's about to get modified if it's a branch!
if(mVUinfo.isBdelay) isBranch = true;
@ -584,6 +589,7 @@ void mVUDoTBit(microVU& mVU, microFlagCycles* mFC)
else
mVUDTendProgram(mVU, mFC, 1);
eJMP.SetTarget();
iPC = savedPC;
}
void mVUSaveFlags(microVU& mVU,microFlagCycles &mFC, microFlagCycles &mFCBackup)