Make sure interpreter and jit savestates match.

This commit is contained in:
Unknown W. Brackets 2013-03-08 08:49:21 -08:00
parent b15255426c
commit c4ab0855b4
5 changed files with 20 additions and 1 deletions

View file

@ -71,7 +71,14 @@ void Jit::DoState(PointerWrap &p)
{
p.Do(js.startDefaultPrefix);
p.DoMarker("Jit");
FlushPrefixV();
}
// This is here so the savestate matches between jit and non-jit.
void Jit::DoDummyState(PointerWrap &p)
{
bool dummy = false;
p.Do(dummy);
p.DoMarker("Jit");
}
void Jit::FlushAll()

View file

@ -134,6 +134,7 @@ class Jit : public ArmGen::ARMXCodeBlock
public:
Jit(MIPSState *mips);
void DoState(PointerWrap &p);
static void DoDummyState(PointerWrap &p);
// Compiled ops should ignore delay slots
// the compiler will take care of them by itself

View file

@ -112,6 +112,8 @@ void MIPSState::DoState(PointerWrap &p)
Reset();
if (MIPSComp::jit)
MIPSComp::jit->DoState(p);
else
MIPSComp::Jit::DoDummyState(p);
p.DoArray(r, sizeof(r) / sizeof(r[0]));
p.DoArray(f, sizeof(f) / sizeof(f[0]));

View file

@ -115,6 +115,14 @@ void Jit::DoState(PointerWrap &p)
p.DoMarker("Jit");
}
// This is here so the savestate matches between jit and non-jit.
void Jit::DoDummyState(PointerWrap &p)
{
bool dummy = false;
p.Do(dummy);
p.DoMarker("Jit");
}
void Jit::FlushAll()
{
gpr.Flush();

View file

@ -143,6 +143,7 @@ class Jit : public Gen::XCodeBlock
public:
Jit(MIPSState *mips);
void DoState(PointerWrap &p);
static void DoDummyState(PointerWrap &p);
// Compiled ops should ignore delay slots
// the compiler will take care of them by itself