Merge pull request #6829 from stenzek/jit-flush-constants

Jit64: Invalidate cached constant values w/o host register on flush
This commit is contained in:
Markus Wick 2018-05-12 17:37:18 +02:00 committed by GitHub
commit 6707357512
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -101,6 +101,13 @@ void RegCache::Flush(FlushMode mode, BitSet32 regsToFlush)
ASSERT_MSG(DYNA_REC, 0, "Jit64 - Flush unhandled case, reg %u PC: %08x", i, PC);
}
}
else if (m_regs[i].location.IsImm())
{
// We can have a cached value without a host register through speculative constants.
// It must be cleared when flushing, otherwise it may be out of sync with PPCSTATE,
// if PPCSTATE is modified externally (e.g. fallback to interpreter).
m_regs[i].location = GetDefaultLocation(i);
}
}
}